Page 1 of 1

Sprite Movement

PostPosted: Wed May 14, 2008 2:24 am
by catacomber
Am having trouble with my sprite movement in an rpg/strategy type game. I have a sprite strip including 9 positions (1 is a dead position). F.e., Stop left, stop right, walk left, walk right, attack left, attack right, etc. I'm attaching the strip so you can see what I mean. In a sprite strip the sprites don't have identifying numbers (although they did before I added them to the strip).

The sprite moves alright but doesn't change its position. It's always facing left in a stopped position. Any ideas? Any demo that would help me? Should I not use a strip?

All I want is for my little archer guy to be able to move left, right, up and down. He doesn't have to jump at all. I can't make any more progress in my game until I solve this. Any help is appreciated. If I'm not being clear, please ask me questions.

Re: Sprite Movement

PostPosted: Wed May 14, 2008 4:26 am
by DST
Ok here's the demo i promised. hope it helps.

Notice how simple the code in player's draw actor is;
also note that i simplified the left right up down code, and added an animpos command in 'key down right' to compensate for the fact that right is angle '0' and doesn't meet the 'if' command in the draw actor.

Re: Sprite Movement

PostPosted: Wed May 14, 2008 4:34 am
by catacomber
He's a very funny, cute, aggressive guy! Will see if I can duplicate the code so that it works for my little guy. Thanks. Will be back to you. : )

:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D

Hit the space bar to wield the axe. : )