info_coop_spawn

From Source Entities
Jump to navigation Jump to search

Code classes:

info_coop_spawn is a point entity present in P2.pngPortal 2. It's a place players can spawn at in coop mode. Unclear why this entity inherits CBaseAnimating when it's invisible.

Additional spawn logic[edit | edit source]

In order for players to move in coop, a small amount of additional logic is required. Create a logic_relay with Entity Scripts (vscripts) set to debug_scripts/mp_coop_transition_list.nut and give it this output:

My OutputTarget EntityTarget InputParameterDelayOnly Once
OnSpawn!selfRunScriptCodeSetMapBranchAndLevel()0.00No

Keyvalues[edit | edit source]

Initial State (Enabled) <choices>
Should the spawn point be active when the map starts?
  • 0: Disabled
  • 1: Enabled
Team (StartingTeam) <choices>
Who should be able to spawn here.
  • 0: Any
  • 2: Red (P-Body)
  • 3: Blue (ATLAS)
Force gun on spawn (ForceGunOnSpawn) <boolean>
No effect. Players always spawn with portal guns.

Inputs[edit | edit source]

SetTeam <integer>
Sets Team.
Enable
Makes the entity active.
Disable
Makes the entity inactive.
SetAsActiveSpawn
Enables this spawn and disables all others of the same team. Note: Cannot be used on spawns that share their name with another one of the same team; at least one of those spawns will be incorrectly disabled.