UDN
Search public documentation
KismetExamples
UnrealKismet Example
Document Summary: A demonstration of some simple Kismet use. Document Changelog: Created by Alan Willard.Introduction
For more information on using UnrealKismet, look at UnrealKismetUserGuide? or UnrealKismetReference?.This document refers to the map DM-Square1.ut3, which is linked at the bottom of this page.
Examples
All of the examples described here are shown in the DM-Square1.ut3 map, with notes in the Kismet workspace.Moving platform
The simplest method of doing a moving platform is to use the Mover function of the InterpActor.Start by selecting a StaticMesh you want to use as your platform in the Generic Browser, right-click in the world and choose "Add Actor>Add InterpActor."
Now bring up the properties of the InterpActor and open "Collision" and make sure that bBlockActors and bCollideActors are set to TRUE.
Select the InterpActor and open Kismet. Right-click on an empty space in Kismet and select "New Event Using InterpActor>Mover."
This will place a special Touch event that we use for Movers in UT and will also have a pre-connected Matinee that you will use to do the movement of your platform.
From there, you just keyframe your movement and the InterpActor should move and support the player. When the player touches the InterpActor, the platform should begin to move.
In the test map, when you touch the red InterpActor, it should take you along for a ride and your player should sit on top of the InterpActor as you would expect.
There are many ways of doing a similar setup. You don't need to right-click in Kismet and add the InterpActor as a Mover.
You could place a Matinee on your own and have it triggered by any other Kismet action you want.
Hiding pawns
To disable the collision of the pawn, use a Change Collision action by right-clicking and selecting "New Action>Actor>Change Collision."With that action, you can disable or enable the bBlockActors and bCollideActors flags as you wish.
You may also want to disable the movement of the player.
To do that use the Toggle Cinematic Mode action by right-clicking and selecting "New Action>Toggle>Toggle Cinematic Mode."
The Toggle Cinematic Mode action also includes the bHidden flag so using a Toggle Hidden action would be redundant.
The Toggle Cinematic Mode action in my Kismet setup is labeled as "OPTIONAL."
In the test map, walking through the Trigger will toggle whether or not the spawned pawn is hidden and whether or not he will collide with you.
Gate action
The Gate action is usually used to manage one event that can be set off by multiple inputs.There was a time in development where we were using Set Bool and Compare Bool actions or Counters to manage this kind of thing.
It was more complex than was necessary, so we devised the Gate action to streamline the process.
The Gate action is now so useful that we have a Kismet shortcut to add one. Just hold down G and left-click on an empty space and it will add a Gate.
In the test map at area 3, you can shoot the 4 small triggers. Each one will toggle the purple light, but the light will only toggle once and will reset after 4 seconds.
During the 4 seconds of inactivity, you can still shoot the triggers (listen for the sound) but the light will not toggle until the 4 seconds is complete.
Timer action
The Timer action is mostly used for test maps and debug purposes.It is used in Gears of War for single player scenarios where you have groups of enemies and you want to know how long each battle takes.
When you know the general amount of time it takes for the battle, it becomes easier to know when to set off other events in relation to the battle.
If a battle usually takes 30 seconds, at 15 seconds you may want to start to close the walls in on the player to increase the pressure.
The Timer doesn't really have a specific use, it's just a good tool for gauging cinematic timing.
In the test map, when you enter the area with the pink light, a trigger will display. Shoot the trigger to stop the timer.
The timer will count the time it takes you to shoot the trigger after it is shown.
Touch events
At the moment, Touch only works on actors that do not block the player. If the player only bumps a pawn, it will not count as a touch.You may be able to get around this limitation for the moment by using the Change Collision action on this particular pawn and turning bBlockActors to FALSE. The Touch event should work then.