Half-Life Re-imagined competition results on their way...
Check out Skewing textures in Hammer, our newest tutorial!
Say hello to csapdani, our newest member!

logo

Site Stuff

Reference

Maps

Community

ShoutBOX

Poll

Feeling Blue

What's your favourite shade of blue?

Azure

8

Cobalt

15

Turquoise

4

Cyan

7

Royal

3

Teal

3

Onliners

1 secs

Windawz

8 mins

Bruce

12 mins

Jessie

13 mins

Strider

14 mins

Admer456

15 mins

Solokiller

24 mins

Urby

Affiliates

A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

Multi_manager Looping Made Easy

Page: [1] 2

Tutorials > Half-Life > Intermediate > Multi_manager Looping Made Easy

avatar

By Stojke (More from this user)
1st April, 2012
Intermediate
looping with multi managers bug free
star star star star star (3 votes)

download

example map

File Info: ZIP, 8.96KB
Contents: RMF, BSP with sprite loop example

Multi_manager Looping Made Easy - Page 1

Looping a certain set of events may be a tricky move to master, and most known ways to do this are by using multi managers that contact each other to complete these looping functions. But as we know, to successfully loop a set of multi managers, you will need to enable its "multithreaded" flag in the flag options. By doing this your map is on an immanent course of crashing it self.
This tutorial will show you a few tricks you can use, and in what conditions. Also it will point you to some things you will need to pay attention to to make your loops function as correctly as possible.

I. First things first, what are "Multi managers"?

Multi managers are entities in Half Life engine (Gold Source) games that when called/requested call upon other entities you placed in the multi manager. By doing this you are able to activate a set of entities at once, or control their behavior in a looping sequence.
Multi managers can activate/deactivate/set any type of entity that can be controlled this way. Here is an example picture of what a multi manager entity does:

Tutorial Image Graphical example of multi manager function

An other entity requests/calls a multi manager, after which the multi manager starts to call upon entities you have set into the multi manager. These entities can be Sprites/Sounds/Other point - solid entities. More info about multi manager and how do they work can be found here:

http://twhl.info/wiki.php?id=151
http://twhl.info/tutorial.php?id=37

II. Information on this technique

1. What we know

As some of you may know, looping a certain set of events can be done by using multi managers. For example, two multi managers will contact each other at the end of the sequence list you've made and loop a certain set of entities. But, for this we need to enable the "Multi-Threaded" flag, which will cause problems over time, depending on complexity of the loop and the number of entities in the map.

As you know, multi managers will ignore any request call until they are finished with the sequence they are going trough. So in order to make them work the way we want to we need to enable the multi threaded flag. This causes the multi manager to create a copy of it self, and the entities used in the loop sequence, after which it starts to loop again with out problems. BUT, doing this, the multi manager will continue to copy it self over and over until the total amount of entities goes over the 512 engine limit and the map crashes.
We do not want our maps to crash.

2. What should we do

To prevent crashing, we must use some kind of a way to loop our multi managers with out them bugging out.
The trick is to contact an other entity which will than contact the starting multi manager and start the loop all over. Here is an example picture of how does it work:

Tutorial Image Looping explanation diagram

As you see on the image, all we do is ask the multi manager No: 1 to start all over. As you can see, in this set up, after a set number of requests multi manager No: 1 is finished, and asks multi manager No: 2 to start its cycle, which than contacts other multi managers in the set up to finish their cycle.
When the final multi manager is finished it calls upon an entity which reactivates the first multi manager.

This was an example, of course, in case you used them to make a set of events, activate sprites and trigger hurts at a sequenced interval for example.
As you know the maximum number of targets in an multi manager is 16, but its best to keep it safe and use maximum of 8 targets per multi manager (at once).

III. Looping it right

Note #1: Its all about timing
Note #2: I don't know of a way can multi manager loops be stopped each round, for needs in counter strike, i am still working around that, maybe some one will find a way after reading this tutorial.

Types of loops"

1. Timed loop -> Normal setup that finished after all multi managers in the sequence are done

Not much is to be said here, just normal linking of multi managers which do not loop after they are done

2. Always loop -> Begin ON map start or trigger - loop till the map is finished

What is essential for this one is the triggering mechanism. Knowing what i said in part II, I have constructed mine out of Env_beam and func_button. What i did is take advantage of Env_beam's Start ON flag and Func_buttons shootable function.
What we do here is place our button in the path of the Env_beam, which will than damage the Func_button and cause it to activate:

