Linedef type 443
Linedef type 443, Call Lua Function, is a type of linedef executor which, when triggered, executes a Lua function, essentially creating a custom linedef executor effect.
Setup
To make a Lua function executable by this linedef executor, it needs to be added to the LinedefExecute
hook with the command addHook("LinedefExecute", function, "NAME")
. function
is the name of the function to be executed. It must take two arguments: the control linedef and the Object that triggered the linedef executor. NAME
is the name by which the linedef can then reference the function. This name should be written in the control linedef's front upper texture field. If the name is longer than eight characters, it continues in the front middle texture and front lower texture fields. The tag, texture offsets, and back side texture names are irrelevant to this linedef executor, and may be used by the Lua function for whatever purpose is needed.
|
Sample
- Example file: ex_ld443_callluafunction.wad (MAP01)
- The function in this example,
verticalBoost
, sets the vertical momentum of the triggering Object to the length of the control linedef, divided by 4. - The function is referenced by the name
EXAMPLE
in the control linedef's front upper texture.
How to use |
---|
|