I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX
Legacy:Activating A Mover
This page follows on from:
- Create A Mover: making a mover shape and adding it to the map
- Keyframe: setting the mover keyframes
Mover keyframes set the places the mover will go to in space. There are now two remaining questions:
- what will make the mover start moving? This is its activation method
- how far along its keyframe sequence will it move & when will it come back? This is set by the InitialState.
Contents
Activation Methods
Triggering
The mover is activated by being triggered. This can be by:
- a Trigger (or Dispatcher, RoundRobin, etc)
- another type of event, such as something the game itself generates (eg a flag capture)
- the mover itself, with BumpEvent: a player bumps the mover, which fires the BumpEvent, which matches the mover's Events -> Tag. See "bumping" below.
- Another mover (A button, switch, etc) using the MoverEvents section of its properties.
For a mover to be activated by triggering, set Object->InitialState to one of the 'TriggerFoo' states.
Bumping
The mover is activated by an actor touching it. The BumpType property determines which actors count as valid.
- Use one of the Bump states
- Set the mover's BumpEvent property to match its Tag, so it triggers itself when bumped, and use a 'TriggerFoo' state.
Standing
The mover is activated by an actor standing on it. This is often used for lifts.
- anyone know how the engine differentiates between "bump" and "stand"?
Legal: You have to stand on top of it rather than just bumping (running into the side of) it. At least in theory...
However for extremly long lifts I would advise using TriggerControl instead. Then if the player falls, the lift will rise up and "catch" them.
Setting the State
Each state listed in the mover's Object -> InitialState property sets a different type of behaviour for the mover. (hence they are sometimes referred to as move types.... or are they? I might have dreamt this one... Tarquin
The full list is covered in detail on the Mover class page. Which one you use depends on what the mover is meant to represent in the map and what you want it to do:
Lift
Use StandOpenTimed: the mover will open, wait, close if a player or a bot (UT) stands on it.
Door
TriggerOpenTimed and TriggerControl are both often used for doors. Both will start opening when triggered, but there is a differnce in what happens next:
- TriggerOpenTimed will open, wait, close automatically regardless of where the player is.
- TriggerControl will open, and stay open as long as the player is still standing in the Trigger. The moment the player steps out, it will reverse direction and close, even if it was only partially open.
TriggerControl is used in DM-StalwartXL for the slow-opening redeemer door, and for all the doors CTF-Cybrosis. It's a very nice effect, as doors shut as soon as the player has gone through, and also will never close on a player.
This is generally the preferred method for doors.
Button
Use BumpOpenTimed: the mover will open, wait, close if it's touched. BumpButton adds extra detail to the movement: see the mover page.
Adding a Trigger
The next step after setting up your mover and its keyframes is adding in a Trigger to make it work. Note that you do not have to have a trigger to make the mover work; you only need one if you are going to use an InitialState that starts with "Trigger*". For the purposes of a mover, you can use any type of Trigger you want, it doesn't matter. To get the mover to activate set the Events -> Event property of you trigger to the Events -> Tag property of your mover.
Note that you don't actually have to have a subclass of Trigger to trigger a mover. A mover can even be triggered by another mover, as long as the other mover's Event is set to the triggered mover's Tag. In the case of certain mods (like Jailbreak), you may also have the mover be triggered by events that are fired off by the game itself. Really, any Event that matches the mover's Tag will cause it to activate.
Related Topics
- Mover Topics
- Create A Mover shape and adding it to the map
- Event and Tag
- Trigger Systems