hot_potato_spawner

From Source Entities
Jump to navigation Jump to search
Info.png

This entity is not in the stock FGD files by default.
See below for instructions on making it available.

Code classes:

hot_potato_spawner is a point entity present in P2.pngPortal 2. This entity can hold and spawn hot_potatos.

FGD Code[edit | edit source]

@PointClass studio("models/props/futbol_dispenser.mdl") base(Targetname,Parentname,Studiomodel) = hot_potato_spawner : "This entity can hold and spawn hot_potatos."

[ StartWithHotPotato(boolean) : "Start With Ball" : 1 : "Spawner will have a ball inside it when the map starts." IsTimed(boolean) : "Timed" : 0 : "If Yes, when a ball is grabbed, it will explode after Timer Duration. The ball will pulse between red and yellow while the timer counts down. An alarm sound will play each second while counting down. Non-timed balls spawned from another source will not become timed when interacting with this spawner. Timed balls will have their timer reset when placed in a different spawner, but will retain their original spawner's timer duration." Timer(float) : "Timer Duration" : 5 : "How many seconds it should take for a timed ball to explode." TimerIndicatorName(target_destination) : "Timer Panel" : : "A prop_indicator_panel which will show the remaining time for a timed ball." input ForceSpawn(void) : "Spawns a ball in the spawner. BUG: If the spawner currently has a ball in it or one held by a player/actively moving about in the map, the spawner will become bugged and always instantly spawn a new ball whenever one is grabbed from it." output OnHotPotatoSpawned(void) : "Fires when a ball is spawned in the spawner." output OnHotPotatoCaught(void) : "Fires when a ball is caught or a new one spawned." output OnHotPotatoReleased(void) : "Fires when a ball is grabbed from the spawner."

]

Keyvalues[edit | edit source]

Start With Ball (StartWithHotPotato) <boolean>
Spawner will have a ball inside it when the map starts.
Timed (IsTimed) <boolean>
If Yes, when a ball is grabbed, it will explode after Timer Duration. The ball will pulse between red and yellow while the timer counts down. An alarm sound will play each second while counting down. Non-timed balls spawned from another source will not become timed when interacting with this spawner. Timed balls will have their timer reset when placed in a different spawner, but will retain their original spawner's timer duration.
Timer Duration (Timer) <float>
How many seconds it should take for a timed ball to explode.
Timer Panel (TimerIndicatorName) <target_destination>
A prop_indicator_panel which will show the remaining time for a timed ball.

Inputs[edit | edit source]

ForceSpawn
Spawns a ball in the spawner. Bug: If the spawner currently has a ball in it or one held by a player/actively moving about in the map, the spawner will become bugged and always instantly spawn a new ball whenever one is grabbed from it.

Outputs[edit | edit source]

OnHotPotatoGrabbed
Worthless; always fires under same conditions as OnHotPotatoReleased.
OnHotPotatoSpawned
Fires when a ball is spawned in the spawner.