Playmaker Forum

PlayMaker News => General Discussion => Topic started by: Rabagast on July 06, 2013, 01:52:56 PM

Title: Random Color
Post by: Rabagast on July 06, 2013, 01:52:56 PM
Hi!

How can I set up a random color in Playmaker?
I tried to use "Select Random Color" But nothing happened.
I want it to change the color every time I destroy the cube and it respawn.
Thanks  :)
Title: Re: Random Color
Post by: jeanfabre on July 09, 2013, 03:01:05 AM
Hi,

 Maybe you do get a random color but you don't assign it properly to your gameObject?

bye,

 Jean
Title: Re: Random Color
Post by: escpodgames on July 09, 2013, 03:05:09 AM
Or maybe you didn't set any colors? or all the weights are at zero :S

I think we need more info, maybe a screen shot of the action?
Title: Re: Random Color
Post by: Red on July 21, 2013, 08:42:09 PM
Well, if you are having difficulty with the action a workaround (if you want truly random colours) could be to use a random float between 0 and 255 three times, compile that into a colour variable and use that instead?

it'd give you truly random though and might not be very visually appealing depending on the aesthetic you're aiming for... but hey, if one method doesn't work another one might.

But yeah... i've not encountered any issues with the random colour action personally so maybe can you share a screenshot of how you have it set up?
Title: Re: Random Color
Post by: Rabagast on July 28, 2013, 08:14:58 AM
Hi!
Thanks for the answers. And sorry for late reply. I will take a look at it first :)
Title: Re: Random Color
Post by: Red on August 09, 2013, 05:14:51 PM
Cool... though something I think i shoudl correct... the randoms seem to be integers, not floats... apologies, it didn't clue in that the colour variables use integers...