Ok. i just cant figure this out.

Talk about making games.

Ok. i just cant figure this out.

Postby The achievement » Tue Jun 13, 2006 11:21 pm

Alright guys, bear with me. I know that you have told me how to do this a million times. But still its hard to figure out how to do it.. or it is just glitched but i dont think so. Anyway heres my question If i keep pressing the spacebar, my character just keeps on jumping. and how do i make it so he only jumps once. until he stops on the ground?

Heres what i'm doing. > player actor> collision with ground> script> and im typing if(canJump=1);

yvelocity=-8;

canJump=0;






Then i do a collision finish with ground and i type in canJump=1;





do i need to make the variable actor,integer? or Global int?


Or is it just somthing im doing wrong.



And yes, i have seen all of the forums on this. and it is still not working.

I need help. because if i cant make this stop, people are just going to cheat in my game. :(
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby makslane » Wed Jun 14, 2006 12:13 pm

Code: Select all
if(canJump == 1) //Not =, and remove the ;
{
  yvelocity=-8;
  canJump=0;
}
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby The achievement » Wed Jun 14, 2006 4:01 pm

I dont know whats going on, but i am cursed i cannot do this jump thing.

i typed your code exactly how it is. then i went to collision with ground and typed it.
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby Just4Fun » Wed Jun 14, 2006 11:10 pm

I'm not sure but his link may help you:
http://game-editor.com/forum/viewtopic. ... light=jump
I've learned that I still have a lot to learn.

** Makslane == Genious **
Just4Fun
 
Posts: 524
Joined: Tue Jul 01, 2003 5:19 am
Location: USA: Washington State; West Coast
Score: 6 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest