The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

Legacy:Movers With More Than 8 Keys

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

This is a work around for UT.

UT2003, UT2004, UE2, and likely U2 support up to 256 keyframes. 8 can be set from the right-click menu, the rest must be set using Mover Properties.


Overview: How to make a Monorail

By Pitboy

Until Epic, or someone in the mapping community clever enough to code a script to allow movers to have more than 7(+1) keys, we are stuck with this limitation. There is a way around it however. It just takes a little patience and some simple math...

The mover that you create (monorail, helicopter, ect.) has NO key points itself.

What we are going to do is make a few other mini movers I call 'MoverGuides' and attach the mover to the first of these.

The main mover

Create a large room (say, 256x1024x1024) and Re-build Geometry.

Create a mover the usual way, maybe just a platform (16x64x128).

Set the following Properties for your mover:

  • Movement -> Attach Tag = 'MG1'
  • Mover -> MoverEncroachType = 'IgnoreWhenEncroach'
  • Object -> InitialState = 'None'

The mover guides

Select a unique texture not used elsewhere in your new room. Make a cube 2x4x4 and add it to your level. Cut the rectangle into a triangle. Using a triangle helps you keep track of the direction it's heading in. Make this triangle into a mover the usual way (just do not delete the blue triangle when you're done).

Note: Just make a regular mover, NOT an Attach Mover. I find it's easy to make about 10 MoverGuides at this time (just click the mover button 10 times) if you don't know yet how many total keys you want, or if you later screw one up. Delete the leftovers when you're done. In this example, we will use six of them.

At this point, in the Top View, I will arrange all the MoverGuides into a neat row to make changing each of their properties quicker. Move the blue triangle to the side where you can later easily select it.

Select ALL of the MoverGuides, and change their following properties...

  • Events > Tag... 'MG'
  • Movement > Attach Tag... 'MG'
  • Mover > MoverGlideType... 'MV_MoveByTime'
  • Mover > NumKeys... '8'
  • Object > InitialState... TriggerOpenedTimed

Now to adjust each one...

Go to the first one and change...

Event > Tag to 'MG1'

Movement > Attach Tag... 'MG2'

Go to the second one and change...

Event > Tag to 'MG2'

Movement > Attach Tag... 'MG3'

Go to the third one and change...

Event > Tag to 'MG3'

Movement > Attach Tag... 'MG4'

Go to the fourth one and change...

Event > Tag to 'MG4'

Movement > Attach Tag... 'MG5

Go to the fifth one and change...

Event > Tag to 'MG5'

Movement > Attach Tag... 'MG6'

The final one will be a little different...

Go to the sixth one and change...

Event > Tag to 'MG6'

BUT leave Movement > Attach Tag... to 'None'

