Logic versus random: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(-preserved ent game icons)
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Preserved entity|all}}
{{CD|CVersusRandom}}
{{CD|CVersusRandom}}
{{this is a|name=logic_versus_random|series=Left 4 Dead|e0}} 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.
{{This is a|logical entity|name=logic_versus_random|series=Left 4 Dead}} 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.
{{PreservedEnt|logic_versus_random}}


==Keyvalues==
== Keyvalues ==
{{KV_Targetname}}
{{KV_Targetname}}


==Inputs==
== Inputs ==
{{IO|PickRandom|Fires a random output with at least one connection.}}
{{I|PickRandom|Fires a random output with at least one connection.}}


==Outputs==
== Outputs ==
{{IO|OnRandom01|to=OnRandom16|Fired when the input value equals the Random01 value.}}
{{O|OnRandom01|to=OnRandom16|Fired when the input value equals the Random01 value.}}

Latest revision as of 08:45, 11 May 2025

Recycle-warning.png
This is a preserved entity.
If the game has round restart mechanics this entity may not behave as expected.
C++ Class hierarchy
CVersusRandom
CLogicalEntity
CServerOnlyEntity
CBaseEntity

logic_versus_random is a logical entity available in Left 4 Dead seriesLeft 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.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Inputs

PickRandom
Fires a random output with at least one connection.

Outputs

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