Tutorial: Multi_manager Last edited 3 months ago2024-09-03 17:52:07 UTC

Download attachment

Multimanager

This tutorial assumes you have a basic working knowledge of Worldcraft/Hammer. If you have familiarized yourself with Andy's "In the Beginning" tutorial series, you will have no problems using the multi_manager entity. The multi_manager is a point-based entity used to time-activate other entities in your map. It can activate up to 16 entities on any schedule you prefer.

Normally, any sequence (a set of entities that is used to create an effect or scene) is controlled by a multi_manager. For instance, when an alien suddenly teleports into view, a multi_manager is behind the scenes controlling the timing of everything from the lasers and sound of the teleportation to the actual spawning of the alien. A sequence can contain almost any entity that can be targetted by name...scripted_sequence, func_breakable, func_door, ambient_generic, light, etc.

For this tutorial we will explode several func_breakable crates in a row, just to keep things simple. In the example map, I have set up everything for you except the multi_manager, which I will teach you how to do here.

To begin

Download the MultiManager.rmf and open it up in Worldcraft. Notice the 4 func_breakable entities along the northern wall? These are the crates we will be blowing up in our sequence. I have creatively named them crate1, crate2, crate3, and crate4. It is very important to notice that I did not use "Capital letters" in the names of these entities we will be targeting from the multi_manager. This is because the multi_manager always converts targeted names to lower-case. Your sequence will not work if you include any "Capital Letters" in your targetted entity names.

Placement

To place the multi_manager in your map, use the entity tool to create an entity anywhere inside the perimeter of the map. Right click on the entity and select properties to bring up the Object Properties dialog box, then choose multi_manager from the drop-down list provided.

Setup

You will notice that Name is the only attribute available in the multi_manager dialog box. Type whatever name you choose into this box. This name will be used as a Target when you are ready to activate the multi_manager. In order to begin setting up a sequence in your multi_manager you must turn off SmartEdit by clicking on the SmartEdit button. This may bring up some odd looking keyvalues which should be left undisturbed. Click the add button at the bottom of the dialog box. This brings up a small dialog box called New KeyValue.
Creating a new keyvalueCreating a new keyvalue
This is used to add the name of an entity your multi_manager will be targeting, as well as the time (in seconds) that entity will be targeted after the multi_manager has been activated. In the Key: field, type in crate1. In the Value: field, enter 1. Hit the OK button to log the entry into the keyvalues area. You have just set up the first event in your sequence! The func_breakable called crate1 will be activated (blown up) one second after the multi_manager itself has been activated. Now hit the add button again and enter crate2 and give it a value of 2.5. Hit OK to log the entry. Now crate2 will be blown up 2.5 seconds after the multi_manager has been activated. Add the entries for crate3 and crate4, giving them whatever time values you prefer.
Lots of new keyvalues!Lots of new keyvalues!

Activation

All that's left to make this work is to cause the multi_manager to be activated somehow during gameplay. Do this by entering the name of your multi_manager into the target field of another entity. When the target field is activated during the game, it will cause the multi_manager to be activated. I have provided a func_button for this purpose in the example map. Type the name of your multi_manager into the Target field of the func_button. To do this, choose Map from the menu bar at the top of the Worldcraft window, then Entity report, then func_button, then click the properties button. If SmartEdit is still off, click SmartEdit to turn it on...you will see the word attributes rather than keyvalues when SmartEdit is on. Highlight the target attribute and type in the name of your multi_manager.

See it in Action

Compile the map. When you are in your map, use the button that you see in front of you. It should start the sequence you created with the multi_manager. If the crates blow up one by one then you got it right! If nothing happens, check to see that the name of the multi_manager is spelled correctly in the func_button target field. If some of the crates do not blow up, check their spelling in the multi_manager and make sure all 4 of them are targeted.

Extra Information

Remember, the time value you enter is the time in seconds that will elapse starting when the multi_manager is triggered. Timing can be entered as precisely as milliseconds. Get in the habit of using .001 for the value if you need to target an entity as soon as the multi_manager is activated. Using in the value field can cause undesired and erratic results. It is OK to give different entries the same time value to make them happen simultaneously.

If you wish to change a value after it has been logged, click on it in the keyvalues box and that entry's values will show up in the corresponding boxes on the right. The values in those boxes can then be edited. Or you can delete the highlighted entry by hitting the delete button in the center of the dialog box. Anytime you see the odd keyvalues unexpectedly, just click SmartEdit to get things back to normal.

Even though we used a func_button to activate our multi_manager in this example, almost any entity containing a Target or fire field can be used to trigger a multi_manager...trigger_once, func_door (fire on close), path_corner (fire on pass), trigger_auto, etc.

There is only one flag that can be set for multi_manager...Multithreaded. As a new mapper, always tick this flag. Ticking the MultiThreaded flag allows the multi_manager to clone itself to keep your sequence operating smoothly. If Multithreaded is not checked, and your multi_manager is used more than once (such as when firing a cannon), events that overlap in your sequence will not be activated properly.
What it looks like in-game.What it looks like in-game.

4 Comments

Commented 15 years ago2009-01-27 17:41:23 UTC Comment #100552
wow.. i'm such as a expert mapper.. i get all this quite right.. i really never need multi_manager, but i see that it a easy-usefull entity. thanks SlayerA !
Commented 13 years ago2011-04-10 14:35:39 UTC Comment #100553
multi managers are incredibly useful if you want to make something interesting happen. If you want your map to have something original or be more efficient
Commented 8 years ago2016-01-01 22:57:25 UTC Comment #100554
Very nice tutorial, but if you're gonna use the multi manager in complex maps with a lot of other entities in it, I've read that the multi thread flag may cause problems
Commented 8 years ago2016-05-20 04:35:35 UTC Comment #100555
i never knew the use of multi_manager until now, i always did it the hard way and put multiple trigger_once or trigger_multiple in one location

You must log in to post a comment. You can login or register a new account.