Giving random features to an object called by a variable?

Get help using Construct 2

Post » Thu Jul 30, 2015 7:47 pm

Hi C2 community! ^^

During an event triggered by a boolean or number variable (which is active when called), how do I give random features (such as opacity, angle and scale) to a newly created object?

I know the functions RANDOM and CHOOSE combined with integer fucntions, but both only work properly when set at the beginning of the layout. :(

I'm also trying to randomly choose an animation of an object in the same case and I'm not getting. Example: "animation"&int(choose(1,2,3))

I think that is a computational logic problem I don't understand...

I thank you in advance your attention and collaboration.
B
39
S
9
G
3
Posts: 259
Reputation: 4,355

Post » Fri Jul 31, 2015 3:42 am

After the condition triggers that creates the object, use "On Object Created"

On Object Created>Player>Set Opacity>random(100)
On Object Created>Player>Set Animation>choose(Animation_1,Animation_2,Animation_3)
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Fri Jul 31, 2015 5:07 am

Thanks for the help, @TheDom, but I tried this function before and don't worked here. :(
B
39
S
9
G
3
Posts: 259
Reputation: 4,355


Return to How do I....?

Who is online

Users browsing this forum: asdtricky, pmerineau, Yarfapet and 12 guests