|
Mover Class Reference: by BlackSway
Last Updated
2 April, 2002
|
| Mover | AssertMover
| AttachMover | ElevatorMover
| GradualMover | LoopMover
| MixMover | RotatingMover |
| |
| Introduction |
|
I would first like to point out that this reference is aimed directly
at level designers, and is not intended as a guide to the UnrealScript
behind these objects. However to learn more about these objects
I did frequently delve behind the scenes. So if you wish to converse
about the script then feel free to e:mail me or catchg
First a bit of jargon:
- Actor: any object within the game, including brushes, triggers,
weapons and players
- Pawn: any moving creature, including monsters, players and
bots
- Player: just real-life players
- ScriptedPawn: basically just monsters
- Touch or Bump: means this mover is triggered by a pawn running
into its collision cylinder (formed from the collision radius
and collicion height)
- Event: some movers use the Event field to trigger another event
- Tag: the name of the move
|
| Each trigger has a number of keys next to it to signify a number
of things:
TC: triggered by pawn contact
TG: triggered by another trigger
|
| |
| Mover |
|
This is the basic mover from which all other movers are descendants.
This means that if you understand this actor then you only need
to understand the differences between this and other movers. Therefore
this bit is going to be long.. ;-) (p.s. the first bit here is available
in 20 other tutorials and covered in more detail with pictures,
so if this isn’t much help to you I suggest you try reading some
of them before continuing).
To create a mover:
- Create your mover with textures etc.
- Copy to active brush (the red one) by either intersecting a
number of other brushes, or right-clicking on a brush and choosing
Copy polygons to brush.
- The click on the Add Mover button (as someone said, it looks
like a marshmallow with arms).
- To select a different type of mover (explained below) you must
select it in the class browser before pressing the Add Mover button.
- You should now have a purple brush. This is your mover.
- n.b. make sure you reset the scaling on any brushes you use
(or transform permanently) else players will fall through your
mover.
The mover has the following states:
When triggered the mover will move through its keyframes until
it reaches the last one, stay open as long as the StayOpenTime variable
and then return the the first keyframe.
When first triggered the mover will open. When it is next triggered
the mover will close
While the mover is being triggered (i.e. an actor is within the
collision radius of a trigger) the mover will be opening. As soon
as the actor moves from within the trigger radius, the mover is
un-triggered and will close again.
This opens and then closes repeatedly while the player is triggering
it. The time between opening and closing is actually specified by
the OtherTime property and StayOpenTime is the time between closing
and opening again.
When bumped it opens, waits as long as the StayOpenTime parameter
and then closes again.
Also the BumpEvent is triggered, and if the bumpee was a player
then it will fire the PlayerBumpEvent as well.
If bTriggeredOnlyOnce is true then the mover will stay open after
being bumped.
A bump button will open when bumped.
Also the BumpEvent is triggered, and if the bumpee was a player
then it will fire the PlayerBumpEvent as well.
If it triggers another mover then it will stay open until that
mover has closed (or in the case of a triggercontrol until it has
swapped state). Infact whatever it triggers it will then usually
wait until they have finished what they where doing.
If bTriggeredOnlyOnce is true then the mover will stay open after
being bumped.
What a mover has finished opening it will trigger the event specified
by its Event property. When it starts closing it will untrigger
this event. (N.B. with the exception of the TriggerPound state which
does not trigger this event).
|
|
MoverEncroachType:
describes what happens when something (like
you) gets in the way of the mover moving. The default is Return.
The others are Crush, Stop and Ignore. Return returns the mover
the the previous keyframe. Stop stops it, never to go again. Ignore
simply keeps it going. Crush means it makes small up down movements
until you get out of the way.
EncroachDamage:
amount of damage done when a pawn is hit by a
moving mover (whatever above is set to).
MoverGlideType:
whether the mover moves with a slow acceleration
or moves linerly.
BumpType:
what classes can bump trigger the mover. Can
be either player, pawn or any.
KeyNum:
current keyframe the mover is at, and the one
it starts at in the game
NumKeys:
total number of keyframes the mover has
WorldRayTraceKey:
raytrace the world as if the mover is at this
keyframe (used for lighting)
BrushRayTraceKey:
raytrace the brush as if it was at this keyframe
(used for lighting)
MoveTime:
time taken for the mover to mover from one keyframe
to the next
StayOpenTime:
amount of time between the open and closed states
(apart from the TriggerPound type where it is the time between each
Open and Close cycle)
OtherTime:
amount of time between the open and closed states
for a TriggerPound mover
DelayTime:
pause once triggered or bumped before opening.
bTriggeredOnceOnly:
go dormant after first trigger
bSlave:
true if this mover is a slave to another mover.
All movers with the same Tag are grouped together and follow the
exact movements of the only one without bSlave as true, relative
to their own base keyframe.
ReturnGroup:
default to the same as Tag. All members of this
group ‘encroach’ together for return and stop types of encroach.
If one member of the group is encroached then they should all act
as if they have just been encroached. There seems to be a bug in
the return type where the group doesn’t react the first time. This
can mean that the other members end up out of sync with the leader.
(I can’t explain it very well but here is a sample map TUT-Movers-ReturnGroupBug.zip)
|
| I have to confess to not being able to get the above two too work
to my satisfaction. Maybe it’s a bug in the script (I think it might
be) or maybe there is some setting I’m missing out I don’t know but
the linked movers frequently got out of sequence. Have any ideas…
e:mail me. |
|
bUseTriggered:
is triggered if a player tries to ‘grab’ the
mover (the ‘G’ key in Unreal, never used it myself).
bDamageTriggered:
whether taking damage triggers this mover.
DamageThreshold:
amount of damage to take before it is triggered.
bDynamicLightMover:
If true then the lighting of the mover changes
as it moves through the level. Obviously a bit of a memory hog though!
PlayerBumpEvent:
optional event when a player bumps the mover
(BumpButton and BumpOpenTimed only)
BumpEvent:
optional event when any valid ‘bumper’ bumps
the mover (BumpButton and BumpOpenTimed only)
OpeningSound:
plays when mover starts opening
OpenedSound:
plays when mover finished opening
ClosingSound:
plays when mover starts closing
ClosedSound:
plays when mover finished closing
MoveAmbientSound:
Optional sound to play when moving
N.B. don’t make the mistake of setting a looping
sound in any of the first four sound slots, as they will keep playing
forever!
|
| [^Top] |
| |
| AssertMover |
|
I shall paste the comments from the code here and then explain
the parameters:
// A mover which keeps opening as long as the instigator stays
within
// the trigger's radius. If the instigator steps out, the mover
will
// stay in it's current position for WaitUnAssertTime time, and
then
// close all the way back to the beginning. If the bTriggerOnceOnly
// variable is true, once it reaches the last keyframe, it will
// stay there forever if bOnceOnlyStopOpen is true, or it will
go back
// to the first frame (after waiting for StayOpenTime) and stay
there
// forever if bOnceOnlyStopOpen is false. If bTriggerOnceOnly
is
// false, when it reaches the last keyframe, after it waits for
// StayOpenTime, it will return to the first keyframe, and the
// entire process will be repeatable.
// Note: When the last keyframe is reached, Event will be called.
M.
You must use the new AssertTriggerOpenTimed initial state for this
to be of use.
However if normal states (such as TriggerOpenTimed) were used then
the OpenTimes and CloseTimes arrays would still be used.
|
| [^Top] |
| |
| AttachMover |
|
Identical to a normal mover but with one extra parameter, AttachTag.
All actors with a Tag the same as this AttachTag will move as if
they where standing on the mover. I would like to say that I have
had problems keeping everything in sync when the mover is encroached
but apart from that it works fine.
Useful for attaching lights to the give good effects.
N.B. You must set the following properties in the Advanced section
of whatever it is you want to follow the mover:
bMovable=True
bStatic=False
bNoDelete=False
|
|
AttachTag:
tag to match all other actors to this mover
|
| [^Top] |
| |
| ElevatorMover |
| This mover is used with the ElevatorTrigger (as well as the CodeMaster
and CodeTrigger, see Triggers Reference), giving it the ability to
be sent to a specific keyframe. Rather than moving from keyframe 0
to the final keyframe and back again you can trigger it to move to
a particular keyframe (in much the same way as an elevator works ;-) |
|
No additional parameters.
See ElevatorTrigger for details on how to trigger
it.
|
| [^Top] |
| |
| GradualMover |
|
Allows the mover to be gradually triggered, i.e. the first trigger
opens it so far, the next trigger opens it a bit more and so on,
until the final keyfraem is reached.
This is the first state GradualTriggerOpenTimed. The other two
|
|
OpenTimes[6]:
MoveTime for the 6 opening moves
CloseTimes[6]:
MoveTime for the 6 closing moves
Tags[6]:
tags which will trigger each stage, initial trigger
in Tags[0]
Events[6]:
events to be triggered when each open is completed
|
| [^Top] |
| |
| LoopMover |
| Once triggered this mover will continue moving through its keyframes
and then back to keyframe 0 until it stops being triggered. A TimedTrigger
(UT Only) is a good trigger to use if you wish to trigger a loop mover
at the start of a game. Either that or a normal trigger with a large
collision radius, so the mover only moves when it can be seen. |
|
No additional parameters
|
| [^Top] |
| |
| MixMover |
| This is a combination of ElevatorMover, GradualMover and AttachMover.
It has an attachtag which you can attach anything to it and apart
from that has the same states as a GradualMover. It also has an ElevatorMover
state but this cannot be triggered from any current trigger as they
all require an actual ElevatorMover class object which this isn’t. |
|
See GradualMover and AttachMover
|
| [^Top] |
| |
| RotatingMover |
| Rotating movers are mover which when triggered rotate, according
to their RotateRate under RotatingMover. |
|
RotateRate:
Roll, Pitch and Yaw rate of the rotate. Will
me dependant on the Tick rate of the game so reliable roate speeds
are not possible.
|
| [^Top] |