This sample shows how to execute two or more long running scripts in parallel. The scripts voluntarily hand over the control to the next script in the queue by calling the function Sleep().
This sample implements a simple console, which lets the user type in commands and also evaluate simple script statements.
This sample shows how co-routines can be implemented with AngelScript. Co-routines are threads that can be created from the scripts, and that work together by voluntarily passing control to each other by calling Yield().
This sample has the script engine execute a long running script. The script execution is regularly interrupted by the application so that keyboard events can be processed, which execute another short script before resuming the execution of the main script. The event handling scripts change the state of the long running script.
This sample was written with the intention of explaining the basics of AngelScript, that is, how to configure the engine, load and compile a script, and finally execute a script function with parameters and return value.