Monday, April 20, 2009

Kismet: Enabling Triggers

A trigger is something that will set off another event. Creating it in Unreal is simple enough. First, create a simple level with a point light.


We want another light that can be on an off upon stepping on a trigger. Under Generic Browser, go to Actor Classes tab and expand your Light till you get PointLightToggleable.


Select the floor and right click to "Add PointLightToggleable Here"


Change the lights to another colour (double click to access its properties) so we can differentiate between the PointLight and the PointLightToggleable.


Add a Trigger by Right Clicking.


The Trigger looks like this and is invisible by default.


For testing purposes, we want to be able to see the Trigger icon. Double click on the Trigger icon to open up its properties. Disable Hidden.


Create a Trigger event in Kismet. 1. Select the Trigger, 2. Open up Kismet, 3. Right click on Kismet and choose New Event Using Trigger -> Touch


You want this trigger to have a Toggle function, so right click on Kismet and add New Action -> Toggle -> Toggle


You want your Toggleable Light to be hooked up with the Trigger and Toggle functions. So, click on the Toggleable Light, right click on Kismet and add New Object Var Using PointLightToggleable_1.


Do the hooking up as per diagram. Remember to select Trigger Touch function (denoted by yellow) and under Max Trigger Count, change to 0 (This will make it infinitely toggleable).


Build All the level and you should be able to toggle the red lights on and off by walking into the Trigger.

No comments:

Post a Comment