Also, while they are all selected, right click on one of them and select 'Movers > Show Polys. They should now all be visible in the 3-D window. Right click on one of it's sides (make sure it has that unique texture) and select 'Select Surfaces' > 'Matching Textures' (or use Shift + T). All the Mover Guide's surfaces should now be highlighted. Hit F5 (Surface Properties) and on the Flags tab tick off 'Invisible' and 'Unlit'. I'm assuming this saves the game engine a bit of stress, not having to draw or light these. Go back to Top View and select all the MoverGuides (if they aren't already), the platform mover and the blue triangle. Right click on one of the highlighted brushes (should be 12 of them) and select Transform >Transform Permanently (you could also do these separately, this way is quicker)

Re-build Geometry and save.

Move the platform mover just off the ground somewhere in the room. From the Top View, place the first Mover Guide (MG1) AND the blue triangle to the same spot in the middle of the platform. Make sure they are pointing towards the front of the mover in the direction it will head. From a side 2D view, lower MG1 so it's somewhere below your level (underground). At this point I will move all the other MG's to the same Z axis (height) below ground as MG1. Switch back to the top view. As you created MG1 after the added brush, MG1 should cover up the triangle.

For this example, have MG1 point to the right while looking through the Top View. You should stay in Top View from this point on.

NOTE: Every time you select one of the MG's, make sure its pivot point the dot in the middle, or the front tip.

Right click MG1 and select Movers > Key 1.

It is important to keep in mind that the MG's should be placed (roughly) equally apart. Otherwise, your mover will speed up and slow down while traveling (unless this is what you want). Now, select the mover, triangle and MG1 (I usually just Left Control and draw a box around all three) and drag them 256 units to the right.

Left click MG1 so it is the only thing highlighted, Now, right click it and select Movers > Key 2. MG1 should snap back to its original position (Key1). Drag it so it's back over top of the blue triangle. Select all three again, and drag them to the right 128 units and up 128 units. Now rotate them (Left CTRL + Right mouse button) so that they are angled 45 degrees up. We are going to go around a corner, so they will be next be heading up.

Again left click MG1 so it is the only thing highlighted, Right click it and select Movers > Key 3. After it snaps back, drag it on top of the triangle again. Make sure it is angled correctly as well. The reason we take the blue triangle along for all of this is that it not only makes it easy to find the center of the mover, but also the current angle of the mover.

Drag all three 128 units right and 128 units up. Angle them another 45 degrees up (now facing straight up) and Left click MG1 so it is the only thing highlighted, then right click and select Key 4. Drag MG1 back over top the triangle...

To keep this from being 80 pages long, continue to move all three around to where you want... right clicking MG1 and setting the next key point, then drag it back on top of the triangle and moving all three to the next spot. Assuming you've set them up to key 7, move them to one last point somewhere, and select MG1, and set this spot as Key 0 (base). After it snaps back, leave it there.

Grab MG2 and place it on top of the blue triangle, (and angle it so it's pointing in the same direction) so the blue triangle is hidden beneath. Right click MG2 and select Movers > Key 1. At this spot, MG1 stops moving and MG2 takes over. Move your mover, the triangle and MG2 through 7 more key frames. ('1' is where the previous mover ended, '0 (Base)' is where the next MoverGuide will start). To quickly finish up our example, continue using this method till you have used up 6 of the MoverGuides. Make MG6's final key point (0 Base) is lined up back on top of MG1 to complete the route (before MG6 snaps back to its starting position).

Add into your map one regular trigger (Actor > Triggers > +Trigger) and two dispatchers (Actor > Triggers > Dispatcher)

Place the trigger on the platform so it can be activated when someone stands on it. Set in the trigger's Properties...

Events > Event to 'Mdisp1'

Trigger > TriggerOnlyOnce to 'True'.

Give the first dispatcher a tag of 'Mdisp1'.

Give the second dispatcher a tag of 'Mdisp2'.

It doesn't matter where they are placed.

Now for the math...

We left all the MG's Properties > Mover > MoveTime at '1' (one second). So we know it will reach the spot where MG2 is in 7 seconds.

Select Mdisp1 and open Properties > Dispatcher, and expand OutDelays and OutEvents.

Type in OutDelays...

(0) '0'

(1) '7'

(2) '7'

(3) '7'

(4) '7'

(5) '7'

(6) '63'

(7) '0

Type in OutEvents...

(0) 'MG1'

(1) 'MG2'

(2) 'MG3'

(3) 'MG4'

(4) 'MG5'

(5) 'MG6'

(6) 'Disp2'

(7) 'None'

When a player stands on the platform, it will activate the trigger, which calls whatever is in its 'Event', in this case the dispatcher Mdisp1. Mdisp1 one will look at its OutDelays, wait the appropriate time, and then activate what is in line (1) of its OutEvents. Because we want it to start right away, we left OutEvents (1) at '0'.

Each MoverGuide needs to be activated 7 seconds later, so we put '7' in lines (2) through (5) of OutDelays.

So now, the player gets on the platform, activates the trigger which calls Mdisp1 which activates MG1. It will go through its 7 key frames and stop on top of MG2, (taking the platform with it because the platforms AttachTag is MG1). At this exact moment Mdisp1 activates MG2, and MG2 heads off on its key frames, taking MG1 with it because its AttachTag is MG2. This continues till the last MoverGuide (MG6) lands on the spot where we started out.

Next we have to set each of the following MoverGuides Properties > Mover > StayOpenTime. We left this till now because this number depends on the amount of MoverGuides we used (6), and the MoveTimes of them (1 sec)

Select the last MoverGuide we used (MG6), and set its StayOpenTime to '7'

Select MG5 and set its StayOpenTime to '21'

Select MG4 and set its StayOpenTime to '35'

Select MG3 and set its StayOpenTime to '49'

Select MG2 and set its StayOpenTime to '63'

Select MG1 and set its StayOpenTime to '77'

See the pattern?

The last thing to do is figure out when line 6 of Disp2 should be called to make it an endless loop (so the platform keeps moving). Dispatchers can't call (activate) themselves, but they can call a second dispatcher, which in turn can call the first dispatcher (in 0.0 seconds!). As you may have noted, the DelayTimes in dispatchers count up from 0 at each OutEvent they come to. So...

After MG6 is called, we have to start counting. It takes...

7 seconds to get to its last key (0 base - also the starting point of the monorail)

7 seconds to stay there (its StayOpenTime)

7 seconds to get back to its first key

7 seconds to for MG5 to travel back to its first key

7 seconds to for MG4 to travel back to its first key

7 seconds to for MG3 to travel back to its first key

7 seconds to for MG2 to travel back to its first key

7 seconds for MG1 to get to its first key (also the starting point of the monorail)

7 seconds for it to wait before you have it go again

This adds up to 63. So we put in '63' at line (6) of Mdisp1's OutDelays

Now select Mdisp2 and open Properties > Dispatcher, and expand OutDelays and OutEvents.

Set line (0) of OutDelays to '0'

Set line (0) of OutEvents to 'Mdisp1'

So after the platform has gone around it route, paused, and returned... Mdisp1 activates Mdisp2 which in turn activates Mdisp1 and the platform heads off again.

If you look at the small sample map, you can see the MoverGuides in action.

If you open the Monorail map, you'll see there are two monorails, blue and red. I first laid out the blue monorail's MoverGuides (BMONO1-8). When I added in the red monorails MoverGuides (RMONO1-8) opposite the first one, I put its first MoverGuide on top of the blue Monorail1's 5th key frame. (Each of these monorails have 8 MoverGuides, and the 5th key frame is the halfway point).

You can download this tutorial, a small monorail map, and the tutorial map here...

http://www.planetunreal.com/prefabl...ailtutorial.zip

Coments

Sett: : I posted this tute' on Pitboy's behalf.

More to come!

SabbathCat: : The download link is broken. Can't find on google. Anyone from prefablab got fileplanet access? :)

Ticalion: : Your gonna love me SabbathCat we have it hosted over at UTmaniac :) the link to the Download is

[D2]_Boss.... : There's an easier way to go over 8 key points. Set NumKeys to any value that'll determine how many keypoints you are doing. Do your first seven keypoints normally. Position your mover to the 8th one. Open the mover's properties, look for KeyNum (not NumKey). Type in 8 for the 8th keyframe. Once that is done, your mover should return to the original position. You can have up to 255 keyframes which should be more than enough than what you need. The highest I went to is up to 25. =)

http://www.utmaniac.com/sitestuff/ut2k3featured/monorailfiles/monorailtutorial.zip


Category:Legacy Mapping
Category:Legacy To Do – format this page