Login Form



Who's Online

We have 9 guests online

Statistics

OS : Linux t
PHP : 5.3.29
MySQL : 5.6.36
Time : 20:44
Caching : Disabled
GZIP : Enabled
Members : 3138
Content : 171
Web Links : 6
Content View Hits : 222203

 
DoorSenseWear PDF Print E-mail
Written by Mithrandir   
Wednesday, 10 February 2010 08:46

Taken from Pilgrim's post:

It's like those automatic doors you get in supermarkets, you approach and they open... but only if you're wearing a specific object.

STATE_MACHINE {
KEY {DoorSenseWear}
COMMENT [Door that opens if the Player has an object in their worn equipment (weapons, torch, shield, armour, helmet, amulet or rings but not backpack) and is within a certain radius.]

PARAM {
KEY {1}
TYPE {FRAME}
DEFAULT {PORTES_C}
DISPLAY {}
COMMENT [Closed frame:]}

PARAM {
KEY {2}
TYPE {FRAME}
DEFAULT {PORTES_O}
COMMENT [Open frame:]}

PARAM {
KEY {3}
TYPE {ALPHA}
COMMENT [Object to sense:]}

PARAM {
KEY {4}
TYPE {INT}
DEFAULT {3}
COMMENT [Sense radius (minimum of 2):]}

PARAM {
KEY {5}
TYPE {SOUND}
COMMENT [Sound when door opens:]
DEFAULT {DOOROPEN}}

PARAM {
KEY {6}
TYPE {ALPHA}
COMMENT [Effect when door opens (e.g.: TOWNPORTALA):]}

PARAM {
KEY {7}
TYPE {LIST}
LIST [Low (e.g.: portcullis)=SETLOWCOLLID]
LIST [High (e.g.: door)=SETCOLLID]
DEFAULT [High (e.g.: door)]
COMMENT [High or low collision?]}

CODE [
TRAP {
KEY {%0}
FLAG {LIGHT|LIGHTBUFFER|NEEDPOS|SIDEDETECT}

STATE {
KEY {CLOSED}
%7 {1}
FRAME {%1}
MULTI {
CONDITION {
SENSEWEAR {%3,%4}
GOTO {OPEN}}}}

STATE {
KEY {OPEN}
CLEARCOLLID {1}
FRAME {%2}
ACTION {
SOUND {%5}
EFFECT {%6}}}}]}