Help!! Arrays are trying to kill me!!!

Get help using Construct 2

Post » Tue Jun 13, 2017 12:00 pm

First of all, thank you all great developers here who have been super patient with me on your replies.


I need some help solving this problem with another array. I have been doing all I can and am starting to understand how they work.

Well basically, I want to build a simple application on which ON START OF LAYOUT SYSTEM RANDOMIZES A QUESTION ( AND AFTER IT HAS BEEN SHOWN ON THAT LAYOUT IT WILL NOT APPEAR AGAIN) . USER WILL HAVE TO CLICK ON CORRECT ANSWER TO SCORE. I can handle the GLOBAL VARIABLES, SCORE AND All that.

Just wanted to know how to make SYSTEM RANDOMIZE QUESTIONS AND THENDESTROY THEM AFTER THEY HAVE APPEARED IN AN ARRAY.

Can anyone help, please. Below is a single file of what I need. Thank you!!!!!!!! :)

http://geocities.ws/kikoriogames/APK/Test.capx
B
19
S
4
G
2
Posts: 97
Reputation: 2,244

Post » Tue Jun 13, 2017 4:59 pm

Your random(0,1) will not work. It will only return 0.

You need to use round(random(1)) if you want it to randomly return 0 or 1.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Tue Jun 13, 2017 5:04 pm

I think round goes up.
Maybe try choose(0,1)
Image ImageImage
B
169
S
50
G
174
Posts: 8,331
Reputation: 110,806

Post » Wed Jun 14, 2017 10:21 am

Thank you, people! :)
B
19
S
4
G
2
Posts: 97
Reputation: 2,244

Post » Wed Jun 14, 2017 3:07 pm

newt wrote:I think round goes up.
Maybe try choose(0,1)


Last I tested it seemed to go both ways.

random(1) returns 0.000 to 1.000 and round() sent it both up or down.

ceil() goes up for sure.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Wed Jun 14, 2017 4:36 pm

Ok, I guess he changed it.
I seem to recall someone reporting it as a bug at some point.
Image ImageImage
B
169
S
50
G
174
Posts: 8,331
Reputation: 110,806

Post » Wed Jun 14, 2017 10:06 pm

I've always used
Code: Select all
floor(random(min,max+1))
B
41
S
12
G
1
Posts: 69
Reputation: 2,957

Post » Wed Jun 14, 2017 10:33 pm

^^^^ When its about a 'choosing' random. I always do that too.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Jun 23, 2017 2:53 pm

99Instances2Go wrote:^^^^ When its about a 'choosing' random. I always do that too.


Thank you.:)
B
19
S
4
G
2
Posts: 97
Reputation: 2,244

Post » Fri Jun 23, 2017 2:54 pm

99Instances2Go wrote:^^^^ When its about a 'choosing' random. I always do that too.


Thank you.:)
B
19
S
4
G
2
Posts: 97
Reputation: 2,244

Next

Return to How do I....?

Who is online

Users browsing this forum: Artcadev, brunopalermo, R0J0hound, Yahoo [Bot] and 19 guests