Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
How to prevent function parameter loss when adding system wait 1 second in event
Develop games in your browser. Powerful, performant & highly capable.
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).
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.
Use the new built-in functions. They remember function parameters even after a 'Wait'.