Trigger_Multiple and all entities touching

Discussion in 'Mapping Questions & Discussion' started by JrTheDragon01, Jan 30, 2013.

  1. JrTheDragon01

    JrTheDragon01 L1: Registered

    Messages:
    20
    Positive Ratings:
    1
    In a level, I have a trigger_multiple affecting a gamerules logic, and I thought the OnStartTouchAll command fired once all entities that the filter applied to were within the trigger_multiple.
    However, it turns out this just fires when any entity enters the trigger_multiple.
    What I want to achieve, is that once ALL player entities enter the trigger, the command is fired.
    I had the vague idea of using some logic and a trigger in all other areas of the map, but that would be complicated and messy, so I was wondering if anyone knew of or could think of a better way to do this.
    Thanks.
     
  2. Micnax

    aa Micnax I maek map

    Messages:
    2,046
    Positive Ratings:
    1,370
    Do a math counter, so that when a player enters and activates, it adds 1 to the counter (and removes one when they exit), so when all the players are in, it'll reach the maximum count needed and do the trigger you want.

    The hard part is finding out how many players are on a team, which you'd need to set your max value on the counter, which I'm unsure how you'd do.

    What is it for, anyway?
     
  3. henke37

    aa henke37

    Messages:
    1,859
    Positive Ratings:
    430
    Uhm, the counter solution has a loophole: death. Death and disconnections.
     
  4. Bloodhound

    Bloodhound L6: Sharp Member

    Messages:
    316
    Positive Ratings:
    239
  5. JrTheDragon01

    JrTheDragon01 L1: Registered

    Messages:
    20
    Positive Ratings:
    1
    Well, it's for a map I'm making for me and my friends, and it's MvM, but designed so that an alternate method of failing is if all players die at around the same time (if all players are within the spawn area)
     
  6. JrTheDragon01

    JrTheDragon01 L1: Registered

    Messages:
    20
    Positive Ratings:
    1
    Oh, and
    you could do it by having another trigger, which added to another math_counter, which was only enabled before the game start, and sent to the math_counter every time a player passed through it. A logic_compare could compare the values on each math_counter, and send the signal if they became the same. It's not flawless, there are a lot of loopholes, but it's closer to being perfect.
     
  7. Bloodhound

    Bloodhound L6: Sharp Member

    Messages:
    316
    Positive Ratings:
    239
    What is if everybody is just upgrading weapons, or is still in respawn but already alive?

    Beside I dislike this idea because it's not explaining itself, and players will ask themselves what happened.
    You should create a trigger in the entire map, except the spawn area. Then toggle the trigger turn on and off by counting spawn uses.

    This might not work and would be hell of entity work. Which is, to be honest, unnecessary.
     
  8. Egan

    aa Egan

    Messages:
    1,304
    Positive Ratings:
    1,485
    Ignoring that this is the opposite of what your original post asked, just make a trigger only activate once the round starts, that surrounds the entire map, and make it so if OnEndTouchAll is fired, end the round or whatever.
     
    • Thanks Thanks x 1
  9. JrTheDragon01

    JrTheDragon01 L1: Registered

    Messages:
    20
    Positive Ratings:
    1
    This seems like it's a good idea, but just to make sure it worked when all players died and not just one, I might use the trigger with a couple of counters just to make sure that all players are dead.
     
  10. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,365
    That's why you're to use OnEndTouchAll, not OnEndTouch. The former fires only when all appropriate entities exit the trigger while the latter fires when any appropriate entity leaves. I think.
     
  11. JrTheDragon01

    JrTheDragon01 L1: Registered

    Messages:
    20
    Positive Ratings:
    1
    Well I thought that was the same with OnStartTouchAll, but it turned out not, so I'm gonna use a math counter just to be safe.
     
  12. Fish 2.0

    Fish 2.0 L6: Sharp Member

    Messages:
    324
    Positive Ratings:
    116
    No, don't use a math counter. What if there are only 5 people playing your map?

    It would be a lot like making a door - when everyone leaves the door area, OnEndTouchAll, the door closes. If you surround your playing area with a trigger_multiple have an output that OnEndTouchAll (when every player is out of the playing area) the trigger is fired sending the output to where ever you want it to go to.

    If need be have them spawn at one set of spawns then when they die they respawn somewhere else. Not hard with logic.