Function parameters don't stay throughout (wait)

Bugs will be moved here once resolved.

Post » Tue Sep 23, 2014 2:50 pm

Problem Description
The parameters of an event don't hold true throughout the duration of the event if a Wait command is given. If you set all values off of the Function's parameters at the start of the event, it fires accurately. If you call those parameters after any kind of wait, they are gone. This may be by design, possibly to try to not screw with other possible function calls or recurring calls, but I felt it odd that the values were reset to 0 instead of just kept the same unless replaced.

Attach a Capx
functionwait.capx



Description of Capx
This Capx uses a button (click) to set three text boxes. One with the text, one with a wait (won't work), and one with a workaround.

Steps to Reproduce Bug
  • Create objects, including adding the Function and Mouse (or other input) objects
  • Create an event call with a Wait before you use a particular parameter
  • Activate the function (call it)
  • The parameters only exist at the start of the event. Otherwise, they are reset to 0.

Observed Result
Parameters are immediately reset to 0 after the initial firing of the event.

Expected Result
I would expect the parameters to remain consistent within the scope of that call/event unless otherwise set. Probably how a variable would work is what I was thinking.

Affected Browsers
  • Chrome: YES
  • FireFox: [didn't test]
  • Internet Explorer: YES

Operating System and Service Pack
Windows 8.1

Construct 2 Version ID
181 (64 Bit) checked
You do not have the required permissions to view the files attached to this post.
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Post » Thu Sep 25, 2014 1:47 pm

Closing as by design. If you 'wait' in a function call, you are waiting until the function call has completed so the function parameters no longer exist. Everything is working correctly here.
Scirra Founder
B
397
S
236
G
88
Posts: 24,408
Reputation: 194,506


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 6 guests