Linedef type 443

From SRB2 Wiki
Jump to: navigation, search
Warning icon.png
This article or section should contain one or more images. Please spruce up the article by adding an image.

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

The tag given to this linedef is irrelevant. 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.

Sample

Example WAD: ex_ld443_callluafunction.wad
  • This example WAD can be played in any gametype. It uses MAP01, replacing Greenflower Zone Act 1.
  • 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.

  Linedef types - Linedef executors [view]
Triggers:

ContinuousEach TimeOnceRing Count - ContinuousRing Count - OnceCharacter Ability - ContinuousCharacter Ability - Each TimeCharacter Ability - OnceRace Only - OnceCTF Red Team - ContinuousCTF Red Team - Each TimeCTF Blue Team - ContinuousCTF Blue Team - Each TimeNo More Enemies - OnceNumber of Pushables - Continuous Number of Pushables - OnceCondition Set Trigger - ContinuousCondition Set Trigger - OnceUnlockable - ContinuousUnlockable - OnceTrigger After X Calls - ContinuousTrigger After X Calls - Each TimeLevel Load


Actions:
Sector:
Set Tagged Sector's Floor Height/TextureSet Tagged Sector's Ceiling Height/TextureSet Tagged Sector's Light LevelChange Tagged Sectors' TagChange Front Sector's TagStart Adjustable Fire FlickerStart Adjustable Glowing LightStart Adjustable Blinking Light (unsynchronized)Start Adjustable Blinking Light (synchronized)Fade Light LevelStop Lighting EffectChange Plane Scroller Direction
Plane movement:
Move Tagged Sector's FloorMove Tagged Sector's CeilingMove Floor According to Front Texture OffsetsMove Ceiling According to Front Texture OffsetsStop Plane MovementStart Platform MovementCrush Ceiling OnceCrush Floor OnceCrush Ceiling and Floor Once
Player/Object:
TeleporterChange Object StateStop ObjectAward ScoreEnable/Disable 2D ModeEnable/Disable Gravity FlipAward Power-UpDisable Player ControlChange Object SizeChange Object Type State
Other:
Change MusicPlay Sound EffectRun ScriptSwitch to Cut-Away ViewChange SkyChange WeatherShatter FOFChange Tagged Linedef's TexturesStart Metal Sonic RaceCondition Set TriggerCall Lua FunctionEarthquakeMake FOF Disappear/ReappearExecute Linedef Executor (from Tag)Execute Linedef Executor (Random Range)
PolyObject:
Door SlideDoor SwingMoveMove, OverrideRotate RightRotate Right, OverrideRotate LeftRotate Left, OverrideMove by WaypointsTurn Invisible, IntangibleTurn Visible, TangibleSet Translucency