strange gravity/yvelocity problem
Posted: Tue Oct 01, 2013 2:41 pm
hi! i fiddled around a bit with yvelocity and canjump variable. my first try was successful, then GE crashed and i had to start over, now my actor is sort of bouncy when jumping, it looks weird. i have tried changing the values of Draw Actor>Script Editor> yvelocity=+XX; a bit but i just can't seem to get it to work properly, im gonna post all the entries i think are important below.
first off i made a variable called "canjump" (actor, integer)
then i made some entries :
Script: player -> Draw Actor
Script Editor: player -> Key Down (w, Atleast one key is pressed)
Script Editor: player -> Collision (Top side of floor2)
does anybody know what i did wrong, or what can produce this choppy bouncy behavior?
thanks!
first off i made a variable called "canjump" (actor, integer)
then i made some entries :
Script: player -> Draw Actor
- Code: Select all
yvelocity = + 8;
Script Editor: player -> Key Down (w, Atleast one key is pressed)
- Code: Select all
if(canjump==1)
{
yvelocity=-50; //i have tried lower values here aswell
canjump=0;
}
Script Editor: player -> Collision (Top side of floor2)
- Code: Select all
canjump=1;
does anybody know what i did wrong, or what can produce this choppy bouncy behavior?
thanks!