if("whatever your health variable is here"<1)
{
"create actor event here"
}
Rule-Buster wrote:so your going to get this thing going agian?
Rule-Buster wrote:did ya tell them how to keep your actor from jumping infanitly? (i'm embarrased to say... but i need to know that...)
did ya tell them how to keep your actor from jumping infanitly? (i'm embarrased to say... but i need to know that...)
canjump = 1;
if(canjump==1)
{yvelocity = yvelocity -10;
canjump = 0;}
canjump = 2;
if(canjump==2)
{yvelocity = yvelocity -10;
createtimer jump_timer;}
canjump = 1;
if(canjump==1)
{yvelocity = yvelocity -10;
canjump = 0;}
supa-tails wrote:For beginers who want to move or jump.
First add an animation using either 1 page of sprites organized from up to down, or have different files and name them the same.(tailsfly1 tailsfly2 tailsfly3)
Then add keydown and press the right button, then do a script editor: x = x + 8; and also add a change animation.
And for the left type left type x = x - 8;
Then click on the upper button saying script, and global code, then click the bottom right button saying Variabals and click add, then type canjump.
Then make a ground actor called ground or something and add a collision on the player and a script editor saying: canjump = 1; Then add a collision, physical response, 1
1
0
1
And add it.
THEN add a key down and press your jump button, then script editor saying:
if(canjump==1)
{
yvelocity = -8;
canjump=0;
}
THEN add a global code/variabal called floater.
AND LAST BUT NOT LEAST, add a draw actor for your player and a script editor saying:
if (floater==0)
{
yvelocity += .3;
if(yvelocity > 20) yvelocity = 20;
}
if (floater==1 && canjump==0)
{
yvelocity += .2;
if(yvelocity > 20) yvelocity = 20;
}
![]()
![]()
THE END!!!
![]()
![]()
Users browsing this forum: No registered users and 1 guest