How do i make the character jump?

Game Editor comments and discussion.

How do i make the character jump?

Postby vizho » Fri Aug 24, 2007 6:25 am

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!
dasfas
vizho
 
Posts: 1
Joined: Thu Aug 23, 2007 12:52 pm
Location: fdaasd
Score: 0 Give a positive score

Postby Bee-Ant » Fri Aug 24, 2007 6:55 am

: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
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Postby J Maker » Fri Aug 24, 2007 2:21 pm

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
Some people believe Chuck Norris evolved from a dinosaur, the Chucknorisaurus.
----------------------------------------------------------------------------------
Chuck Norris doesn't sleep, he waits.
----------------------------------------------------------------------------------
Chuck Norris doesn't hunt, he kills.
----------------------------------------------------------------------------------
Chuck Norris once shot down a german fighter plane with his finger by yelling BANG!!!
----------------------------------------------------------------------------------
User avatar
J Maker
 
Posts: 177
Joined: Fri Jun 22, 2007 4:17 pm
Location: in the stick version of Hyrule
Score: 10 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron