This action is for use when creating Action Block Scripts and is used to return a value to the instance calling the script. The return value can be anything that a variable can hold - like a string, a numeric value, a pointer or a resource ID - or it can be a variable itself. Note that when we call the return action in a script, the script will be exited - returning the given value - and no further actions after the return will be called, although if you have actions in the event after you call the script, these will still be run.

Action Syntax:

return Syntax


Argument Description
Return The return value.


return Example
The above action block script sets a temporary variable to the keyword noone, and then checks an instance variable to see what value it currently has. If the variable is less than 100, then an instance is created and its unique instance ID is stored in the temporary variable, which is then returned from the script.