Logic script: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Update link to SPUF thread to use archived version)
(-added internal names)
Line 4: Line 4:


==KeyValues==
==KeyValues==
{{KV|EntityGroup[0]|to=EntityGroup[15]|target_destination|Entities to add in the EntityGroup array for the script.}}
{{KV|EntityGroup[0]|to=EntityGroup[15]|intn=Group00|intn2=Group15|target_destination|Entities to add in the EntityGroup array for the script.}}
{{KV Targetname}}
{{KV Targetname}}
{{note|logic_script in L4D2 is missing KeyValues for Entity Scripts and Script think function. These additional keys can to be added to the entity with SmartEdit turned off as '''vscripts <code><[[string]]></code>''' and '''thinkfunction <code><[[string]]></code>''', respectively.}}
{{note|logic_script in L4D2 is missing KeyValues for Entity Scripts and Script think function. These additional keys can to be added to the entity with SmartEdit turned off as '''vscripts <code><[[string]]></code>''' and '''thinkfunction <code><[[string]]></code>''', respectively.}}


== Inputs ==
== Inputs ==
{{I Targetname}}
{{I BaseEntity}}


== Outputs ==
== Outputs ==
{{O Targetname}}
{{O BaseEntity}}


==See also==
==See also==

Revision as of 13:15, 28 September 2022

Source 1 editor sprite
Source 2 editor sprite

Template:Base point It is a container for VScripts. In Left 4 Dead 2, for example, this entity is used extensively for the logic in "carnival games" found in the Dark Carnival campaign, such as Peanut Gallery, Strongman Contest, Whack-a-Stach, etc.

KeyValues

EntityGroup[0] (Group00) to EntityGroup[15] (Group15) <targetname>
Entities to add in the EntityGroup array for the script.
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

Note.pngNote:logic_script in L4D2 is missing KeyValues for Entity Scripts and Script think function. These additional keys can to be added to the entity with SmartEdit turned off as vscripts <string> and thinkfunction <string>, respectively.

Inputs

Outputs

See also

External links