27 lines
934 B
Plaintext
27 lines
934 B
Plaintext
////////////////////////////////////////////////////////////////////////////////
|
|
// pl_ou_secretd - On Used Secret Door Placeable
|
|
// By Deva B. Winblood. December 11th, 2008
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void main()
|
|
{
|
|
object oMe=OBJECT_SELF;
|
|
object oDest=GetLocalObject(oMe,"oDest");
|
|
object oPC=GetLastUsedBy();
|
|
if (GetIsPC(oPC))
|
|
{ // door used
|
|
if (GetLocalInt(oMe,"bOpened"))
|
|
{ // is open
|
|
AssignCommand(oPC,ClearAllActions(TRUE));
|
|
AssignCommand(oPC,JumpToObject(oDest));
|
|
} // is open
|
|
else
|
|
{ // open it
|
|
SetLocalInt(oMe,"bOpened",TRUE);
|
|
SetLocalInt(oDest,"bOpened",TRUE);
|
|
AssignCommand(oMe,ActionPlayAnimation(ANIMATION_PLACEABLE_OPEN));
|
|
AssignCommand(oDest,ActionPlayAnimation(ANIMATION_PLACEABLE_OPEN));
|
|
} // open it
|
|
} // door used
|
|
}
|