Pathnoding Lifts
There are two special types of pathnode which tell bots how to use lifts: LiftCenter (UT) and LiftExit (UT).
- LiftExit
- This actor tells the bots where to go to before riding a lift or after riding a lift. Place LiftExit actors approximately 16 units from the edge of the lift. You need one near each mover key. For example, if your lift goes from the ground floor to the first floor and then back again, you will need a LiftExit near your lift shaft on the first floor and one near the lift on the ground floor. To link a LiftExit to a particular lift, set its LiftExit → LiftTag to be the Tag of the lift mover.
- LiftCenter
- This actor tells the bots where to stand while riding a lift. The bots do not understand BumpOpenTimed, so when setting the mover Properties, set, Object → InitialState to StandOpenTimed. Place the actor near the middle of the 0 key (bots will be fine getting on at other keys even if the lift moves large distances in any direction as long as you have the 0 key set correctly). To link a LiftCenter to a particular lift, set its LiftCenter → LiftTag to be the Tag of the lift mover.
You need:
- A LiftCenter, placed on the mover where you want bots to stand
- a LiftExit at the bottom & top exit points, at the place bots will be before they walk onto the lift. You can have several on each floor if your lift can be approached from several directions.
The following should all match:
LiftCenter → LiftTag
LiftExit → LiftTag
Mover : Events → Tag
What happens then is that the bots will move to the ground floor LiftExit, then to the LiftCenter associated with that lift. The bots will ride the lift until it stops and then move to the LiftExit on the first floor before continuing along the normal path network.
To check that tags are correctly set: after a full rebuild of the level, select Viewport Caption Context Menu → View → Show Paths. The viewport will display red and blue connecting lines between NavigationPoints that the Bots travel along in the Navigation system. If the lift paths are correctly set up, the lines will join LiftCenter and the LiftExits.
Utilities
There are several tools that make pathnoding much easier:
- PathLogic: allows pathnodes to be placed from within UT
- Mind Reader: shows what bots are trying to do from within UT
Common Problems
Sometimes, Bots get stuck in a particular geometry when their A.I. directs them towards a "goal" that causes a conflict. It is suggested that you download the Mind Reader mutator and select it before play testing your level. Then, whenever you observe a Bot during the game Mindreader will post specific information about what the Bot's state is right on the screen for easy determination. With this information, the problem can usually be identified. Alterations can then be made to the local geometrical arrangement, either moving an inventory spot, or pathnode, or by adding other elements as needed.
Tips
You can add multiple LiftExit (UT)s at a certain moverkey.
For example if you have a mover going into a hallway, you can have a LiftExit (UT) actor at both sides of the lift. Bots will take that exit that they need
Related Topics
- The Artificial Intelligence topic page has more on pathnoding
- The Mover Topics page has more on creating and using movers
External Sources
Epic Documentation
Adding Support for Lifts (From the Unreal Technology Site)
There are two special NavigationPoint classes used to help bots understand how to use lifts, LiftCenters and LiftExits. Give the lift a unique tag. Place a LiftCenter on the lift, and set its LiftTag attribute to be the tag of the lift. At each exit from the lift, far enough away so that bots standing at that spot won't interfere with the lift, add a LiftExit. Each LiftExit should have its LiftTag set to the tag of the lift.
The default state for movers is BumpOpenTimed. Do not use this state for lifts! Bots misinterpret movers that are BumpOpenTimed as being doors. Instead, use the StandOpenTimed state for most lifts. Bots will also understand triggered lifts (TriggerOpenTimed, TriggerToggle, etc.). In many cases, they will use triggered lifts without any further help. However, for certain complex situations, such as when a delayed dispatcher is used to control the lift, bots may need a hint. In these cases, set the LiftCenter's LiftTrigger attribute to the tag of the trigger the bot should use to control this lift.
There are two other configurable LiftCenter attributes of interest. These should be modified only if absolutely necessary. MaxZDiffAdd, which defaults to 0, specifies an additional allowable difference in height between the bot and the LiftCenter for the bot to consider that LiftCenter reachable. This is useful if the bot must stand below the lift (down stairs or a ramp) while waiting for it. MaxDist2D is the maximum distance between the bot and the LiftCenter. It defaults to 400 world units.