**Question: **How do I make the player use a different part of the sprite file?
**What I’m Trying To Do: **I’m trying to make the player sprite use a certain part of the sprite file (for example, using an attack animation, then timer, then the next frame of the attack animation. another is that i want the player to use a certain part of the sprite for a casting animation). I also need this for NPCs and paperdolls. Could also help if its global/everyone could see the sprite change.
**What I’ve Tried: **I’ve studied a bit of how the part of the sprite is decided and I think these are related to what I need, but I’m not quite sure:
With rec .Top = spritetop * (Tex_Character(Sprite).Height / 4) .Bottom = .Top + (Tex_Character(Sprite).Height / 4) .Left = anim * (Tex_Character(Sprite).Width / 5) .Right = .Left + (Tex_Character(Sprite).Width / 5) End With
' Check for attacking animation If MapNpc(MapNpcNum).AttackTimer + (attackspeed / 2) > GetTickCount Then If MapNpc(MapNpcNum).Attacking = 1 Then anim = 4 End If Else