Ru/Lua run: Difference between revisions

From Valve Developer Community
< 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

English (en)Русский (ru)Translate (Translate)

lua_run это точечная сущность, доступная в Garry's Mod Garry's Mod. Она выполняет необработанный код Lua, переданный в ключевых значениях.


Keyvalues

Code (Code) <строка(en)>
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.
Icon-Bug.pngБаг:In Hammer, using double quotes " as string arguments will corrupt the VMF file's structure, making the file unviewable for the next Hammer session.
PlacementTip.pngОбходной приём:You should instead use either an apostrophe (single quote) ' or brackets [[]] to contain strings in your lua code.
Note.pngРешение:To fix an unreadable .vmf broken in this way, remove the double quote manually with a text editor.
  [нужно проверить в ?]
Name(en) (targetname) <объект источник(en)>
Имя объекта, по которому другие объекты могут ссылаться на этот объект, через Входы/Выходы(en) или другие ключ-параметры(en) (например parentname или target).
Также отображаются на 2D-видах в Hammer и Отчёте об объектах (Entity Report)(en).
См. также:  Основные ключ-параметры, входы и выходы доступные для всех объектов

Flags

  • 1: Run code on spawn

Inputs

RunCode
Run Code that was defined in the entity.
RunPassedCode <строка(en)>
Run code that was passed as a variable.

Outputs