by d-soldier » Wed Jul 11, 2007 5:29 pm
Whoops, I messed up one of the codes... this below is correct. sorry bout that. Re-check to verify that you put these codes where they are supposed to go, and that the variables are spelled correctly without using any capital letters. If you don't remove your other code, it could cause the problem.
1) Click up on SCRIPT menubar, then GLOBAL CODE, then VARIABLES, and add an ACTOR variable called "canjump".
2)On your players events, add a collision event (relating to the ground) with a script editor that says:
"canjump = 1;" (THERE SHOULD ALSO BE A COLISSION/PHYSICAL RESPONSE TO THE GROUND AS WELL)
3)On your players keydown event (for whatever your jump button is)make the script say:
if(canjump==1) //this is the one that was wrong
{
yvelocity = -8;
canjump=0;
}
Last edited by
d-soldier on Wed Jul 11, 2007 7:41 pm, edited 1 time in total.