Sprite Movement

Game Editor comments and discussion.

Sprite Movement

Postby catacomber » Wed May 14, 2008 2:24 am

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.
Attachments
Archer.png
User avatar
catacomber
 
Posts: 195
Joined: Fri Sep 28, 2007 5:36 pm
Score: 10 Give a positive score

Re: Sprite Movement

Postby DST » Wed May 14, 2008 4:26 am

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.
Attachments
axer.zip
(83.4 KiB) Downloaded 97 times
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Sprite Movement

Postby catacomber » Wed May 14, 2008 4:34 am

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. : )
User avatar
catacomber
 
Posts: 195
Joined: Fri Sep 28, 2007 5:36 pm
Score: 10 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron