TF2/PASSTime

From Valve Developer Community
< TF2
Jump to: navigation, search




NOTE: This information is stale, and an update for post-beta entities will be coming soon.




This page is a work in progress

If you have mapping questions about PASS Time, feel free to email passtime@valvesoftware.com or use the discussions at http://steamcommunity.com/groups/PASSTimeOfficial.

Entities

Reminder: for any outputs that have Activators indicated, you can use the !activator targetname to refer to that entity.

passtime_logic

This entity implements most of the game mode. Every pass map should have exactly one of these.

The SpeedBoostUsed and JumpPadUsed are only for us to enable some temporary stat tracking with Steam. You don't need to use them, since we generally can't trust stats reported by custom servers.

Keyvalues

ball_spawn_countdown <integer>
Ball spawn countdown duration in seconds. Default: 15
num_sections <integer>
Number of sections. Default: 0

Inputs

JumpPadUsed <void>
For stats tracking.
SetSection <string>
Parameter must be three values separated by spaces: <section number> <name of first track_path> <name of last track_path>
SpawnBall <void>
With a countdown, pick a random enabled info_passtime_ball_spawn and spawn a ball there.
SpeedBoostUsed <void>
For stats tracking.
TimeUp <void>
Input this from a round timer or something to indicate the game timer ended with no winner.

Outputs

OnBallFree
The ball is free - someone was holding it, and now they aren't.
Note:Activator: The passtime_ball entity.
OnBallGetAny
The ball was free and someone picked it up.
Note:Activator: The player entity that got the ball.
OnBallGetBlu
The ball was free and someone picked it up.
Note:Activator: The player entity that got the ball.
OnBallGetRed
The ball was free and someone picked it up.
Note:Activator: The player entity that got the ball.
OnBallRemoved
The ball was removed by game rules and you should respawn it. (e.g. fell out of the world (func_passtime_goal with -1 points)).
Note:Activator: The func_passtime_goal entity that removed the ball, if any.
OnScoreAny
Someone scored.
Note:Activator: The player entity that scored.
OnScoreBlu
BLU scored.
Note:Activator: The player entity that scored.
OnScoreRed
RED scored.
Note:Activator: The player entity that scored.

Notes: passtime_logic SetSection input

  • Section numbers start at 0, not 1.
  • SetSection is for helping the game correctly display the progress bar at the bottom of the HUD in maps that aren't a straight path between two goals, or maps that have multiple goals. This feature is very rough has only been used in unreleased prototype maps so far.
  • Basically, you draw a line through the main path of the map using path_tracks, and then use triggers/timers/whatever to tell passtime_logic which parts of the line are active.
  • Fire the SetSection input only when, and every time, you want to actually set the active section. For example, when some particular goal is scored in or when some time limit is reached.
  • Use of SetSection is optional as long as num_sections is 0 and you have exactly 2 func_passtime_goal entities in the map.
  • There's a hard-coded maximum of 16 path_tracks per section.
  • The section number is a vestigial feature and isn't used for anything yet. You still have to include it, but the actual value doesn't matter.
  • All path_tracks in a given section must be connected from beginning to end. Separate sections don't have to be connected to eachother, but the HUD might act weird if the beginning of a section isn't in the same place as the end of the previous section.
  • For example, if you wanted to implement a map in which scoring in some particular goal unlocks different paths through the map (and possibly other goals), you could use SetSection to ensure that the progress bar works correctly after the new map section is opened.
  • Each section is defined by a sequence of path_tracks, and the position of the ball on the HUD is calculated by projecting the ball's world position onto the line segments defined by your path_tracks. Placing the path_tracks is tricky. For best results, all of your path_track sections should be connected.

info_passtime_ball_spawn

Whenever passtime_logic wants to spawn the ball, it will choose a random enabled info_passtime_ball_spawn.

Every pass map should have one or more of these.

Keyvalues

StartDisabled <boolean>
To do: add description
TeamNum <integer>
The TeamNum value might set the ball to be on the specified team when it spawns, but this feature is vestigial from previous prototypes and might be removed.

Inputs

Enable
Disable

Outputs

OnSpawnBall
A ball just spawned here.
Note:Activator: This info_passtime_ball_spawn entity.


func_passtime_goal

Every pass map should have two or more of these. The OnScore outputs are for doing anything you need to do that's specific to this goal, like starting effects or opening doors.

This entity has some hard-coded spawnflags. It will always enable both "Allow Clients" and "Allow Physics".

Keyvalues

points <float>
How many points the team gets for scoring here. If this is -1, the ball will be removed from the world instead.
Team <team>
Sets which team can score in this goal.

Outputs

OnScoreBlu
BLU scored.
Note:Activator: This func_passtime_goal entity.
OnScoreRed
RED scored.
Note:Activator: This func_passtime_goal entity.

Spawn Flags

Scoring here wins the game
This should do what it says, regardless of the score, but this feature is vestigial and hasn't been tested recently.
DO NOT let the ball score here
This causes the goal to act like an endzone. Players carrying the ball can score here, but the ball itself won't score.
Let ball-carrying players score here
Does what it says.
Show special locked status on HUD

func_passtime_no_ball_zone

If a player tries to carry the ball into this trigger, they will be forced to drop the ball.

Players can't pick up the ball if either the player or the ball is inside a func_passtime_no_ball_zone.

Outputs

OnBallEnter
The ball or ball carrier is inside this trigger now.
Note:Activator: This trigger_passtime_ball entity.
OnBallExit
The ball or ball carrier was inside this trigger but isn't anymore.
Note:Activator: This trigger_passtime_ball entity.

trigger_passtime_ball

You can use this to track ball movement through the map and dynamically adjust things like enable/disable spawn rooms.

These triggers use a per-frame check to make sure that it will fire in all situations. For example, it will fire outputs correctly if the ball is hidden, teleported, etc.

These triggers will NOT fire correctly if they're enabled or disabled while the ball is inside them.

func_passtime_goalie_zone

This trigger is only used to award bonus points to anyone who intercepts or steals the ball inside it.

It always enables the "Allow Clients" spawn flag on itself.

It has no inputs or outputs yet.

passtime_ball

There's no FGD entry for this entity because it's not meant to be placed directly in maps yet. At some point in the future we may make it possible to play with the passtime ball in any map. It has no inputs or outputs.

trigger_catapult

This is a partial port of the trigger_catapult entity from Portal 2.

Client-side prediction of trigger physics was not ported from Portal 2.