index

Documentation: Samples

Concurrent scripts

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().

Console

This sample implements a simple console, which lets the user type in commands and also evaluate simple script statements.

Co-routines

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().

Events

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.

top