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
39
S
22
G
11
Posts: 492
Reputation: 9,925

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
46
S
16
G
73
Posts: 2,084
Reputation: 43,677

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

Image
B
65
S
23
G
7
Posts: 1,501
Reputation: 10,888

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
39
S
22
G
11
Posts: 492
Reputation: 9,925

Post » Sat Nov 05, 2016 2:35 pm

To all three of you, thanks for the confirmation
ImageImageImage
B
39
S
22
G
11
Posts: 492
Reputation: 9,925


Return to How do I....?

Who is online

Users browsing this forum: MikaelS, nahima, Shenkai the ssj and 25 guests