Return Icon Return

This action is for use when creating Action Block Script Functions 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 When you call the return action in a function, the function 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 function, these will still be run.

 

Action Syntax:

Return Action

Arguments:

 

ArgumentDescription
ReturnThe return value.

 

Example:

Return ExampleThe above action block function sets a temporary variable to the keyword noone, and then checks an input variable to see what value it currently has. If the variable is greater than 100, then an instance is created and its unique instance ID is stored in the temporary variable, which is then returned from the function.