Tutorial Image Target/button position in VHE

What we need to set is:

Env_beam

Tutorial Image Object properties


Tutorial Image Object flags

We set "Toggle" so we can start it again once its done and "Start on" so the loop begins on map start

Func_button

Tutorial Image Object properties


Tutorial Image Object flags

We set "Do not move" so it doesn't move out of position

Once we have set the triggers we will make sure it loops properly. Set the final multi manager in the looping sequence to target the Env_beam entity. Once it targets the Env_beam entity it will activate and trigger the Func_button entity which will start the loop from 0 once more. This will assure your looping will be complete every time.

Note: You can also activate it with an button if you wish, you can use the same Env_beam set up and target it with a button, or you can just use jsut the button and target that button with an other button. It should loop with out problems.

IV. Summary

Multi managers can be linked in a long line and they need to be let to finish their original sequence. Dont forget to check the map example for more information.

There should be no problems with using this type of technique and it should not bug as long as you pay attention to timing and setting the whole ting up right. You can probably combine to achieve other ways of looping or getting what you want,.

Remember to pay attention to multi manager limits and entity names. Do not make loops too complex. Keep it as simple as possible, and work out the sequence on paper first.
Remember to check all the values and in case of sprites and sounds, check how long they are and build your time list accordingly.

Do not rush.

Comments

avatar xzec says: star star star star star 1st April 2012, 14:11 PM
Great stuff! I've yet to only read through it, but when I eventually get the itch to map again, I will definetly take notes from this tutorial.

Regarding to reset each round for CS. If you can trigger it to reset or start through spawns; where everyone spawns outside the map in some box which triggers the multi_manager, then gets teleported to their original spawn points.
That's at least what I do to trigger stuff each round.

Source: http://twhl.info/forums.php?thread=17380
avatar Captain Terror says: star star star star star 1st April 2012, 23:57 PM
awesome stuff sir! if i was stuck on a desert island with a pc, i could spend the rest of my days working on complex enitity setups and be happy ;)

food for thought: maybe you guys ought to include a copy of the tutorial(in pdf or html or whatev) with the download, so we can archive it neatly/completely in our "tutorials" folder ;)
avatar Captain Terror says: 1st April 2012, 23:59 PM
p.s. i love your graphic font what is it? =)
avatar Stojke says: 2nd April 2012, 07:46 AM
@ Xzec

Hmm... Since a second entity controls the whole thing, maybe a way to stop it on each round... I know it can be timed... I will have to think about this one, or if our genius Captain Terror thinks of something :P

@ Captain T

Thanks! Haha, id make sand castles xD
Also i agree we should make a PDF out of tutorials, that would be nice. Big Book of Mapping, remember that? :D

Also, the font is Nice Sega Sonic Font:
http://dl.dropbox.com/u/54462712/stuff/NiseSegaSo
nic.TTF
avatar xzec says: 3rd April 2012, 06:18 AM
@ Stojke:
Yeah, I didn't manage to make it work. Though what I tried to do was:
1.) Put info_player_start inside trigger_multiple brush.
2.) The trigger_multiple targets func_button* with info_player_start as master.
3.) A trigger_teleport around the info_player_start targeted to info_teleport_destination.

But without any luck.

* Tried the first multi_manager aswell.
avatar Captain Terror says: 5th April 2012, 09:04 AM
thanks sir! i was guessing return of the jedi and i'd never have guessed sega! =)

(and of course, i too would make some sand castles);)
avatar Stojke says: 10th April 2012, 07:23 AM
Maybe is the whole loop was controlled by a well timed env_beam... So once i want it stopped i just trigger its toggle function...

Have to test!

Also no problem T man, just ask :P
avatar Dr.Turbografix says: 6th December 2014, 12:19 PM
The setup with the env_beam didn't work for me, so I used an env_laser in the end. The 2nd multi_manager triggers two times the env_laser to switch it on and off to trigger the func_button which triggers the first multi_manager again.

an env_explosion works too triggering the button, but you always hear the explosionsound.

The "trigger-rythm" is much cleaner that way imo.
avatar ZPhugeFan says: star star star star star 2nd January 2016, 11:57 AM
I've been having trouble making a MM of mine loop without using the flag option. I will try this and see what comes of it.
avatar ZPhugeFan says: 2nd January 2016, 13:02 PM
Didn't work for me either. I will try what Dr Turbografix has offered instead.
You must be logged in to comment.