Attaching Actors
This tutorial discusses attaching actors to a mover and assumes you already know how about:
- Actor Overview: adding actors, setting properties
- Create A Mover
- Keyframe
Any actors attached to a mover will follow the mover. You can attach smoke generators to leave a trail of smoke or attach a fighter jet decoration to fly around your map.
Attached actors can be anywhere in the map; they don't have to touch the mover or even be anywhere near it. The mover can be hidden (in solid space) and the actors will appear to move independantly. Attached actors will always move relative to the movement of the mover; if the mover moves 64 units to the left, so will the attached actor.
Method 1: Attach Tag
To attach any actor to a mover, match these tags:
- The Mover's Events → Tag
- The Actor's Movement → AttachTagTag
Check the tag of the regular mover, you may have set one, you may have not. Make sure you know what it is.
Now add the actors that you want to attach to the mover. This time, instead of setting their Tag, expand the Movement properties. The first field should be AttachTag. Set this to the Tag of the mover that you noted earlier. You may have to check the advanced properties as I explained above to get it to work. Now you can test your map.
Method 2: AttachMovers
This method is an alternative, available in UT and other games of that generation which have the AttachMover class. To add special movers, right-click the Add Mover toolbox button instead of just clicking it: choose "AttachMover" from the small pop-up menu.
An AttachMover has the same properties as a normal mover, you can have it BumpOpenTimed so it will open when you touch it, TriggerOpenTimed so you can trigger it (see Activating a mover for more on this). The only difference is that in the properties of the mover there is now a new option.
Attaching Actors
Unreal uses tags to tie actors to the AttachMover, the same way Triggers work. The same name must be present in two different places. It doesn't matter what the text is, but something descriptive may help later. 'Blah' will do, as will 'Attach' or 'AttachedBarrel'. The following properties must match:
- The AttachMover's AttachMover → AttachTag
- The Actor's Events → Tag
Now you may have to set a few other properties on the actor to get this to work. Check the actors have the following properties set:
- Advanced → bMovable = True
- Advanced → bStatic = False
Also, it is a good idea to turn the attached actor's collision off. If the actor has it's collision properties set to True, it can cause all sorts of problems (i.e. your actor may not move properly). If you need collision, try using an invisible mover to create the illusion of collision. Alternatively, in the case of Karma-simulated actors, collision can be manually disabled between two actors without affecting those object's collision with the remainder of objects in the world.
Now test your map. When the mover moves, the actor should move with it.
Warnings
- If your actor does not move with the mover, check the bMovable and bStatic properties of the actor. Lights are one example.
- Do not attach any NavigationPoint or any actor that alters the bot's pathing to a mover.
- Do not attach an actor to more than one mover.
Actors that are attached to a mover follow its location, but only the yaw of its rotation. If you need to have your actors follow rotational movement around the other axes as well, check the ActorAttacher component.
Ideas
Triggered Kicker
You can try attaching a Kicker to a mover to make a triggered jump pad. Just add the kicker somewhere below the kicker where it won't effect players, then attach it to a mover which will move it up enough so that it kicks people. This can be quite fun for things like Human Cannons <insert evil laugh here>.
Alternatively, see the Kicker actor page for a subclass which does this.
Moving Skybox
You can also attach a SkyZoneInfo to movers. I've tried this one and it's pretty cool. Try creating a circular SkyBox, then add a mover in the very center of it that rotates constantly. You will want to make sure that you can't see it at any point though After that, add your SkyZoneInfo somewhere near the perimeter of the skybox and attach it to the mover.
You will want to check that bDirectional = True in the advanced properties of it so that it is facing the correct way (say you are doing a flying ship or something ) Also, you can try tilting it sideways in towards the center of the skybox so that the entire map is sloped inwards as you would on a moterbike (This can make you feel sick after a while )
Related Topics
- Mover Topics
- Actor (UT)/Advanced properties
- Actor (UT)/Events properties
- Actor (UT)/Movement properties
- ActorAttacher component for UT
- Movable Lights making lights move
Comments
Foxpaw: Can this be renamed, since it deals only with attaching things to movers, and not attaching things to bones, or just using plain old attach or setbase?
Tarquin: "Attaching to movers"?
Foxpaw: That could work. Alternatively we could add stuff on those other topics here, though admittedly I've never had any success with the "Attach" function and only sporadic results with Setbase.
Category Mapping
Category To Do this tute has only been partially freshed up for UT2003.