how do I switch between sprites through a button
on clicking on a button ( or arrow ) it switch to the next object ( sprite ) till the last on then recycle the list or toggle to the beginning ?
thanks for advance
make a sprite with a different image on each frame
set the speed to 0 so that it doesnt animate
then when you press your button
On button press -> set sprite.frame - > sprite.frame +1
if sprite.frame = sprite.totalframes -> set sprite.frame = 0
Develop games in your browser. Powerful, performant & highly capable.
thank you justifun