Logic script: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(-added class hierarchy)
(Also in TF2)
Line 1: Line 1:
{{toc-right}}
{{toc-right}}
{{CD|CLogicScript|CPointEntity}}
{{CD|CLogicScript|CPointEntity}}
[[File:Logic_script.png|left|Source 1 editor sprite]] [[File:Logic_script_src2.png|left|Source 2 editor sprite]] {{base point|logic_script|since=Left 4 Dead 2}} <!-- It and has been back-ported to {{tf2}} --> It is a container for [[VScript]]s. 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. <div style="clear:left"></div>
[[File:Logic_script.png|left|Source 1 editor sprite]] [[File:Logic_script_src2.png|left|Source 2 editor sprite]] {{base point|logic_script|since=Left 4 Dead 2}}. It is also available in {{tf2|4}}. It is a container for [[VScript]]s. 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. <div style="clear:left"></div>


==KeyValues==
==KeyValues==
{{KV|EntityGroup[0]|to=EntityGroup[15]|intn=Group00|intn2=Group15|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 BaseEntity}}
{{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.}}



Revision as of 04:23, 19 December 2022

C++ Class hierarchy
CLogicScript
CPointEntity
CBaseEntity
Source 1 editor sprite
Source 2 editor sprite

Template:Base point. It is also available in Team Fortress 2 Team Fortress 2. 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.
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