Page 1 of 1

Power Pete Need help!

PostPosted: Wed Feb 15, 2006 11:45 pm
by The achievement
This question is for the one and only power pete, ok pete my character is a um a person who jumps and walks rite, ok well when i jump with him, and if i keep hitting the jump button, he keeps jumping, i swear there is a code to dothis like weight=0.50)FALSE.2? any suggestions?

PostPosted: Thu Feb 16, 2006 4:11 am
by Fuzzy
You need to have a limiting variable, that tells the actor that he is not allowed to jump.
When his feet touch the ground again(collide with ground) you set this variable to 0, or whatever number represents an allowance to jump.

Before you jump(after the keydown event), check to see if he is allowed to jump(use my Mortal Enemy, the 'if' statement). I dont normally recomend him, but this time I will.

to cap it off... at the beginning of your jump script, put

Code: Select all
if(IsJumping == 0)
 {
    IsJumping = 1;
    (Jump code here)
  }



Notice that I used two = after if. i just about forgot. You shouldnt forget either.

in the collision event add this script
Code: Select all
IsJumping = 0;


IsJumping = 1 means that he is busy jumping. IsJumping = 0 means he is not. Also, turn off key repeat on the jump key.

PostPosted: Thu Feb 16, 2006 12:19 pm
by Kodo
Also worth looking at your old post on the same subject..

http://game-editor.com/forum/viewtopic. ... ight=#7996

PostPosted: Thu Feb 16, 2006 10:43 pm
by The achievement
Ok guys that replied to me thank you, ok so i right click on the actor that walks, jumps, and moves. Right? ok then i go to add action, key down event, then script editor and type in your codes? Is that it? Someone give me some info on what to do, im not sayin you guys arent givin me good info, but your codes are different from each other.

PostPosted: Thu Feb 16, 2006 10:46 pm
by The achievement
Ok i need help someone tell me step by step on what to do. PLZ cause im almost finished i just added some cool powerups and i need help on this, some one give me STEP by STEP info. PLEASE