logic_versus_random

From Source Entities
Jump to navigation Jump to search

Code classes:

Logic auto.png

logic_versus_random is a point entity present in both L4d.pngL4d2-small.pngLeft 4 Dead games. In versus mode, this entity is used to keep Left 4 Dead's random nature more consistent between the two rounds. Something such as the location of a powerful gun could affect how well a team does, in which case, the other team should have that same advantage/disadvantage during the second round.

logic_versus_random was used in this part of the Docks map from L4d2-small.pngThe Sacrifice to decide which explosive barrels will spawn.

Some argue that keeping things consistent between rounds can make the game even more unfair, due to players being allowed/forced to plan a strategy involving those "random" events in the second round, when they could not in the first. In practice, players have found that it's better to use this entity than to not. In the rare case you feel that using this entity would realistically hurt gameplay rather than help it, consider if versus mode should be using any randomness at all.

Inputs[edit | edit source]

PickRandom
Fires a random output which is being used in the map. This input should be sent from an info_gamemode when its OnVersus output fires.
Note: In the example from the image, Valve also used a logic_case for when the map is loaded in co-op, but actually, you can send this input to the entity from an OnCoop output as well!

Outputs[edit | edit source]

OnRandom01 to OnRandom16
If this output is being used in the map, it may fire when the entity is sent PickRandom.