character.animate in different directions? [SOLVED]

Started by Mac, Thu 16/11/2006 15:39:17

Previous topic - Next topic

Mac

I currently have a jumping animation that plays when the up key is pressed, but I am unsure how I could make the direction of the jump animation corelate to the direction the character was already standing in. I'm thinking I would need to get the current loop number? I looked at "Loop property" in the manual which seemed to be what I wanted ("Gets/sets the character's current loop number) but there wasn't much information on how I would actually use that in this circumstance. Am I going the complete wrong way? Is there a much simpler way to do this?

Ashen

#1
This question from not to long ago deals with pretty much this problem. (The title's not very clear, though, don't know how I missed that...) Just supply Character.Loop as the 'loop' parameter for the Character.Animate command, e.g.:
Code: ags

cEgo.Animate(cEgo.Loop, 3);


EDIT: That's why descriptive titles are important, for searches. I changed the title of the other thread after posting here, so it might not have turned up in your search.
I know what you're thinking ... Don't think that.

Mac

Sorry, I had done a search. Guess I searched for the wrong thing. But anyway, thanks very much, that works brilliantly.

R4L

You should look into Bernie's Gravity code. Its quite good.

SMF spam blocked by CleanTalk