sd_tricia capture system

Discussion in 'Mapping Questions & Discussion' started by Muddy, Sep 16, 2015.

  1. Muddy

    Server Staff Muddy Muddy

    Messages:
    2,372
    Positive Ratings:
    4,167
    In sd_tricia I want the capture zone to signal a helicopter to fly into the map and slowly descend until it lands, upon which the team with the Australium can deliver it. Most of it I've got down, but the bit I can't figure out is how to set it so:

    The helicopter descends when the flag carrier is on the capture zone,
    The helicopter ascends to a certain point above the map when the flag carrier is not on the capture zone,
    And the helicopter pauses its descent when the capture zone has both the flag carrier and at least one enemy on it.
    (And as a bonus: for the helicopter's descent rate to vary depending on how many people are on the capture zone.)

    Functionally it's not dissimilar to the rocket lift in Doomsday I guess, but last time I made a Special Delivery map - being the hack that I am - I just copied the entities straight from Doomsday and pasted them in, so I have no idea how that works either. Halp.
     
  2. KubeKing

    aa KubeKing Back home in Jupiter, things are getting harder

    Messages:
    1,211
    Positive Ratings:
    1,374
    I'm certainly no expert on the SD logic, but isn't there an input on path_tracks that allows you to change minimum speed? You can have the helicopter move along those, and change the speeds of the path_tracks based on the criteria. To change the speed based on people, you can use a generic team trigger filter and counter (similar to how the speed of a Tug-O-War cart changes speed based on people pushing from the same team).

    Sorry I can't fact-check this; I'm on mobile.
     
  3. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,739
    use a trigger_timer_door instead of the normal capture area. Then have a func_door parented to your tracktrain with the helicopter parented to the func_door.

    so:
    Send the start input to the tracktrain when the trigger_timer_door starts being capped (onstartcap)
    Send the reverse input to the tracktrain onbreakcap from the triger_timer_door

    The helicopter will now fly towards the point when it starts being capped, and away when there is no capping progress left

    Link the trigger_timer_door with the helicopter's func_door. It will now decend with the capture progress, regardless of it's position. As long as the cap time is longer than the time it takes to get to the point it will look fine. If it gets all the way to the point on just 10% progress it'll decent mostly vertical but if it gets to the point at like 90% it'll decent over the course of getting towards the cp. Start it high enough and make the tracktrain fast enough and it should avoid buildings (note: it's only a problem on the way IN, on the way out it will only leave the cap point at 100% height)

    Aaaaannnddd this is where you run into problems. Currently anyone can cap that point.
    What you need is a foolproof way to name the player that's currently carrying the flag. And I don't know one. I've tried and failed.
    The method I thought was best was to have a small trigger brush inside the flag that named the player when they entered the volume and unnamed them when they exited. Buuuuuut that didn't work because when they moved quickly it'd stutter and they'd get named/unnamed every tick. Which doesn't work when the trigger you want to detect with uses onstarttouch

    HOWEVER.... through the course of writing that paragraph it occurs to me that a capturezone doesn't particularly care about the starttouch but the touch duration. So the stuttering may not actually matter. Furthermore players capping a point don't tend to be moving too fast (it was noclip speeds or falling from a height speeds, running wasn't too bad iirc)

    So give it a go, use a trigger to send !activator | addoutput | "targetname bob" to the player and use a filter_activator_name on the point that looks for that player's name.

    (oh, the flag's !activator is broken so it sends it to itself, so you can't just use OnPickupTeamX to name the player. GOD DAMN IT VALVE)
     
    • Thanks Thanks x 2
  4. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,739
    Alternatively if the flag thing doesn't work, use a flagdetectionzone to change the teamcancap value for the trigger_timer_door so that it can only be capped while the flag is on it. However this maaaay cause the door to snap back to the top if it resets a team's capture progress, so again, experiment
     
  5. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,739
    This isn't by any means a complete setup but it has the basics: https://dl.dropboxusercontent.com/u/2126504/helicopter_setup.vmf

    Things you still need to do:
    • Change the door inputs/outputs to work for all cases of teams capping and breaking the progress of the point, since I don't know what kind of setup you want, I can't make it for you. It currently only works for the first full capture since the relay disables afterwards, but by that point the helicopter is fully over and lowered at the point, so maybe that's when the round wins? In which case who cares that it gets disabled.
    • Change all the door/tracktrain stuff to nonsolid etc
    • Introduce some method of only the flag carrier capping (see above suggested methods)

    Turns out the trigger_timer_door works differently to how I thought it would, I thought it'd be like a momentary rot button, but it's not at all. It still uses open/close inputs but it changes the speed to match the current capping speed so it always moves in sync with the capture progress. Provided you set the door to Toggle in the flags it all works well with OnStartTouchAll and OnEndTouchAll for the capture area.
     
    • Thanks Thanks x 3
  6. Muddy

    Server Staff Muddy Muddy

    Messages:
    2,372
    Positive Ratings:
    4,167
    Thank you so much for this YM! I've got all the logic working as planned. However there's one last issue I just can't puzzle out.

    I've duplicated the logic, so there's one set for each team. They both work identically and I've checked each one about ten times over to make sure I've not missed anything - but for some reason, Blue's trigger_timer_door simply won't work properly. More specifically, the OnStartCap and OnEndCap outputs won't fire even though the OnStartTouchAll and OnEndTouchAll outputs work perfectly well.

    I'm at my wit's end here, so here's a download link to the VMF for anyone to try and puzzle this one out. https://www.dropbox.com/s/1k3vf7qrbpur3jm/sd_tricia_a2.vmf?dl=0

    (Note: don't worry if you see error models and missing textures, it's just content from heyo's jungle pack.)
     
  7. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,739
    two capture areas for the same control point?

    It's probably that.

    If you duplicated the control point, did you change it's index?
     
  8. KubeKing

    aa KubeKing Back home in Jupiter, things are getting harder

    Messages:
    1,211
    Positive Ratings:
    1,374
    I took a look, and I can tell you that the indexes were different. From what I know, every piece of logic was properly mirrored, and yet only Red's capture system works properly.
     
  9. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,739
    Golden rule for creating new gamemodes:

    USE THE GOD DAMNED CP HUD - THE CTF HUD IS WANK


    your 2nd cp is locked.
    [​IMG]
    super simple fix for this, for any capture point other than the lowest index one, if it's to start unlocked it needs itself as a preceding point:
    [​IMG]
    [​IMG]

    After I did that it works fine.
     
    • Thanks Thanks x 3
  10. Muddy

    Server Staff Muddy Muddy

    Messages:
    2,372
    Positive Ratings:
    4,167
    breaking news: I am a fucking idiot

    someone lock this thread please
     
    Last edited: Sep 23, 2015
  11. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,739
    eh, the only reason you missed it is because you had the ctf hud on and the ctf hud is evil. I spent a good 15 minutes carefully going over things before I started changing things, I turned off the ctf hud just so I could see what I was doing and the problem revealed itself.
     
  12. KubeKing

    aa KubeKing Back home in Jupiter, things are getting harder

    Messages:
    1,211
    Positive Ratings:
    1,374
    you might not wanna lock the thread, you're bound to have more issues with this map

    :jimijam: