void main()
{
object oObject=GetEnteringObject();


int nPCinArea=FALSE;

int nIdx;
object oPC=GetEnteringObject();
if (GetIsDM(oPC))
{
return;
}
if (!GetIsPC(oPC))
{
return;
}

oObject=GetFirstObjectInArea();

while (GetIsObjectValid(oObject))
  {
    if (GetIsPC(oObject)&&oObject!=oPC)
      {
      nPCinArea = TRUE;
      }
    oObject=GetNextObjectInArea();
  }

  ///  this returns true if there are any PCs in the area that are NOT
  /// the object that just entered the area

if (nPCinArea != TRUE)
  {
   if (GetIsObjectValid(GetObjectByTag("jw_silver_trap")))
      {
       return;
      }
     else
     {
      oObject=CreateObject(OBJECT_TYPE_PLACEABLE,"jw_silver_trap",GetLocation(GetObjectByTag("jw_silver_object")));
      SignalEvent(oObject,EventUserDefined(10));

     }

  }


}