How to prevent function parameter loss when adding system wait 1 second in event
thanks
Try assigning it to another local variable within the function declared static. However, this could have issues with multiple calls to the same function within the 1s, where the variable could get reassigned while the wait is active and could be tough to debug. Perhaps look at using a timer (with tags) assigned to an object instead, and use the function to start the timer and the timer end trigger to do the next action(s).
construct.net/en/make-games/manuals/construct-3/behavior-reference/timer
Interestingly, the new Functions in C3 don't have this problem. You can use wait inside the function, call it multiple times and it will still remember its parameters.
Develop games in your browser. Powerful, performant & highly capable.
Use the new built-in functions. They remember function parameters even after a 'Wait'.