Login Form



Who's Online

We have 49 guests online

Statistics

OS : Linux t
PHP : 5.2.17
MySQL : 5.6.33
Time : 21:23
Caching : Disabled
GZIP : Enabled
Members : 3138
Content : 170
Web Links : 6
Content View Hits : 159369

 
containerObj1cust PDF Print E-mail
Written by Mithrandir   
Thursday, 11 February 2010 08:31

Opens with ObjA, gives ObjB. + Fail if wrong Obj

STATE_MACHINE
{
KEY { containerObj1cust }

COMMENT [This container opens with object A and gives object B.
Added fail if wrong object]

PARAM 

KEY  {1}
TYPE  {frame}
COMMENT [3D object: initial close]
DISPLAY {}
}

PARAM 

KEY  {2}
TYPE  {frame}
COMMENT [3D object: final open]
}

PARAM 

KEY  {3}
TYPE  {object}
COMMENT [Object A to open:]
IN {}
}


PARAM 

KEY  {4}
TYPE  {object}
COMMENT [Received object B:]
OUT {}
}


PARAM 

KEY  {5}
TYPE  {sound}
COMMENT [Sound to play when object B is given:]
}

PARAM 

KEY  {6}
TYPE  {LIST}
COMMENT [Options:]
LIST [Object lost=CLEARMOUSE ]
LIST [Object saved=ACTIVE ]
DEFAULT [Object saved]
}

PARAM
{
KEY {7}
TYPE {TEXT}
COMMENT [ what to say if wrong object used: ]
}

CODE
[
TRAP
{
KEY { %0 }
FLAG { ACTIVE|LIGHTBUFFER|LIGHT|NEEDPOS|SIDEDETECT|%6 }
STATE
{
KEY { close }
SETCOLLID { 1 }
FRAME { %1 }
MULTI
{
CONDITION
{
OBJECT { %3 } 
GOTO { open }
}
}
FAIL { %7 }
}

STATE
{
KEY { open }
SETCOLLID { 1 }
FRAME { %2 }
ACTION
{
OBJECT { %4 }
SOUND { %5 }
}
}
}
]
}