Logic script: Difference between revisions
Jump to navigation
Jump to search
m (→KeyValues) |
mNo edit summary |
||
| Line 1: | Line 1: | ||
{{Source topicon}} {{Source 2 topicon}} | |||
{{ | {{Lang|title=logic_script}} __NOTOC__ {{CD|CLogicScript|CPointEntity}} | ||
{{CD|CLogicScript|CPointEntity}} | [[File:Logic_script.png|left|Source 1 editor sprite]] | ||
[[File:Logic_script.png|left|Source 1 editor sprite]] | |||
==KeyValues== | [[File:Logic_script_src2.png|left|Source 2 editor sprite]] | ||
{{Entity|logic_script|type=e0|since=Left 4 Dead 2}} It is also available in {{tf2|4}} and it the 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 == | |||
{{KV|start}} | {{KV|start}} | ||
{{KV|new=1|Group00|toKey=Group15|target_destination|EntityGroup[0]|toPN=EntityGroup[15]|Entities to add in the EntityGroup array for the script.}} | {{KV|new=1|Group00|toKey=Group15|target_destination|EntityGroup[0]|toPN=EntityGroup[15]|Entities to add in the EntityGroup array for the script.}} | ||
| Line 17: | Line 20: | ||
{{IO|TerminateScriptScope|Destroys the script scope of the receving entity.|only={{tf2}}|nofgd=1}} | {{IO|TerminateScriptScope|Destroys the script scope of the receving entity.|only={{tf2}}|nofgd=1}} | ||
==See also== | == See also == | ||
* [[L4D2 Vscripts]] | * [[L4D2 Vscripts]] | ||
* [[Left 4 Dead 2 Tool Updates]] | * [[Left 4 Dead 2 Tool Updates]] | ||
* [[trigger_finale]] | * [[trigger_finale]] | ||
==External links== | == External links == | ||
* [https://web.archive.org/web/20170524163422/http://forums.steampowered.com/forums/showthread.php?t=1238461 It's the vscript'ing documentation FAQ! (Steam Forums)] | * [https://web.archive.org/web/20170524163422/http://forums.steampowered.com/forums/showthread.php?t=1238461 It's the vscript'ing documentation FAQ! (Steam Forums)] | ||
* [http://leeland.stores.yahoo.net/l4d2-scripting.html Scripting for Left 4 Dead 2 (Leeland.net)] - Example uses of logic_script | * [http://leeland.stores.yahoo.net/l4d2-scripting.html Scripting for Left 4 Dead 2 (Leeland.net)] - Example uses of logic_script | ||
Revision as of 11:26, 22 March 2023
| CLogicScript |
Template:Entity It is also available in
Team Fortress 2 and it the 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
- start ([todo internal name (i)])
- Group00 ([todo internal name (i)]) <targetname>
- EntityGroup[0]
- vscripts ([todo internal name (i)]) <scriptlist> (in all games since
) - Entity Scripts
- thinkfunction ([todo internal name (i)]) <string> (in all games since
) - Think function
- end ([todo internal name (i)])
Inputs
- RunScriptFile <script> (in all games since
) (also in
) - Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
- RunScriptCode <string> (in all games since
) (also in
) - Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console. Template:ModernBugfixTemplate:ModernNote
- CallScriptFunction <string> (in all games since
) (also in
) !FGD - Calls a VScript function defined in the scope of the receiving entity.
- TerminateScriptScope (only in
) !FGD - Destroys the script scope of the receving entity.
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

