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
70
S
13
G
2
Posts: 989
Reputation: 6,914

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
85
S
27
G
85
Posts: 5,073
Reputation: 57,880

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
70
S
13
G
2
Posts: 989
Reputation: 6,914

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
85
S
27
G
85
Posts: 5,073
Reputation: 57,880

Post » Wed Dec 26, 2012 6:27 pm

This is it.

Thanks, @R0J0hound.
B
70
S
13
G
2
Posts: 989
Reputation: 6,914


Return to How do I....?

Who is online

Users browsing this forum: cgsammu, omnipaws, Yahoo [Bot] and 10 guests