Logic of Player movement

Blitz3D Forums/Blitz3D Beginners Area/Logic of Player movement

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi there, I've been looking at Imagepacker - http://homepage.ntlworld.com/config/imagepacker/ and it is really good. I got a small character who has 2 image in a 'pack'. He has a standing animation and a running animation, I'm getting stuck on the logic behind this, and wondered if anyone could help.

Here is my bit of code

	If count Mod 6=0
		PositionSprite hero_sprite,hero_x,hero_y,hero_sprite\frame+1
	EndIf
	
	If KeyDown(205) Then 
		hero_x=hero_x+1 
		hero_change=hero_change+1 
		hero_walk=hero_walk+1
	EndIf
		
	Select hero_change
		Case 1
			If hero_walk=1 Then ChangeSprite hero_sprite,"hero_walking_frame_final" 
			
		Default
			If hero_walk=1 Then ChangeSprite hero_sprite,"hero_standing_frame_final"
			hero_change=0
			hero_walk=0
	End Select


My logic is flawed here with the changesprite, and I wondered what many people do when they want to change the character animation, when clicking on the right cursor.

Any help would greatly be appreciated

Many thanks