# Possibility Using variables

Get help using Construct 2

### » Sun May 26, 2013 5:17 pm

How can I make a Possibility Calculator between yes and No.

I mean that it will pick random and add 1 to yes OR no (1000 times) then The word (yes/no) which has the greatest numbers will show below.

I have tried To Make It But I Is not Working

THANKS FOR ANY HELP
Banned User
B
33
S
6
G
5
Posts: 116
Reputation: 6,450

### » Sun May 26, 2013 6:36 pm

I use functions because it's easier to control (for me atleast
Yes/No = Variables

Repeat 1000
-- Call Choose(1,2)
-- Wait DT

If 1 is called

If 2 is called

... You can guess the rest
B
44
S
18
G
17
Posts: 2,249
Reputation: 17,585

### » Sun May 26, 2013 9:06 pm

Why not just do this:

Button | On clicked |    Text | Set YesNo to floor(random(2))

|_Text | YesNo = 1 |   Text | Set text to "yes"

|_Text | YesNo = 0 |   Text | Set text to "no"
B
8
S
1
Posts: 5
Reputation: 550

### » Mon May 27, 2013 7:56 am

@Whiteclaws

I Tried to Make It But It Is Not Working!

capxAshesh2013-05-27 08:26:23
Banned User
B
33
S
6
G
5
Posts: 116
Reputation: 6,450