Logic script: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(→‎External links: Restored some meaningful resources that apply to any source game with logic_script + squirrel.)
m (→‎KeyValues: Restored note about missing keyvalues while minimizing specialization. Thanks, Barracuda!)
Line 8: Line 8:
{{Note|The array can be extended beyond 16 entities. Simply add additional Group## keys with SmartEdit turned off.}}  
{{Note|The array can be extended beyond 16 entities. Simply add additional Group## keys with SmartEdit turned off.}}  
{{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.}}


== Inputs ==
== Inputs ==

Revision as of 13:20, 10 June 2011

Squirrel Template:Base point multi

Entity description

A container for scripts. 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] ([todo internal name (i)]) to EntityGroup[15] <targetname>
Entities to add in the EntityGroup array for the script.
Note.pngNote:The array can be extended beyond 16 entities. Simply add additional Group## keys with SmartEdit turned off.
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