Choose function not working

Get help using Construct 2

Post » Wed Dec 26, 2012 11:17 am

I want to randomly select a number between 1 to 3 and run an animation according to the result. I am using the function "choose", but something is not working.





Any help will be appreciated

Thanks
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,051

Post » Wed Dec 26, 2012 11:55 am

It looks fine to me. What is not working, or rather what is happening?

My only thought is perhaps an animation is causing another collision in a frame or two.
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Wed Dec 26, 2012 12:25 pm

Hi @R0J0hound.

The first actions (set angle/set flipped/set mirrored) work very well. Nothing happens after the "choose" function. I include a text field to check if the variable number changes, but always shows "0".

Thanks
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,051

Post » Wed Dec 26, 2012 6:16 pm

That 2nd event is comparing carang1Stolen to choose(1,2,3), you need to set carang1Stolen to choose(1,2,3).
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Wed Dec 26, 2012 6:27 pm

This is it.

Thanks, @R0J0hound.
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,051


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, brunopalermo, PROxMTswatTR, Yahoo [Bot] and 35 guests