[INFO] Playload entity setup.

Discussion in 'Mapping Questions & Discussion' started by Spacemonkeynz, May 1, 2008.

  1. Spacemonkeynz

    Spacemonkeynz L5: Dapper Member

    Messages:
    234
    Positive Ratings:
    52
    [INFO] Payload entity setup.

    I'm currently updating my es_cave map with the payload setup. Once i've done that i'll write a proper tutorial. But for the moment i'll list the important entities and the important options and outputs.

    It's still incomplete, feel free to post any additions and i'll add it to the list.

    func_tracktrain
    A square brush entity using the playerclip texture, everything that moves with the cart is parented to this entity.


    Properties
    (you have to add these 3 keys yourself)
    ManualAccelSpeed - 70
    ManualDecelSpeed - 150
    ManualSpeedChanges - 1

    MaxSpeed - 90
    First Stop Target - (the first path_track)
    Distance Between the Wheels - 20

    Move Sound - Cart.Roll
    Start Sound - Cart.RollStart
    Stop Sound - Cart.RollStop


    path_track
    The path that the train follows

    prop_dynamic - Parented to the func_tracktrain
    A model to be used for the train (goldrush uses a prop_physics_override, because at the end of the map the cart falls into the pit, however for most cases a prop_dynamic should work fine)

    trigger_capture_area - Parented to the func_tracktrain
    The capture area for the cart, friendly players in this area will move the cart, enemy players will stop the cart from moving.
    Should be sized to a decent size around the cart.

    Outputs
    OnNumCappersChanged - math_remap - InValue
    OnNumCappersChanged - team_train_watcher - SetNumTrainCappers

    math_remap
    Set the maximum amount of people that can move the cart to 3, you can change this if you want the cart to be moved by more or less players.

    Properties
    Maximum Value Input Value - 3
    Output Value When Input is Max - 3

    Outputs
    OutValue - logic_case - InValue

    logic_case
    Used for deciding how fast the train should go depending on the number of people around it.

    Properties
    Case 01 - 0
    Case 02 - 1
    Case 03 - 2
    Case 04 - 3

    Outputs
    OnCase01 - func_tracktrain - SetSpeedDirAccel - 0
    OnCase02 - func_tracktrain - SetSpeedDirAccel - 0.55
    OnCase03 - func_tracktrain - SetSpeedDirAccel - 0.77
    OnCase04 - func_tracktrain - SetSpeedDirAccel - 1.0

    team_train_watcher
    Used for displaying info on the hud and linking PathTracks to ControlPoints
    You need one of these for each round

    Properties
    Train to watch - (name of the func_tracktrain)
    Node that the path starts at - (the first path_track)
    Node that the path ends at - (the last path_track)

    Linked PathTrack 1 - (the path_track that linked to CP 1)
    Linked CP 1 - (the CP)
    (repeat for each CP on the tracks)

    Outputs
    OnTrainStartRecede - func_tracktrain - SetSpeedDirAccel - -0.1
    (makes the train move backwards)

    mapobj_cart_dispenser - Parented to the func_tracktrain
    The healing thing which heals you (excuse the technical language), in goldrush it's placed in the exhaust of the cart, and the healing ray comes out of it.

    Properties
    Team - Blue (to heal Blue)
    Custom Touch Trigger - dispenser_touch_trigger

    dispenser_touch_trigger - Parented to the func_tracktrain
    A brush entity the same shape as the 'trigger_capture_area', players in this area will be healed and have their ammo restocked.

    Control point setup
    ------------------------
    Much like dustbowl, a 'team_control_point_round' for each mini-round,
    and a 'team_control_point_master', as well as a 'team_control_point' for each CP.


    team_control_point
    One for each checkpoint, including one for the end (you can set it's flag to invisible, in case you want a pit or something for the cart to fall into like at the end of goldrush)

    Properties
    Name - (unique name for each CP)
    Print Name - (The name that will show up in the top left when a point is captured, eg in gravelpit, "Spacemonkey captured the Radar")
    Default Owner - Red (maps starts with red owning all the CP's)

    Warning Type - No Announcements (Important: I made a mistake with my first version of cave where I left this on, and what happen is every time Blu could come into contact with the cart, (which was a lot), Red would hear the announcement that their Control Point is being captured. A few other pl maps have this problem, so I thought i'd point it out.)

    Outputs
    OnCapTeam2 - trigger_capture_area - SetControlPoint - (the next control point on the path) - Delay 0.1 (The delay is important, otherwise without a delay, the next CP will be captured when the current point is capped.)

    For the path_track linked to each Control Point
    i.e, when the cart reaches this path_track, the point will be capped, and at cart can not roll back beyond this path_track

    Outputs
    OnPass - logic_relay - Trigger - Only Once: Yes (A relay to fire when the cart passes the first time)
    OnPass - (the linked team_control_point) - SetOwner - 3 (for Blue) - (Set's the owner of the CP to Blu)
    OnPass - (the previous path_track) - DisablePath (Disables the previous path_tack to prevent the cart going any further back.
    OnPass - logic_relay - Trigger - Only Once: No (A relay to fire when the cart passes backwards, used to stop the sparks and the cart (if you have any))

    team_control_point_round
    Have one for each round

    Properties
    Control points this round - (the names of the CP's, separated by spaces
    Restrict team from winning - Red

    team_control_point_master
    Restrict team from winning - Red
    Switch teams on map win? - Yes
     
    • Thanks Thanks x 24
    Last edited: May 6, 2008
  2. lillbrorsan

    lillbrorsan L2: Junior Member

    Messages:
    63
    Positive Ratings:
    23
    Nice work mate!
    Keep em coming
     
  3. VelvetFistIronGlove

    aa VelvetFistIronGlove

    Messages:
    567
    Positive Ratings:
    437
    Note that mapobj_cart_dispenser also restocks ammo. Basically it's a dispenser without its own model.
     
  4. Demitri Omni

    Demitri Omni L2: Junior Member

    Messages:
    53
    Positive Ratings:
    3
    Somehow, upon setting everything up in a test map, the map immediately crashes when a blue team member enters the capture zone.
     
  5. Spacemonkeynz

    Spacemonkeynz L5: Dapper Member

    Messages:
    234
    Positive Ratings:
    52
    Yes, I got that as well, turns out I was missing something (but I forget what).

    Do you have the control points set up yet?

    I think that is a requirement, as without them, the 'team_train_watcher' doesn't know what to display and crashes the game.

    That's just a guess though.
     
  6. trainRiderJ

    trainRiderJ L5: Dapper Member

    Messages:
    203
    Positive Ratings:
    31
    Has anyone experienced the goldrush bug where you get a ton of captures just by continually coming in contact with the cart?

    I was wondering if that bug carries over to this payload entity system?
     
  7. Randdalf

    aa Randdalf

    Messages:
    1,054
    Positive Ratings:
    462
    Is that a bug or is that meant to happen?

    (I don't want it to be a bug, got 50 points without dying today, 40 were captures)
     
  8. trainRiderJ

    trainRiderJ L5: Dapper Member

    Messages:
    203
    Positive Ratings:
    31
    I find it hard to believe that me getting 9 "captures" in one stage of goldrush as a soldier was intended to happen. I've also seen reports of people on red team getting credit for captures.
     
  9. zbandito

    zbandito L1: Registered

    Messages:
    21
    Positive Ratings:
    2
    I thought that was just the intended scoring system setup.
     
  10. Spacemonkeynz

    Spacemonkeynz L5: Dapper Member

    Messages:
    234
    Positive Ratings:
    52
    It's the intending scoring system, which can be modified in the map.

    You get points for partial caps, hence all the points. This can be reduced or turned off though.
     
  11. TotalMark

    TotalMark L6: Sharp Member

    Messages:
    331
    Positive Ratings:
    40
    I've been following this, and anytime I try to test my map, the whole game crashes!!!

    Am I missing something?

    EDIT: I fixed it, I was using a trigger multiple instead of the dispenser_touch_trigger.
     
    Last edited: May 3, 2008
  12. AtionSong

    AtionSong L1: Registered

    Messages:
    6
    Positive Ratings:
    0
    I'm having trouble setting up the control point. I set up a test-map with just one control point to make sure I can get the entities right. I set the once control point to red ownership initially, and then whenever I launch the map, it says that red has won (since red owns the only control point). Where's my issue?
     
  13. MacNetron

    MacNetron L5: Dapper Member

    Messages:
    203
    Positive Ratings:
    47
    You probably have to add for red a game_round_win and a general team_round_timer. Set the time in the last one and add an output OnFinished to the game_round_win to let red win after the time expires.
     
  14. Spacemonkeynz

    Spacemonkeynz L5: Dapper Member

    Messages:
    234
    Positive Ratings:
    52
    Also, I think there is a property either in the team_control_point_round, or the team_control_point_master', which says "restrict team from winning".

    You should set that to Red, so Red will not win when it owns all the CP's (i.e at the start of the game).
     
  15. Trypto

    Trypto L1: Registered

    Messages:
    35
    Positive Ratings:
    12
  16. luxatile

    aa luxatile deer

    Messages:
    2,289
    Positive Ratings:
    1,349
    This is extremely helpful, but there's something wrong with my map...

    I did everything as it said in the guide (but I picked Red where you told me to pick Blue, and vice versa, because I'm trying to make a map where RED attacks...), but somehow I think I missed something. My cart is simply one big dispenser that sits halfway down into the ground. No, it does not say "Dispenser built by" when I point at it, but it does make the default idle dispenser sound that you can hear from a dispenser that isn't in use (I set the cart sounds to what the guide said), and it gives me ammo and health. It just won't move, that's all... (Also, it points east, when my track goes to the north)
     
  17. Butter

    Butter L1: Registered

    Messages:
    13
    Positive Ratings:
    0
    The SetNumTRainCappers doesn't excist in the default command list does it ? :s I dont have it anyway..

    Can someone upload a working prefab or example map (simple) with a working payload? Can't get mine to work at all.
     
  18. 00000000000000000000000

    00000000000000000000000 L4: Comfortable Member

    Messages:
    175
    Positive Ratings:
    19
    everything in mine works fine but it just doesn't move, I hear the sounds and get health and ammo, and I see the cart, and it faces where its meant to face, it just doesn't move.

    Heres the map if anyone wants to help me:

    http://myfreefilehosting.com/f/5f88f21658_0.02MB
     
  19. Butter

    Butter L1: Registered

    Messages:
    13
    Positive Ratings:
    0
    I hate this part of the tutorial from valve:

    'The end point is set up in exactly the same way as a mid point, the only difference is what you want to do with it.

    * The main difference is you will need to disable the Bomb_CapArea and anything else appropriate to your map, you can use the logic_relay and the end point to disable them. '

    So how do I do this then? I'm no scripting wonder...

    Next to that.. why is it that the cap area around the train does move with it.. but the dispenser area doesn't.. while they have the same parent.. it's so annoying.
     
    Last edited: Jul 16, 2008
  20. Spacemonkeynz

    Spacemonkeynz L5: Dapper Member

    Messages:
    234
    Positive Ratings:
    52
    The tutorial is not from valve, it's made by a user, and imo he did a pretty good job.

    Payload relies on the input and output system more so then the other game modes, you so have to make sure you understand it well.

    You can disable the 'Bomb_CapArea' with input 'disable'
    You can fire this from a logic_relay, the path_track, or the Control Point, up to you, but using a logic_relay keeps things tidy.

    Basicly once the train reaches the last path_track, have the path_track send the 'OnPass' output to the logic_relay with an input of 'trigger', then have the logic_relay send outputs to whatever you want to (like the 'Bomb_CapArea')