VERC: Looping Multi_Managers Last edited 1 year ago2022-09-29 07:55:06 UTC

So, you want something (or some things) to happen every n seconds (or fraction thereof, even). Easy, just use a multi_manager.

First, make whatever you want to repeatedly trigger. It can be more then one thing, so for the sake of completeness I'll make two things: entity Bob and entity Marsha. It really doesn't matter what Bob and Marsha are, just that you want them to be triggered every n seconds. We will make n = 2 seconds for Bob and 3 seconds for Marsha.
User posted image
So, take your multi_manager, give it a Name (targetname if not in SmartEdit), something like supa_mm. Now, click the button "SmartEdit" to get out of smart edit mode.
User posted image
Click the little button that says "Add" and then enter Bob in the Key field. This identifies what you want to trigger. The Value field determines when to trigger it, which for Bob is 2. Click "ok". Now do the same thing for Marsha, only make this one 3 seconds.

This should be your result:
User posted image
Now, in order to get the multi_manager to loop, there are two things you must do. First, you must add the multi_manager, supa_mm, as a target of itself. Do this the same way you did before, with supa_mm in the Key field and let give it a time (Value) of 3, so that it re-triggers itself at the same time that Martha is triggered. Now, you also need to click the "Flags" tab and check the "multithreaded" tag. This lets it be re-triggered while its already running, and more importantly, lets it be triggered by itself.

As it is, after supa_mm is triggered, it will trigger Bob every two seconds and Martha every three seconds, forever and ever untill the next level loads. To trigger the multi_manager when the level starts, use a trigger_auto. Otherwise, just use whatever "trigger_x" fits your level.

See, pretty easy to do, especially after you get the hang of working outside of SmartEdit mode.
This article was originally published on Valve Editing Resource Collective (VERC).
The archived page is available here.
TWHL only publishes archived articles from defunct websites, or with permission. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.


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