logic_versus_random

From Valve Developer Community
Jump to: navigation, search
class hierarchy
CVersusRandom
CLogicalEntity
CServerOnlyEntity
CBaseEntity

logic_versus_random is a point entity available in the Left 4 Dead series Left 4 Dead series. It fires random outputs in the first round of a versus map, and then repeats those outputs in the second round of a versus map. In other words, this entity will pick a random number or a series of random numbers in the first round of a versus game, and then repeat those numbers in the second round. This allows designers to add "random" changes to a map (like prop_fuel_barrel placement) and repeat those for the second round.

Note.pngNote:This is a preserved entity in Left 4 DeadLeft 4 Dead 2.
  • On a new round, its properties including its position will intentionally not reset. You can use logic_auto to emulate resetting it.
  • Killing it removes it forever, as it is not respawned on a new round.
  • It cannot be spawned with a point_template.
  • Parenting this with non preserved entities may have undesirable effects.

Keyvalues


Targetname:
Name (targetname) <string>
The targetname that other entities refer to this entity by.

Inputs

PickRandom
Fires a random output with at least one connection.

Outputs

OnRandom01 to OnRandom16
Fired when the input value equals the Random01 value.