Flip animation horizontally - Help with logic please!
Hi All,
I'm a Game Salad newbie and I'm having a bit of trouble flipping a character to turn and face the different direction when left/right key is pressed.
I've tried a few combinations but I can't quite get it to work!
Could someone please help with the logic please?
Here's what I've tried to turn and face and walk left (please forgive any slight discrepancy as typing this on my phone from work!)
1) set up a new rule that when the right arrow key is down
2) set attribute up in self.graphic.fliphorizontal = false
3 set a change attribute behaviour up that self.graphic.fliphorizontal = true
4) I add the move attribute here
5) I add the animation here
I can get the animation to work and the character to move left and right whilst animated, but i just can't get the character to 'flip'
Any ideas please? I think if someone can figure this out so that I can work out how the logic works in Gamesalad then hopefully I'll be good to go!
Many thanks,
Chris
Comments
You have right arrow key down self.horizontal.flip. False?
I'm not at my computer either. I would try switching right key false and left key true.
I will send a test project that I think will make sense. I guess my next question. Is there any other states of movements? What does the object do when neither right key or left key is pressed?
Thanks Toque, but sorry to be a pain but I can't view that youtube video. It says it is private?
I'm also getting a private video story..
sorry it was early in the morning here.
Demo
https://www.dropbox.com/sh/c6oe429daj717dj/AACFScOa_7zm5DT74gMn5shaa?dl=0
Thanks Toque, I'm not back home until tomorrow afternoon now to try this, but I will be sure to come back and reply after I've tested it.
Many thanks for your help
Chris
@chrisrowley1981 Hey Chris, here's how I do it.
Thanks RowdyPants,
Likewise, as soon as I can test it tomorrow I'll be sure to post to feedback
Thanks
Chris
@chrisrowley1981 This version has an idle animation to toggle between standing and running.
Thanks to you both for the suggestions, really annoying I've checked mine after looking at your demos and realised the error was because I had 'True' and 'False' and not lower case 'true' and 'false'!!! Oh well, lesson learned!
Thanks for the help guys, much appreciated!