playMaker

Author Topic: Disable Max Loop Count (Want Infinite Loop) [SOLVED]  (Read 1662 times)

Sebby

  • Playmaker Newbie
  • *
  • Posts: 7
Disable Max Loop Count (Want Infinite Loop) [SOLVED]
« on: November 26, 2016, 12:29:02 PM »
I'm Trying to make a Dice Spinner (Outcomes, 0, 1, and 2)

On First Click the Dice Spins through the different images (Switching the sprite)
And on Second Click it chooses a random number between 0 and 2, and changes the sprite to reflect that.

Everything works great, except I know I've created an infinite loop, with the first click literally looping through the Sprites.

I have it set on a .1 second to switch timer, so I can see it's working exactly how I need it to, but I know once it loops 1000 times, the game will crash.

Is there any way to set the max loop to infinite, so I can accomplish this? or just a better way to do the same thing?

Screen Shot Attached
« Last Edit: November 26, 2016, 08:15:56 PM by Sebby »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Disable Max Loop Count (Want Infinite Loop)
« Reply #1 on: November 26, 2016, 06:42:02 PM »
Hi,
you can add a 'next frame event'
then it will loop 1x each frame

now it loops 1000+ in a single frame, which i think you dont need in your case

Sebby

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Disable Max Loop Count (Want Infinite Loop)
« Reply #2 on: November 26, 2016, 08:15:37 PM »
Beautiful!   That's exactly what I was after,
Thank You.