32 lines
1009 B
Plaintext
32 lines
1009 B
Plaintext
void main()
|
|
{
|
|
if ( GetLocalInt( OBJECT_SELF, "m_bActivated" ) == TRUE )
|
|
{
|
|
SetLocalInt( OBJECT_SELF, "m_bActivated", FALSE );
|
|
PlayAnimation( ANIMATION_PLACEABLE_DEACTIVATE );
|
|
}
|
|
else
|
|
{
|
|
SetLocalInt( OBJECT_SELF, "m_bActivated", TRUE );
|
|
PlayAnimation( ANIMATION_PLACEABLE_ACTIVATE );
|
|
}
|
|
|
|
object oArea = GetArea(OBJECT_SELF);
|
|
object oObjectToClean = GetFirstObjectInArea(oArea);
|
|
while (GetIsObjectValid(oObjectToClean))
|
|
{
|
|
if (
|
|
!GetIsPC(oObjectToClean) &&
|
|
!GetIsDM(oObjectToClean) &&
|
|
!GetPlotFlag(oObjectToClean) &&
|
|
GetObjectType(oObjectToClean) == OBJECT_TYPE_CREATURE
|
|
)
|
|
{
|
|
//SendMessageToPC(oExiting, "Destroying " + GetName(oObjectToClean));
|
|
DestroyObject(oObjectToClean, 0.1);
|
|
}
|
|
|
|
oObjectToClean = GetNextObjectInArea(oArea);
|
|
}
|
|
}
|