Ru/Lua run: Difference between revisions
< Ru
Jump to navigation
Jump to search
(перевод полный ужас) Tag: Blanking |
No edit summary |
||
Line 1: | Line 1: | ||
{{Language subpage|title=Lua_run}} | |||
'''lua_run''' это точечная сущность, доступная в {{gmod|4}}. Она выполняет необработанный код [http://en.wikipedia.org/wiki/Lua_%28programming_language%29 Lua], переданный в ключевых значениях. | |||
{{clr}} | |||
== Keyvalues == | |||
{{KV|Code|intn=Code|string|Lua code to run when triggered.</br>The lua variables {{Code|ACTIVATOR}} and {{Code|CALLER}} may be used in the code, as well as {{Code|TRIGGER_PLAYER}} if '''!activator''' resolves to a player.}} | |||
{{Bug|In Hammer, using double quotes {{Code|"}} as string arguments will corrupt the [[VMF]] file's structure, making the file unviewable for the next Hammer session.{{Workaround|You should instead use either an apostrophe (single quote) {{Code|'}} or brackets {{Code|[[]]}} to contain strings in your lua code.}}{{Fix|To fix an unreadable .vmf broken in this way, remove the double quote manually with a text editor.}}}} | |||
{{KV Targetname}} | |||
== Flags == | |||
*1: Run code on spawn | |||
== Inputs == | |||
{{IO|RunCode|Run Code that was defined in the entity.}} | |||
{{IO|RunPassedCode|param=string|Run code that was passed as a variable.}} | |||
{{I Targetname}} | |||
== Outputs == | |||
{{O Targetname}} |
Revision as of 13:03, 5 August 2023
lua_run это точечная сущность, доступная в Garry's Mod. Она выполняет необработанный код Lua, переданный в ключевых значениях.
Keyvalues
- Code (Code) <строка >
- Lua code to run when triggered.
The lua variables ACTIVATOR and CALLER may be used in the code, as well as TRIGGER_PLAYER if !activator resolves to a player.



- Name (targetname) <объект источник >
- Имя объекта, по которому другие объекты могут ссылаться на этот объект, через Входы/Выходы или другие ключ-параметры (например
parentname
илиtarget
).
Также отображаются на 2D-видах в Hammer и Отчёте об объектах (Entity Report) .См. также: Основные ключ-параметры, входы и выходы доступные для всех объектов
Flags
- 1: Run code on spawn
Inputs
- RunCode
- Run Code that was defined in the entity.
- RunPassedCode <строка >
- Run code that was passed as a variable.