Choose Expression Not Working?

Bugs will be moved here once resolved.

Post » Mon Apr 15, 2013 5:27 pm

Link to .capx file (required!):
Choose Problem Capx

Steps to reproduce:
1. Observe in code that asteroids are created every x seconds. In this case, there are three rows with different creation times.
2. Run the capx and wait for about 10 seconds.

Observed result:
The second line of asteroids is the same as the first line.

Expected result:
The second line of asteroids should have a gap sometimes....like the third line. So, the choose is just picking the first number in the list.

Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: yes

Operating system & service pack:
Windows 8

Construct 2 version:
123.2kenhes2013-04-15 17:55:51
B
19
S
3
G
2
Posts: 212
Reputation: 4,011

Post » Mon Apr 15, 2013 7:08 pm

Closing as duplicate of this issue. Currently 'every tick' still evaluates the seconds count every tick, which means "every choose(3, 6) seconds" most likely just runs every 3 seconds. Workaround: use a variable (every 'secondstime' seconds), and change the variable again in the event.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Mon Apr 15, 2013 8:15 pm

Got it. Thanks.
B
19
S
3
G
2
Posts: 212
Reputation: 4,011


Return to Closed bugs

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests