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
48
S
27
G
11
Posts: 549
Reputation: 10,772

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
52
S
21
G
92
Posts: 2,405
Reputation: 54,498

Post » Sat Nov 05, 2016 2:04 pm

B
87
S
22
G
15
Posts: 1,041
Reputation: 15,353

Post » Sat Nov 05, 2016 2:26 pm

B
67
S
24
G
7
Posts: 1,519
Reputation: 11,104

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
48
S
27
G
11
Posts: 549
Reputation: 10,772

Post » Sat Nov 05, 2016 2:35 pm

To all three of you, thanks for the confirmation
ImageImageImage
B
48
S
27
G
11
Posts: 549
Reputation: 10,772


Return to How do I....?

Who is online

Users browsing this forum: saour, work3 and 2 guests