How do I randomly choose from multiple objects?

Just started using Construct 2? Post your questions here

Post » Thu Feb 11, 2016 2:10 am

Hello.
I'm trying to make it randomly choose from 3 text box objects. Condition System Pick seems like the best option, but it only does one object only. Is there anyway other way you can do this? I heard that you can use families, but i don't have the license yet to use it. I'm open though to use plugins and would be happy to try them out to solve this. Thanks. (Also small question. How can you say not equal to in C2? I tried the symbol and didn't work)
B
10
S
2
Posts: 25
Reputation: 670

Post » Thu Feb 11, 2016 2:41 am

I managed to do it using a simple sprite containing an instance variable called "Number" as a "brain" that obtained a random 1-3 via choose action and called on the box with that number in three events... the extra actions/events you see were a separate text box to bug test choose result to screen and to make the chosen text box spin around when chosen.

Pic:
https://drive.google.com/open?id=0Bx-ufu2WID53TV9PSnZWbG1lazQ

How can you say not equal to in C2? I tried the symbol and didn't work

Use invert, right click the condition in the event and select the red X. It inverts the condition to a NOT state.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
54
S
15
G
8
Posts: 608
Reputation: 8,767


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests

cron