Difference between revisions of "Template:I Targetname"

From Valve Developer Community
Jump to: navigation, search
m
(Added a warning about strings in function parameters)
Line 14: Line 14:
 
; {{l4d2 add|<code>RunScriptCode <[[string]]></code>}}
 
; {{l4d2 add|<code>RunScriptCode <[[string]]></code>}}
 
: Execute a string of script source code.
 
: Execute a string of script source code.
 +
: {{warning|Never try to pass string parameters to a script function with this input. It will corrupt the [[VMF]] structure because of the nested quotation marks, which then must be removed manually with a text editor.}}
 
; <code>Use</code> {{Not in FGD}}
 
; <code>Use</code> {{Not in FGD}}
 
: Same as a player invoking [[Use|+use]]; may not do anything. Can also be invoked by creating an output that does not specify an input.
 
: Same as a player invoking [[Use|+use]]; may not do anything. Can also be invoked by creating an output that does not specify an input.
 
: This input is not included in Valve's [[FGD]]s.
 
: This input is not included in Valve's [[FGD]]s.
 
}}
 
}}

Revision as of 03:30, 2 June 2011

Targetname:

AddOutput <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
Kill
Removes this entity from the world.
KillHierarchy
Removes this entity and all its children from the world.
RunScriptFile <string> (New with Left 4 Dead 2)
Execute a game script from disk.
RunScriptCode <string> (New with Left 4 Dead 2)
Execute a string of script source code.
Warning: Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
Use !FGD
Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
This input is not included in Valve's FGDs.