playMaker

Author Topic: Random Color  (Read 4441 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Random Color
« 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  :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Random Color
« Reply #1 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

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Random Color
« Reply #2 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?

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Random Color
« Reply #3 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?

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Random Color
« Reply #4 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 :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Random Color
« Reply #5 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...