Arg Ext provides a solution for passing arguments to Create, Destroy, and User Defined events. It also allows for Destroy and User Defined events to return values.
Documentation can be found in the supplied script ARG_EXT_INSTRUCTIONS. (ARG_EXT_SOURCE for GMS 1.4)
[Scripts & Macros]
[Example]
/// Some Event
{
// Call user event 0, giving it two numbers to add and return
value = arg_event_user(0, 10, 25);
}
/// Event User 0
{
// Assign arguments to local variables
var val1 = arg_ext_0;
var val2 = arg_ext_1;
// Add numbers and return value from user event
arg_ext_return = val1 + val2;
}
Be sure to check out my other assets:
End User Licence Agreement (EULA).
*Added arg_instance_create_depth() *Added arg_instance_create_layer() *Added arg_instance_destroy_id()