home · browse · search · game entities · user directory · message board · IRC | register

October 27, 2006, 4:46 pm PDT
username  
password  
forgot password?

Popular Resources
  • Half-Life 2 Mod FAQ
  • Valve Hammer Editor
  • Hammer 3.5 beta test
  • Half-Life Utilities
  • game data files
  • ZHLT 2.5.3 custom build
  • Half-Life SDK
  • Feedback
    If you've got any feedback, suggestions, or bugs to report regarding the Collective website, go here!

  • Feedback (301)
  • Newsletter
     
    Enter your email address in the above form to add yourself to the email newsletter list. Click here for more info.

    Hosted Sites
  • Valve ERC
  • Collective
  • TFMapped
  • Spirit of Half-Life
  • Selective Design
  • Pixel Reviews
  • recent articles

    NPC and Item Placement Theory
    17/03/05 11:35pm PST
    Non-Player Character (NPC) and item placement can influence both the gameflow and immersion of a level. This article aims to give some pointers on how to properly place them.
    - Hugh 'Hugh' Lloyd

    Got Props?
    13/03/05 08:32am PST
    A common problem in HL2 mapping is props not showing up in game. This article explains why and offers solutions.
    - Jeff 'Yesukai' Pritchard

    Simulating Randomness
    18/12/04 11:29pm PST
    This article focuses on how to properly simulate random events that should occur at a certain average frequency, or within a certain probability per period of time.
    - Skyler 'Zipster' York

    Adding Single-Player Weapons to Half-Life 2
    15/12/04 06:52pm PST
    Covers the process behind adding weapons to a single-player Half-Life 2 modification.
    - Skyler 'Zipster' York

    Your world in HL2
    06/12/04 12:17am PST
    This article gives tips and advice to anyone wanting to make custom photorealistic textures to be used in Half-Life 2.
    - Oksid

    Hiding in Shadow
    21/08/04 01:11pm PDT
    Describes how to create a function that has monsters disregard you if you are hiding in a certain level of "darkness," which can be set from within map properties.
    - Anders [Wolf] Jenbo (NoBody)

    XSI EXP for Half-Life 2 Tutorial - Camera Control
    23/09/04 12:43am PDT
    A SOFTIMAGE|XSI tutorial explaining all of the camera controls available to you in XSI!
    - Josh Enes

    Bump Mapping in Half-Life
    08/08/04 11:58am PDT
    Details a method of achieving real-time bump mapping in Half-Life, and provides an implementation of the algorithm.
    - Francis 'DeathWish' Woodhouse

    Real-Time "TRON 2.0" Glow For Low-Spec Hardware
    19/06/04 02:06pm PDT
    A sequel to the original "Real-Time 'TRON 2.0' Glow" article, this describes how to implement real-time glow that works on low-spec graphics cards.
    - Francis 'DeathWish' Woodhouse

    Hitboxes and Code
    05/06/04 06:25pm PDT
    How do I make only one part of a monster take damage? Learn about the relationship between model hitboxes and what you can do with them in a characters code.
    - Jonathan 'Teh_Freak' Smith

    Looping Multi_Managers
    [Tue Nov 19, 2002 / 11:26am PST] Jeff 'Yesukai' Pritchard - comments (7) comments enabled

    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.

    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.


    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:


    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.

    article created on Mon Nov 18, 2002 / 08:06am PST
    this item has been viewed 3373 times
    [Half-Life / mapping]

    Only registered users can post comments. Have you registered yet?

    user comments

    displaying comments of normal or higher rating

    1.

    Ken 'scope.creep' Noblin
    Tue Nov 19, 2002 / 08:52pm PST

      I have not tested this yet to find out for sure, but the logic doesn't sit well with me. Let's look at a timeline:

    delay - triggered
    0 - supa_mm
    1 -
    2 - Bob
    3 - Martha, supa_mm
    4 -
    5 - Bob
    6 - Martha, supa_mm
    7 -
    8 - Bob
    9 - Martha, supa_mm

    Both Bob and Martha repeat every three seconds. The difference is that Bob repeats every three seconds after an initial two-second delay while Martha repeats every three seconds after an initial three-second delay.

    2.

    u9
    Wed Nov 20, 2002 / 07:37am PST

      that's what I'm seeing too. I'd just use a seperate multi_manager for each task (1 for Bob, 1 for Marsha). It's effect on gameplay would be negligible (right?). it also depends upon what exactly Bob and Marsha are, as other entities can target themselves (func_doors and such).

    3.

    Skyler 'Zipster' York
    Wed Nov 20, 2002 / 08:24am PST

      That's simply a result of the behavior of a multi_manager. Usually (or at least hopeully), you wouldn't use a multithreaded multi_manager in such an obscure way.

    4.

    Jeff 'Yesukai' Pritchard
    Wed Nov 20, 2002 / 09:46am PST

      Its just supposed to teach how to make a looping multimanager, not how to time something to the seconds. Bob and Martha are just examples. Yeesh.

    5.

    Chris 'autolycus' Bokitch
    Wed Nov 20, 2002 / 10:11am PST

      Don't be so defensive. :) Timing things is an important aspect of the multi_manager, especially while looping.

    That said, I don't really see a problem with the way the logic of this works out. Rather than thinking about the initial 2 second delay, think about Bob in relation to Marsha. Bob gets triggered 1 second before Marsha. During the looping, this temporal arrangement is preserved, so no problems. :)

    Regarding what Bob and Marsha are, there's nothing that says they aren't actually other multi_managers. The main important thing here is the instruction to use the mutltithreaded flag, which is something lots of people miss, and isn't exactly intuitive just by looking at the entity (in fact, this entity is pretty poor in the intuitive area).
    comment modified on Wed Nov 20, 2002 / 10:15am PST

    6.

    u9
    Wed Nov 20, 2002 / 11:26am PST

      yep, I think I just read too much into it... I misread it that bob happens every 2 secs and marsha every 3, which now I understand wasn't the point of your tip. the multi-threaded flag is a good thing to mention, I just discovered it recently :)

    7.

    Lennart 'Lento' Johannesson
    Thu Nov 21, 2002 / 12:38pm PST

      Nice article Jeff! :)
    I didn't know this as I'm pretty new to mapping, but I'll make sure to use it.
    I saw someone using trigger_relay to achieve something similar I think,
    this way seems much easier though. :)

    VERC © 2004. All content copyright its respective owner, all rights reserved.
    script execution time: 0.113064050674 seconds