how do u rotate the player on a key down event eg
if you press the right arrow key he starts to rotate right and same for left
if(animpos > nframes)animpos = 0;
if(animpos < 0)animpos = nframes;
Sgt. Sparky wrote:make the pre-rotated images and have them all in one animation,
make sure it is rotating starting with the player pointing right,
make it rotate all around(right to left) to the right again.
and lets say you pressed the left key(repeate enabled): animpos += 1;
and for the key down event of right(also repeat enabled):animpos += 1;
and for the draw actor event use,
- Code: Select all
if(animpos > nframes)animpos = 0;
if(animpos < 0)animpos = nframes;
Users browsing this forum: No registered users and 1 guest