Functions Documentation
View Function Edit Function
Name objFireEvent
Syntax (objFireEvent obj event) -> result of event
Argument List obj: The spaceObject that has the event to be run.
event: The name of the event you want to run.
Returns Whatever the last run expression of the event returns. Nil if the event doesn't exist.
Category spaceobject, event
Description Runs any event on a spaceObject.
(objFireEvent gPlayerShip "testEvent")

Tries to run the event "testEvent" on the player ship. If it doesn't exist (like for the default player ships) it returns Nil.
Comment Great for triggering events from script. You can encapsulate some functionality in an event, and then use that event as if it were a function. It is also the only way of getting the return value of an event.