How do I pick random action

Get help using Construct 2

Post » Fri Apr 18, 2014 9:47 am

How i can pick a only one random action of a list of actions.

In my case i have an object and when the player use it, a only one random advantage appears.

Thanks.
B
6
S
1
Posts: 46
Reputation: 492

Post » Fri Apr 18, 2014 10:21 am

This is how you can do it!

Create a global variable lets say Advantage or powerUp

Condition -: The player has object or object variable has [some value]
Keyboard press "E"

Action -: set variable advantage random(0,9)

Then compare PowerUp value and set conditions for each power up or advantage values

well for more check out the capx r166 ver.
You do not have the required permissions to view the files attached to this post.
Every Game is a Good Game it's just few people like and few does not! Keep coding people some day you will be a "NOTCH".
B
21
S
6
G
3
Posts: 85
Reputation: 4,607

Post » Fri Apr 18, 2014 11:30 am

Thanks, it works :)
B
6
S
1
Posts: 46
Reputation: 492


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests