Template:I Targetname: Difference between revisions
Jump to navigation
Jump to search
m (Marked RunScriptCode behavior as bug in L4D2, and clarified script input behavior.) |
(Added SetLocalOrigin and SetLocalAngles to inputs section.) |
||
Line 8: | Line 8: | ||
{{IO|RunScriptCode|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. {{bug| In {{l4d2}}, the code is executed in the script scope of the entity that fires the output, ''not'' the one receiving the input.}} {{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.}}|param=string|since=L4D2}} | {{IO|RunScriptCode|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. {{bug| In {{l4d2}}, the code is executed in the script scope of the entity that fires the output, ''not'' the one receiving the input.}} {{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.}}|param=string|since=L4D2}} | ||
{{IO|CallScriptFunction|Execute a VScript function in the scope of the receiving entity. {{note|This input is missing from some games FGD files.}} |param=string|since=L4D2}} | {{IO|CallScriptFunction|Execute a VScript function in the scope of the receiving entity. {{note|This input is missing from some games FGD files.}} |param=string|since=L4D2}} | ||
{{IO|SetLocalOrigin|Set this entity's origin in the map. {{note|This input is missing from some games FGD files.}} |param=origin|since=AS}} | |||
{{IO|SetLocalAngles|Set this entity's angles in the map. {{note|This input is missing from some games FGD files.}} |param=angles|since=AS}} | |||
}}<noinclude> | }}<noinclude> | ||
[[Category:Input Templates|Targetname]] | [[Category:Input Templates|Targetname]] | ||
</noinclude> | </noinclude> |
Revision as of 13:53, 12 April 2017
Targetname:
- Kill
- Removes this entity from the world.
- KillHierarchy
- Removes this entity and all its children from the world.
- 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.
- 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.
- RunScriptFile <script> (in all games since
)
- 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
)
- 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.
Bug: In
, the code is executed in the script scope of the entity that fires the output, not the one receiving the input. [todo tested in ?]
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.
- CallScriptFunction <string> (in all games since
)
- Execute a VScript function in the scope of the receiving entity.
Note:This input is missing from some games FGD files.