Cp capture percentage changing map conditions

Discussion in 'Mapping Questions & Discussion' started by BigBros, Jan 11, 2015.

  1. BigBros

    BigBros L3: Member

    Positive Ratings:
    So I was thinking of an idea for a map, where the percentage of the cp that was captured, would change something in the map. So there may be like a battery or a fuel cell, and as you stand on the point, the fuel cell begins to fill up, with some sort of visible show in game, like a brush getting pushed up.

    Is there any easy way to do this? And sorry if it is hard to understand, I can answer any questions that you may have, but I thought that this could be a cool custom game mode. (or part of it at least)
    Last edited: Jan 11, 2015
  2. Ynders

    aa Ynders absolutely gormful

    Positive Ratings:
    The closest thing you could do is have a func_movelinear or a func_door, and have an output from the capture zone being OnStartCap *name of movelinear* Open and OnEndCap *name* Close, but if you have something like a mid or second on 5cp or a lots point, then you have the problem of closing it for the next team to cap, and that wouldn't really make any narrative sense. Your best bet for the system I described(or really any type of this idea) would be A/D maps.

    If you were making it for a koth map, it would make the most sense to have the setup I showed, but instead of OnStartCap, just use On30SecRemaining, from the team_round_timer, so as to say that whoever has the point at the end wins whatever is in the cell. As for a 5cp map, you could use the first setup, but only on last point.

    The main problem with these is differing speeds of capture if you want the rising of the door to be in sync with the capture. I have no idea if such a thing is possible to work perfectly.
    Last edited: Jan 11, 2015
  3. KubeKing

    Server Staff KubeKing Soon it will be different

    Positive Ratings:
    Hm, I'm probably not the best resource for this kind of stuff, but you may be able to use two triggers and a team filter for each for points that can go between the two teams. Set each to disable the other trigger, and enable when unoccupied by the respective team and the door has closed.
  4. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Positive Ratings:
    Sorry, but you're wrong!

    There's actually an entity that exists to do just this, that no one seems to know exists. trigger_timer_door functions like a normal capture point zone, except it has a keyvalue of "linked door." The entity will then update the speed keyvalue of the door automatically so that it will be fuilly open when the area is capped, and fully closed when it's not, doing all the math for the number of people and capture speed for you.

    The only quirk is that you need to send the open input to the door from the point on OnStartCap and close on OnBreakCap/OnEndTouchAll, the entity doesn't do that automatically. You may need to send the open input when the number of cappers changed too, to update the doors speed.
    • Thanks Thanks x 3
    Last edited: Jan 11, 2015
  5. henke37

    aa henke37

    Positive Ratings:
    For those wondering, that entity was added with the gatebot update, they use it in the corresponding MVM map.