Lua_run

From Valve Developer Community
< Ru
Revision as of 13:03, 5 August 2023 by NOUG4AT (talk | contribs)
Jump to navigation Jump to search
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