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
3
Posts: 995
Reputation: 7,531

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
91
S
31
G
103
Posts: 5,238
Reputation: 67,762

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
3
Posts: 995
Reputation: 7,531

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
91
S
31
G
103
Posts: 5,238
Reputation: 67,762

Post » Wed Dec 26, 2012 6:27 pm

This is it.

Thanks, @R0J0hound.
B
74
S
13
G
3
Posts: 995
Reputation: 7,531


Return to How do I....?

Who is online

Users browsing this forum: alextro, stevenode, Yahoo [Bot] and 2 guests