Skip to content

Support coroutines (commands with await keyword) #71

@rob1gat

Description

@rob1gat

Context

We're making a game with some immersive sim logic. We heavily use commands and scripts to quickly setup some situations (positioning NPCs, setting flags, etc.). Some commands cannot be executed instantly : for example we have a command to wait until a given ingame hour which basically runs the simulation at high speed until the desired hour is reached.

What we would like

We would like to be able to run commands that are coroutines :

  • Console execution should be suspended until the coroutine has reached end
  • Script execution should wait until the end of the coroutine before moving on to the next one

For the moment we have a workaround which consists in :

  • Adding 2 await in limbo_console.gd (one in execute_command() and the other one in execute_script())
  • Closing the console at the beginning of our coroutine commands
  • Re-opening the console at the end of our coroutine commands

(PS : thanks for this addon which is very handy 😃 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions