[solved] This was supposed to be a door-opening sequence

Level 16
Joined
Feb 22, 2025
Messages
315
Edit: Solved, leaving this here as a record of my brief descent into timer psychosis.

So... I just discovered Bribe’s precise Lua wait system :D… and I was today years old when I realized it solves exactly the problem I’ve been wrestling with for eons.

Unfortunately, my map is fully JASS, so switching to Lua now would basically nuke everything. 💀

Which brings me to my actual problem: I’m trying to convert a simple entrance sequence , but doing it with step-based timers quickly turns into a too much for 10 secs of gameplay.

I do already have a cinematic engine (step + delay + loop system), but I’m not sure if it's suitable( but I feel this is my safest option for now) for gameplay sequences like this.

So my question is:

? Is reusing a cinematic step system the correct approach for co-op-safe sequencing, or is there a cleaner pattern I’m missing here in JASS.

Also, I considered something like this:

JASS:
function DelayedAction takes nothing returns nothing
    // delayed logic here
endfunction

function DoSomething takes nothing returns nothing
    local timer t = CreateTimer()

    // do A
    call BJDebugMsg("Doing A")

    // schedule B after 1.00 sec
    call TimerStart(t, 1.00, false, function DelayedAction)
endfunction

But yet again, this still isn’t really a “true wait” replacement — it just splits the logic into callbacks, which gets messy pretty fast for longer sequences.

.. Was thinking about options, so better ask.. :

1. Cinematic Engine - step based

2. Single Trigger State machine - if-else-if chain keyed

3. JASS (f) - but this is tricky since ExecuteFunc and global variables to simulate coroutines; I could call exmpl. PreciseWaitCoop ; but I believe this is not a standard pattern and is hard to implement and debug.

 
Last edited:
Back
Top