a problem i had before...

Talk about making games.

a problem i had before...

Postby Kooldudese » Wed Aug 22, 2007 12:43 am

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
Attachments
error.gif
User avatar
Kooldudese
 
Posts: 128
Joined: Sat Jan 27, 2007 5:20 pm
Location: In a house
Score: 0 Give a positive score

Postby J Maker » Wed Aug 22, 2007 12:54 am

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;
Some people believe Chuck Norris evolved from a dinosaur, the Chucknorisaurus.
----------------------------------------------------------------------------------
Chuck Norris doesn't sleep, he waits.
----------------------------------------------------------------------------------
Chuck Norris doesn't hunt, he kills.
----------------------------------------------------------------------------------
Chuck Norris once shot down a german fighter plane with his finger by yelling BANG!!!
----------------------------------------------------------------------------------
User avatar
J Maker
 
Posts: 177
Joined: Fri Jun 22, 2007 4:17 pm
Location: in the stick version of Hyrule
Score: 10 Give a positive score

Postby arcreamer » Wed Aug 22, 2007 1:26 am

that works i just tested it so that should be fine for that guy who asked
arcreamer
 
Posts: 398
Joined: Tue Jul 03, 2007 4:08 pm
Score: 9 Give a positive score

it dident work...

Postby Kooldudese » Wed Aug 22, 2007 11:44 am

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
Attachments
error2.gif
User avatar
Kooldudese
 
Posts: 128
Joined: Sat Jan 27, 2007 5:20 pm
Location: In a house
Score: 0 Give a positive score

Postby metal_pt » Wed Aug 22, 2007 1:33 pm

You forgot the quotes:
Code: Select all
ChangeAnimation("Naruto1","Naruto1Swing1left",FORWARD);
]v[eta[_ - Using GE since June, 15 2007
Currently using v1.3.8 Registered
metal_pt
 
Posts: 117
Joined: Sat Jun 16, 2007 12:57 pm
Location: Sintra, Portugal
Score: 2 Give a positive score

Postby arcreamer » Wed Aug 22, 2007 1:47 pm

and shouldnt it be

else if (left == 0)

instead of (right == 0)
arcreamer
 
Posts: 398
Joined: Tue Jul 03, 2007 4:08 pm
Score: 9 Give a positive score

Postby J Maker » Wed Aug 22, 2007 2:39 pm

wouldn't it be easier to use 1 var?
Some people believe Chuck Norris evolved from a dinosaur, the Chucknorisaurus.
----------------------------------------------------------------------------------
Chuck Norris doesn't sleep, he waits.
----------------------------------------------------------------------------------
Chuck Norris doesn't hunt, he kills.
----------------------------------------------------------------------------------
Chuck Norris once shot down a german fighter plane with his finger by yelling BANG!!!
----------------------------------------------------------------------------------
User avatar
J Maker
 
Posts: 177
Joined: Fri Jun 22, 2007 4:17 pm
Location: in the stick version of Hyrule
Score: 10 Give a positive score

i finnaly got it to work

Postby Kooldudese » Wed Aug 22, 2007 4:38 pm

thx!
(although it was me that fixed it because i just tweaked arownd with the code o.o)
User avatar
Kooldudese
 
Posts: 128
Joined: Sat Jan 27, 2007 5:20 pm
Location: In a house
Score: 0 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron