Return Value Events
- Some Components will have a 'Return Value Event' so that other components/MBScript can return a Value when a event happens.
Code running inside a 'Return Value Event' can't change values on the Entity or World, or do operations. The reason for this is so the Return Value can be run at any time (like on hovering over the variable or viewing it in Entity Properties) and not have unexpected side effects.
ReturnValue Events always run Locally for Players - rather than running just on the server by default like normal MBScript events.
Multiple Event lines can be added with the same 'Return Value' variable. The first 'ReturnValue' line will set the value (the order of event lines can be set with MBScript Attributes )
Creating Return Value Event
Use ‘ReturnValue>x’, to create an Event that returns a value. This can also have parameters (if ReturnEvent(y)>x is selected).
Updated almost 2 years ago