Triggers

From Computing and Software Wiki

Jump to: navigation, search

Triggers are invisible geometric objects that trigger controllers, scripts, entities and other things in the game when the player goes through them.

Contents


Creating a Trigger

Simply load up the world editor, then click on Page in the top menu. From here select Triggers, which will enable the triggers panel to the left of the screen.

Image:TrigMenu.JPG

From this menu one can choose between a Box, Cylinder or Sphere trigger area. Lets choose a Box area and simply draw it on the screen

Image:SmplTrig.JPG

Connecting Trigger to an Object

In order for the trigger to activate anything it needs to be connected to an object, unless you are using Display Text, Insert Image, Move Image and Remove Image, in which case a trigger area along with scrip editing described in the Script Editor section of this Wiki would be enough. If you are doing something more fancy such as activating a controller of an object then the trigger has to be connected to that object. To do this first have your objects created, then create the trigger area after which click on the trigger area and on the Tool and Toggle Buttons click the Connect Nodes selector.

Image:ConNodes.JPG

After that click on the connector that appeared, which by default says TARG. Then click on the object you want to connect the trigger to and hit CTRL-L. This will link the connector to the object.

Image:ConTarg.JPG


Using Connected Trigger

After the trigger is connect any action applied to the trigger through the Script Editor that requires a target can be directed to connector TARG. For example Waking a controller that is applied to the object TARG is connected to. (Please refer to the Script Editor part of the Wiki for information onhow to get to the Script Editor)

Image:Editor.JPG

Personal tools