An Entity Question

Discussion in 'Mapping Questions & Discussion' started by Languid, Oct 9, 2009.

  1. Languid

    Languid L5: Dapper Member

    Messages:
    240
    Positive Ratings:
    232
    Ok, this will be a bit rushed because I typed the entire thing and then lost it :O

    I have a ctf map where a door will close when either one of the flags is picked up and will only open again if both briefcases are safe in their bases.
    to do this I used a math_counter with an initial value of 0, a min value of 0 and a max value of 0. It triggers the lockdown on hitting the max value and opens things up on hitting the min value.
    Both briefcases have 3 outputs leading to the counter, which are:

    On Pick Up/Add/1
    On Return/Subtract/1
    On Capture/Subtract/1

    It seems to work when testing in single player, but I don't know what it will do in complex situations. Is my logic sound or not? As a final (related) question, what is a good sound to loop for the firing of a rocket engine? I tried using the HL2 sound that steel does, but it gets annoying very fast.
     
  2. Nutomic

    Nutomic L11: Posh Member

    Messages:
    888
    Positive Ratings:
    177
    What if the intel is picked up, then fropped, then picked up again?

    You should better use on drop if that exists, as this will fail soon.
     
  3. Languid

    Languid L5: Dapper Member

    Messages:
    240
    Positive Ratings:
    232
    The intel being dropped is not meant to open the passageway. It should only open if both briefcases are safe in their bases, which is why I used on return (the timer running out) and on capture as inputs to subtract from the counter.

    Of course, this may turn out to be a terrible idea, but this will be a first time release for me, so I'm mainly doing it to try out the whole taking suggestions and implementing them thing.
     
  4. Languid

    Languid L5: Dapper Member

    Messages:
    240
    Positive Ratings:
    232
    I guess if no one knows an answer I can slot it in for a gameday and see if my logic works or not. An answer to the sound question would be good, though.
     
  5. Bockagon

    Bockagon L3: Member

    Messages:
    147
    Positive Ratings:
    72
    I had a crazy idea.
    Parent a trigger_multiple to the flag. Make the brush the same size as the flag.

    what to do

    trigger:
    set it to a filter that allows only the team that will be picking up the flag
    OnStartTouch/<name of trigger>/disable
    OnStartTouch/<name of math_counter>/add/1

    flag:
    OnReturn/<name of trigger>/enable
    OnReturn/<name of math_counter>/Subtract/1
    OnCapture/<name of trigger>/enable
    OnCapture/<name of math_counter/Subtract/1

    I have no way to test this (my computer can't run the SDK anymore) but I think it will work. Give it a shot and let me know what happens. My reasoning is that the use of the triggers instead of just the flag will allow you to more directly control when to modify the math_counter.
     
    • Thanks Thanks x 1
  6. Dr. ROCKZO

    Dr. ROCKZO L8: Fancy Shmancy Member

    Messages:
    580
    Positive Ratings:
    159
    *Blows conch Shell and waits for A Boojum Snark*

    I guess I better turn the Booj light on too..
     
  7. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,535
    Haven't posted because what obso said will work. There are "better" ways to do it without a parented trigger but I didn't think I needed to bother.