home » builders » builder's lessons » level trigger flags

Lever trigger flags

The following triggers can be used on levers and buttons. For some of the triggers that open doors, you will need to make sure that you have TRIG_DOOR utilised. You can have more than one trigger on a lever or button. Just seperate them with a pipe | . Buttons should have the TRIG_UP and TRIG_AUTORETURN triggers set on them. Anything that is only meant to be pulled should have the TRIG_AUTORETURN trigger set.

TRIGGER BIT VECTOR COMMENT
TRIG_NONE 0 Use 0 when there are no triggers
TRIG_UP 1 Lever starts out in the up position
TRIG_UNLOCK 2 This will set a newly created exit or existing one to unlocked
TRIG_LOCK 4This will set a newly crated exit or exiting one to locked
TRIG_D_NORTH 8Sets the exit to open to the north
TRIG_D_SOUTH 16Sets the exit to open to the south
TRIG_D_EAST 32Sets the exit to open to the east
TRIG_D_WEST 64Sets the exit to open to the west
TRIG_D_UP 128Sets the exit open up
TRIG_D_DOWN 256Sets the exit to open down
TRIG_DOOR 512This is required to make any of the triggers utilising exits work
TRIG_CONTAINER 1024This trigger is not used
TRIG_OPEN 2048This trigger opens any door that is generated with other triggers
TRIG_CLOSE 4096This trigger closes any door that is generated with other exit triggers
TRIG_PASSAGE 8192This trigger is needed to create a new exit.
TRIG_OLOAD 16384Loads up an object. Value1 is the Room. Value2 is the mob number.
TRIG_MLOAD 32768Loads up a mobile. Value1 is the Room. Value2 is the mob number.
TRIG_TELEPORT 65536Teleports lever puller or button pusher to set vnum
TRIG_TELEPORTALL 131072Teleports everyone in the room to set vnum
TRIG_TELEPORTPLUS 262144This trigger is not used
TRIG_DEATH 524288This trigger is not used
TRIG_CAST 1048576Casts a spell on lever/button pusher. Value1 needs to contain the spell number
TRIG_FAKEBLADE 2097152This trigger is not used
TRIG_RANDFOUR 4194304Randomises the existing exits of the vnum in value1 to NSEW. It will not add new exits, just change where the existing ones go.
TRIG_RANDSIX 8388608Randomises the existing exits of the vnum in value1 to NSEWDU. It will not add new exits, just change where the existing ones go.
TRIG_TRAPDOOR 16777216This trigger is not used
TRIG_ANOTHEROOM 33554432This trigger is not used
TRIG_USEDIAL 67108864This trigger is not used
TRIG_ABSOLUTEVNUM 134217728This trigger is not used
TRIG_SHOWROOMDESC 268435456Required in order to allow the teleported to know that they have been teleported
TRIG_AUTORETURN 536870912This will make the trigger go back to the original position
TRIG_NOTRAP 536870912Will bypass any traps on the exit if used. It allows for a trap to be on a door that will not trigger if the lever is used to open it instead of other means.