Jump havoc

Game Editor comments and discussion.

Jump havoc

Postby lordezak » Sun Jan 13, 2008 4:55 pm

can any1 help me with my jumping problems - i want it so i jump only twice then he falls - at the moment he can jump an infinite amount of times which allows a lot of glithes and cheats :( can any1 help me thanx :)
the computer world is bigger than the real one!
User avatar
lordezak
 
Posts: 15
Joined: Sat Jan 12, 2008 1:52 pm
Score: 2 Give a positive score

Re: Jump havoc

Postby Azou » Sun Jan 13, 2008 5:06 pm

You need to add a variable called canJump
Then,make an actor called platform,who is Filled Region.
Key down/Key for jump/Disable(on repeat)/script editor

if(canjump==1) // if he has collided with the floor
{yvelocity =-18; //jump
canjump=0;} // and he can't jump again until he touches the floor

Then draw actor/script editor:

yvelocity +=1;

After:
Collision/Top side of platform/Repeat this event Yes/Physical response/Event actor 0

Finally:
Collision/Top side of platform/Repeat No/script editor

canjump=1; // the variable canjump represents the ability to jump. if it's 1, you can jump.
//if it's 0, u can't jump
// in this case the platform is the invisible blue frame at the bottom.

Yo! It is so long,but this is working! :mrgreen:
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Jump havoc

Postby lordezak » Sun Jan 13, 2008 5:15 pm

anything simpler which doesnt require code? :? :(
the computer world is bigger than the real one!
User avatar
lordezak
 
Posts: 15
Joined: Sat Jan 12, 2008 1:52 pm
Score: 2 Give a positive score

Re: Jump havoc

Postby Azou » Sun Jan 13, 2008 5:31 pm

No,unhappily,this is the single method i found :? :|
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Jump havoc

Postby Kalladdolf » Mon Jan 14, 2008 2:05 pm

yup, azou's right about the code, just one thing...
the platform doesn't exactly need to be a filled region. It can be anything, your ground animation, or whatever =D

it's actually easier than it seems. getting used to work with variables and the "if"-function is a bigger step, but it's a great success once you know how to use it.
you know the guy's more advanced and no beginner anymore once he knows this kinda stuff, because then he'll be able to make really great games (where you can win, lose, restart, save etc)
have fun :D
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: Jump havoc

Postby Azou » Wed Jan 16, 2008 2:51 pm

:D
Janinmax is right.
And ifyu wanna make games;so you have to code every time :D
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Jump havoc

Postby blackguy95 » Tue Jan 22, 2008 10:31 pm

ok try this, create a variable called jump. then create a keydown event on the desired actor "jump key"
then go to the "conditional action" command. then type in the top box "jump",and in the bottombox "1". then
set the middle button to "equal to" "this is saying do this only if jump =1" then go to script editor and type this in
yvelocity=yvelocity- "jump height here" ; then press enter and type in jump=0;.
after this create a collision event and put when event actor collides with "the actor representing your floor".
then go to the "script editor command"and type in jump=1;
thats it!



sorry but this is as simple as i could get it without the complicated code, hope you can understand :D
User avatar
blackguy95
 
Posts: 7
Joined: Sat Jan 05, 2008 1:33 am
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron