godot-escoria / escoria-issues

Central Escoria issue tracker
3 stars 0 forks source link

Selective interrupts #371

Open balloonpopper opened 1 year ago

balloonpopper commented 1 year ago

Is your feature request related to a problem? Please describe. In my project, the player walking into a trigger area causes a script to run. The script runs multiple commands.

e.g. This is the script attached to ESCItem "WalkingScripts"

:OfficerBrownHairWalkEvent
    walk_to_pos_block($OfficerBrownHair, 832, 890)
    walk_to_pos_block($OfficerBrownHair, 562, 890)
    walk_to_pos_block($OfficerBrownHair, 376, 774)

I want these to run, regardless of what the player does while they're running. I've tried scheduling the above event on a separate channel for this reason

queue_event($WalkingScripts,"OfficerBrownHairWalkEvent","BrownHairWalkChannel")

If the player clicks to walk somewhere while this script is running, the interrupt interrupts all channels, which means the current walk_to completes, but the remaining ones are never run.

Describe the solution you'd like