Logic script: Difference between revisions
Jump to navigation
Jump to search
Note:The array can be extended beyond 16 entities. Simply add additional Group## keys with SmartEdit turned off.
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
Note:RunScriptCode may need quotation marks added to the string. This is true in Left 4 Dead 2.
mNo edit summary |
ThaiGrocer (talk | contribs) (→Inputs: Added CallScriptFunction and noted necessary quotation marks for RunScriptCode in L4D2) |
||
Line 11: | Line 11: | ||
== Inputs == | == Inputs == | ||
{{I Targetname}} | {{I Targetname}} | ||
{{note|RunScriptCode may need quotation marks added to the string. This is true in Left 4 Dead 2.}} | |||
{{IO|CallScriptFunction|Execute a function declared in the vscript. No quotations and parentheses are necessary.|param=string}} | |||
== Outputs == | == Outputs == |
Revision as of 10:48, 14 January 2013
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] ([todo internal name (i)]) to EntityGroup[15] <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
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities

<string>
and thinkfunction <string>
, respectively.Inputs

- CallScriptFunction <string >
- Execute a function declared in the vscript. No quotations and parentheses are necessary.
Outputs
See also
External links
- It's the vscript'ing documentation FAQ! (Steam Forums)
- Scripting for Left 4 Dead 2 (Leeland.net) - Example uses of logic_script