Wait loses loopindex and function.param

Get help using Construct 2

Post » Sat Nov 05, 2016 1:54 pm

Not sure where to post this, don't think it is a bug but not sure it is really intended. Just felt like posting this so others are aware since it took me a little troubleshooting to figure out. (I try not to use wait anyway so am happy using different events)

In short, if you use wait in a loop you may lose the values of the loopindex and parameters passed through function. I say may because I couldn't tell if my code was working how desired or not so used textbox to monitor—which is how I found this.

capx: https://www.dropbox.com/s/f1pq9ervg9bv8 ... .capx?dl=0

Events:
Image

Result: (left without wait and right with a wait)
Image
ImageImageImage
B
44
S
26
G
11
Posts: 518
Reputation: 10,502

Post » Sat Nov 05, 2016 2:02 pm

Yeah I can't exactly remember why but if you start using wait inside functions the parameters return zero.
B
47
S
18
G
84
Posts: 2,261
Reputation: 49,776

Post » Sat Nov 05, 2016 2:04 pm

B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Sat Nov 05, 2016 2:26 pm

B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Sat Nov 05, 2016 2:31 pm



Not sure it is "intended" but more necessary. Anyway, didn't figure this would be new to everyone—I may have even read that in the manual but forgot, ha
ImageImageImage
B
44
S
26
G
11
Posts: 518
Reputation: 10,502

Post » Sat Nov 05, 2016 2:35 pm

To all three of you, thanks for the confirmation
ImageImageImage
B
44
S
26
G
11
Posts: 518
Reputation: 10,502


Return to How do I....?

Who is online

Users browsing this forum: irina and 6 guests