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
65
S
13
G
2
Posts: 986
Reputation: 6,766

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
82
S
26
G
62
Posts: 4,831
Reputation: 45,202

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
65
S
13
G
2
Posts: 986
Reputation: 6,766

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
82
S
26
G
62
Posts: 4,831
Reputation: 45,202

Post » Wed Dec 26, 2012 6:27 pm

This is it.

Thanks, @R0J0hound.
B
65
S
13
G
2
Posts: 986
Reputation: 6,766


Return to How do I....?

Who is online

Users browsing this forum: hsetiawan, newt, yenleidong and 2 guests