The Daily Click ::. Forums ::. Klik Coding Help ::. need help i have no idea how to use a random multiple object
 

Post Reply  Post Oekaki 
 

Posted By Message

ig299



Registered
  27/10/2014 04:34:16
Points
  230
12th May, 2016 at 12/05/2016 05:59:05 -

Hello guys, can anyone on here demonstrate to me how to use random multiple object?

 
111111games

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
12th May, 2016 at 12/05/2016 17:23:33 -

What are you asking exactly?

How to pick a random object? There is a condition for that.

Just use "pick random object" condition for a particular object then assign an action to that object in the event editor. Then whenever that condition is reached the action will be performed on a random instance of that object.

If you want to include multiple object types use a qualifier.

 
n/a

Pan-tosser



Registered
  24/10/2008
Points
  520

Has Donated, Thank You!
12th May, 2016 at 12/05/2016 18:44:59 -

I use to get frustrated with selecting random objects. I'd want a state machine to read a random value, and make choices from the picked value. Example random = 1 than hit. Then assign the choice it made to a random object.

I found it picked the same object every time. That's because the code cycled threw all the qualifiers. Ending on the last one that was created.

My solution was to set up alterable values to serve as timers. And only when the value serving as a timer = 0. Then the code assigns the random value to a object.

Not everyone uses timers. But they helpful. They can keep other lines of code from overwriting things you set. Of course their is always spread value and fastloops. That's another route you could take.

 
https://www.facebook.com/nathon.brown.7
   

Post Reply



 



Advertisement

Worth A Click