home » builders » builder's lessons » sample objects - levers and buttons
SAMPLE OBJECTS - LEVERS AND BUTTONS
You need to set the trigger condition in value0 of the lever or button. There can be more than one trigger condition on an object and it needs to be seperated by a pipe | . Some triggers require the presence of TRIG_DOOR to work, and possibly the directional trigger. All triggers start out in the down position by default. This can be changed with the use of TRIG_UP. The lever below transports everyone in the room to room number 96 in the area after someone pushes or pulls it.
#QQ07 long steel lever~ {70}a long steel lever~ {70}A long steel lever is on one wall here.~ ~ ITEM_TYPE_LEVER FLAG_MAGIC 0 QUALITY_AVERAGE MATERIAL_STEEL COND_VERY_GOOD SIZE_LARGE TRIG_TELEPORTALL QQ96 0 0 0 0 E long steel lever~ It is a long lever that looks like it could be pulled or pushed up or down. ~
The button below when pushed or pulled will load up the mob with the vnum of 105 (a goblin) in room number 8.
#QQ08 jade green button sphere~ {A0}a jade green sphere~ {A0}A jade green sphere is on one wall here.~ ~ ITEM_TYPE_BUTTON FLAG_MAGIC 0 QUALITY_AVERAGE MATERIAL_STEEL COND_VERY_GOOD SIZE_LARGE TRIG_MLOAD|TRIG_AUTORETURN QQ08 105 0 0 0 E jade green button sphere~ It looks like it could be pushed in. ~
The chain below (which is type lever) will open up a passage when pushed or pulled. Value1 is the vnum of the room where the passage will open from. Value2 is the vnum of the room where it will connect to. Notice that all of the trigger flags are needed to make this lever work. Also note that TRIG_AUTORETURN is needed to make sure that you do not push the chain.
#QQ09 long silver chain~ {70}a long silver chain~ {70}A long silver chain hangs from the ceiling here.~ ~ ITEM_TYPE_LEVER FLAG_MAGIC 0 QUALITY_AVERAGE MATERIAL_STEEL COND_VERY_GOOD SIZE_LARGE TRIG_PASSAGE|TRIG_DOOR|TRIG_D_UP|TRIG_AUTORETURN QQ50 QQ99 0 0 0 E long silver chain~ It is made from a shiny silver and hangs from the ceiling. ~