Login Form



Who's Online

We have 3 guests online

Statistics

OS : Linux t
PHP : 5.3.29
MySQL : 5.6.36
Time : 15:42
Caching : Disabled
GZIP : Enabled
Members : 3138
Content : 171
Web Links : 6
Content View Hits : 221037

 
Trigger pad with reactivation delay PDF Print E-mail
Written by Mithrandir   
Wednesday, 10 February 2010 17:12

Sends a message when walked on. Delayed re-activation. Used in The Arena in Elric's Legacy

STATE_MACHINE
{
KEY { Contact1Delay }
COMMENT [Sends a message when we walk on it, delay until activated again.]

PARAM
{
KEY { 1 }
TYPE {FRAME}
COMMENT [3D object : switch released]
DISPLAY {}
}

PARAM
{
KEY { 2 }
TYPE {FRAME}
COMMENT [3D object : switch pushed]
}

PARAM
{
KEY { 3 }
TYPE {INT}
COMMENT [Message number to be sent when we walk on it:]
DEFAULT {1}
}

PARAM
{
KEY { 4 }
TYPE {INT}
COMMENT [Message number to be sent when we leave the switch:]
DEFAULT {0}
}

PARAM
{
KEY { 5 }
TYPE {INT}
COMMENT [Range of detection:]
DEFAULT {1}
}

PARAM
{
KEY { 6 }
TYPE {INT}
COMMENT [Delay before reactivation:]
DEFAULT {20000}
}
CODE
[

TRAP
{
KEY { %0 }
FLAG { LIGHTBUFFER|LIGHT|ACTIVE|TRANSMIT|HANDLE }
STATE
{
KEY { relache }
CLEARCOLLID { 1 }
FRAME {%1}

ACTION
{
MSG { %4 }
}

MULTI
{
CONDITION
{
COLLIDEX { 1,%5,1 }
GOTO { enfonce }
}
}

}

STATE
{
KEY { enfonce }
CLEARCOLLID { 1 }
FRAME {%2}
ACTION
{
MSG { %3 }
}
MULTI
{
CONDITION
{
TIMER { %6 }
GOTO { relache }
}
}
}

STATE
{
KEY { end }
}
}
]
}