edited May 16 in ORK Scripting
Hey, I have a "Burn" status that on Apply, calls a Game Event that shows a dialogue, and on turn end calls another game event for Tick damage. The problem is the game does not wait for these events to finish and continues/ends the turn regardless leading to textboxes replacing each other before they're closed, making it a blocking event did not work either.

Is there a way to make the game wait for these events to play out before continuing and/or ending the turn short of calling the apply animation on every single event that could apply it/checking for every status condition with an animation on every living combatant in the Turn End Event?

On the Burned Status Effect


Post edited by Xavi on
  • Ideally the tick event would play after a combatant performs their battle action, similar to Pokemon
  • Status effect events are 'fire and forget', i.e. nothing waits on them.
    The turn end event however will end the combatant's turn after it's done, so based on the used battle system and setup, the battle will wait for that.

    If you want to wait for stuff in other events to finish before the turn end event can finish, you can e.g. set a global variable (e.g. a float variable to keep track of multiple such events) and have the turn end event wait for it to get back to 0.

    So, your events (e.g. on status effects), add 1 to a global float variable at their start and subtract 1 from it again at the end.
    The turn end schematic has a loop with:
    - check game variables node, checking if global float variable is 0 (probably best using approximately check)
    - fail > wait for 0 seconds (or 0.1) and loop back to check game variables
    - success > continue with event
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.