RED Events

From Red Faction Wiki
Revision as of 12:57, 30 October 2020 by Goober (talk | contribs) (Created page with "The event/scripting system for Red is very powerful, yet easy to use. The basic philosophy behind it is that you LINK a TRIGGER to an EVENT(s). This system is very versatile a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The event/scripting system for Red is very powerful, yet easy to use. The basic philosophy behind it is that you LINK a TRIGGER to an EVENT(s). This system is very versatile and will let you create an almost unlimited number of special scripted sequences.

An "Event" is a basic game action that occurs when it receives either an On and/or Off message. On messages can be sent from triggers, objects, or they can be received from other Events. Off messages are sent from the off state of events like the Switch Event, or are sent through an Invert Event. Most Events only respond to On messages (since most Events do a single thing which doesn’t need to be stopped with an Off message). Events must be linked to the trigger source so they know when to trigger. You link a trigger and event together by using the objects unique id number, or by just selecting the first object, then the second object, and hitting the "K" hot-key.

Events can also be linked to other Events to set up a "Chain reaction" of event all triggered from one source. For example, you might have a trigger which links to a Play_Sound Event (which plays a scream), and the Play_Sound Event could link to a Play_Animation Event (which plays an animation of an AI holding his head in agony).

All Events have an optional delay associated with them, which you can specify in the Event properties (CTRL-P or by right clicking over the selected event and selecting "Properties" from the pop-up menu). This will delay the action of the event by the specified amount of time, after an On or Off message is received.

Events can link to other objects, which is used to tell the Event which objects to affect. Each Event affects their linked objects in different ways, so refer to the Event list below for a detailed description of each event. The link HAS to go from the event to the object for it to work- even if the object is being used at the "trigger"!