Page 1 of 1

How do i make the character jump?

PostPosted: Fri Aug 24, 2007 6:25 am
by vizho
if i want the character to jump when i press space! is it? "yvelocity = -8;"
but if i write that script the character jumps out of sight. i just want it to jump a little bit! please help me!

PostPosted: Fri Aug 24, 2007 6:55 am
by Bee-Ant
:shock: :shock: :shock: You must a new user...
So simple :D :D :D

Make 2 actor, "player" and "platform"

Put this actions on "player" actor :
1. Collision Event with platform : 1 1 0 0

2. Draw Actor>Script Editor
yvelocity=yvelocity+0.5;

3. Key Down>Space>Script Editor
yvelocity=yvelocity-8;

Hope help :D :D :D

PostPosted: Fri Aug 24, 2007 2:21 pm
by J Maker
here on collision with topside of ground have physical response repeat while colliding yes and it will show 4 : 1's. the 3rd 1 change to 0.
then another collision with top side of ground have script editor:
Code: Select all
canJump = 1;
then add a variable called canJump
then on keydown space or up which ever use this
Code: Select all
if (canJump == 1)
{
    yvelocity=-17;
    canJump = 0;
}
then add gravity on draw actor of your player:
Code: Select all
yvelocity=yvelocity+1;
:D trust me on the gravity these codes will prevent repeated jumping