Function parameters don't stay throughout (wait)

0 favourites
  • 2 posts
From the Asset Store
Tap the ball, control it, avoid touching spikes and score higher!
  • 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

    [attachment=0:2sa9gl68][/attachment:2sa9gl68]

    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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)