(solved) Stop running code

Super simple and maybe im missing it, but how do I stop code in the middle of a block? I just need an action that ceases the current event. Basically looking for an equivalent of Javascript return; :slight_smile:

I am not sure if there is an action for that. You can always use a variable that you check for each section?

That’s not possible. It also cannot be added as GDevelop generates each (sub)event as a separate function, meaning each function call would have to have a check to make sure it returns directly if the call returned, which would add way too much overhead for little gain.

I ended up doing essentially this.
I added a scene Boolean set to false, then added extra conditions within my “while…repeat” to check the boolean.

Thanks!

1 Like