About Store Forum Documentation Contact
Donations:
345$/mo



Post Reply 
input.jump
Author Message
khces Offline
Member

Post: #1
input.jump
hello wink

Each time press the Spacebar to jump I want ....

english sorry .. .. once jump no. grin

2 time or 3 time ....
(This post was last modified: 10-24-2011 10:47 AM by khces.)
10-24-2011 10:46 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: input.jump
hi, this will work only if the character is on ground (ctrl.onGround()==true)

for other cases you can try applying velocities
ctrl.actor.addVel(..)
10-24-2011 05:14 PM
Find all posts by this user Quote this message in a reply
khces Offline
Member

Post: #3
RE: input.jump
ctrl.actor.addVel() is Is affected by gravity...

i want always jump value and while falling from high too.

How should approach?

thx.
10-25-2011 04:26 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: input.jump
please explain more precisely what you want to achieve
10-25-2011 11:16 AM
Find all posts by this user Quote this message in a reply
Dwight Offline
Member

Post: #5
RE: input.jump
I think he wants to be able to jump in mid-air as well, so a double jump.

Example: The character is on the ground, and the player decides to jump-> character flies in the air, and while in the air, the player presses the jump-key again, and the player goes even higher into the air.

http://www.youtube.com/watch?v=ipMKRkF6JQ8 at 0:37

SnowCloud Entertainment - We are recruiting!
http://www.sc-entertainment.com
10-26-2011 09:47 AM
Find all posts by this user Quote this message in a reply
khces Offline
Member

Post: #6
RE: input.jump
my english sorry...

Dwight thx wink

Want to jump in the air, regardless of the gravity

double jump grin and three jump wink

http://www.youtube.com/watch?v=p_j1SLG4R...r_embedded
(This post was last modified: 10-26-2011 04:56 PM by khces.)
10-26-2011 04:02 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: input.jump
does that help?

Code:
if(!onGround())
{
  Vec vel=ctrl.actor.vel();
  vel.y=jump_velocity;
  ctrl.actor.vel(vel);
}
10-28-2011 12:00 PM
Find all posts by this user Quote this message in a reply
khces Offline
Member

Post: #8
RE: input.jump
ah.. good thx.smile
10-31-2011 05:49 AM
Find all posts by this user Quote this message in a reply
Post Reply