Page 1 of 1
a problem i had before...
Posted:
Wed Aug 22, 2007 12:43 am
by Kooldudese
i have already asked this question before but i havent gotten it to work yet, its about when standing to right when you press atk you atk right when standing to left when you press atk you atk left this is the post i had before "http://game-editor.com/forum/tp-3442-How-do-you-make-it-so-that-if-the-person-is-standing-to-the.html"
anyway, ill post a pic of the code and hopefully you can help me fix it
Posted:
Wed Aug 22, 2007 12:54 am
by J Maker
try:
- Code: Select all
if (atkdirection == 1)
{
ChangeAnimation("Event Actor", "your atk_animation_right", FORWARD);
}
else if (atkdirection == 0)
{
ChangeAnimation("Event Actor", "your atk_animation_left", FORWARD);
}
then add on script editor of kedown right:
- Code: Select all
atkdirection = 1;
then on keydown left:
- Code: Select all
atkdirection = 0;
Posted:
Wed Aug 22, 2007 1:26 am
by arcreamer
that works i just tested it so that should be fine for that guy who asked
it dident work...
Posted:
Wed Aug 22, 2007 11:44 am
by Kooldudese
this is what i did, i tried to make it just like your code so if you can find out what is wrong here plz help
Posted:
Wed Aug 22, 2007 1:33 pm
by metal_pt
You forgot the quotes:
- Code: Select all
ChangeAnimation("Naruto1","Naruto1Swing1left",FORWARD);
Posted:
Wed Aug 22, 2007 1:47 pm
by arcreamer
and shouldnt it be
else if (left == 0)
instead of (right == 0)
Posted:
Wed Aug 22, 2007 2:39 pm
by J Maker
wouldn't it be easier to use 1 var?
i finnaly got it to work
Posted:
Wed Aug 22, 2007 4:38 pm
by Kooldudese
thx!
(although it was me that fixed it because i just tweaked arownd with the code o.o)