Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selective interrupts #371

Open
balloonpopper opened this issue Oct 15, 2023 · 0 comments
Open

Selective interrupts #371

balloonpopper opened this issue Oct 15, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@balloonpopper
Copy link

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

  • Interrupts to interrupt "_front" only
  • An "interrupt_channel(channel_name)" command so that other channels can be interrupted on request
  • A "return_current_action(channel_name)" command so that the current running command on another channel can be determined
  • A "return_current_script(ESCItem)" command so you can determine what state the given ESCItem is in (though this could be done by global variables)
  • A "wait_for_global(var_name, state, timeout)" command that stops the current script until such time as "var_name == state" or timeout is reached.
@balloonpopper balloonpopper added the enhancement New feature or request label Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant