Change my item spawn colour

Get help using Construct 2

Post » Tue Jul 22, 2014 12:08 am

:idea: Hi I have a bar which random spawns using a function but I would like it to spawn it a random colour every time. I have different animations for the colour but can't seem to figure it out
You do not have the required permissions to view the files attached to this post.
Image
B
29
S
8
G
1
Posts: 120
Reputation: 2,837

Post » Tue Jul 22, 2014 12:15 am

Set the animation speed to 0, then on events (at the point your image shows there) you add "Set frame to floor(random(5))"
random(5) gives you a number from 0 to 4.99... floor() rounds it down to 0, 1, 2, 3 and 4
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Tue Jul 22, 2014 4:34 pm

Thank you @7Soul exactly what I wanted :)
Image
B
29
S
8
G
1
Posts: 120
Reputation: 2,837


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests