Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: coxy17 on October 19, 2016, 01:34:29 PM

Title: Changing sprite per second and touch detect [SOLVED]
Post by: coxy17 on October 19, 2016, 01:34:29 PM
Hi

I'm after creating a constantly changing image  (sprite) with various images. But only showing 1 per second. Then when the user clicks the screen I need to detect which sprite was visible upon touch.

I know how I can do the touch detect.  I just need help with the best approach to switching the sprite images quickly and stopping upon touch. Any help would be great

Nick
Title: Re: Changing sprite per second and touch detect
Post by: djaydino on October 19, 2016, 05:14:20 PM
Hi,
I would use an array.
Place you sprites in the array and @ runtime get them each sec and store the index nr.
With the index nr you know which image is visible.
Title: Re: Changing sprite per second and touch detect
Post by: coxy17 on October 20, 2016, 09:07:40 AM
thanks for this, ive looked into arraymaker and it seems that i can use the hashtables to achieve what im after.