I've run into a new problem that I didn't manage to resolve by myself. Here is the simplified code :
When spriteButton is touched (trigger once), set Object.instanceVariable to true (can only be triggered once by half second, with a cooldown mechanism)
"Object" spawn object "icon"
wait 4 seconds
"icon" start flashing for 1 second
wait 1 second
set object.instancevariable to false
This works perfectly as long as I never repress the button while the script is running, but I would like the player to play the script multiple times during the initial 5 seconds.
As it is, when I re-run the script while it is still active, a second icon will be created and the instancevariable will be set to false 5 seconds after the first launch, because the first script is still running and will set the variable to false
So my question resumes to : How can I cancel a wait time (or a whole event) in order to start a new one with the wait time back to 0?
I tried putting the wait part inside a group and deactivationg the group then reactivating it, but it doesn't seems to work.
Thanks for your help !