## XIDPawn
Class PutSoldiersToSleep

source: C:\XIII\XIDPawn\Classes\PutSoldiersToSleep.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Triggers
             |
             +--XIDPawn.PutSoldiersToSleep

Direct Known Subclasses:None

class PutSoldiersToSleep
extends Engine.Triggers

    //-----------------------------------------------------------
    //
    //-----------------------------------------------------------

Variables
`array` | `ActorsToPutToSleep`

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class PutSoldiersToSleep extends Triggers;
    00005
    00006	var() array<BaseSoldier> ActorsToPutToSleep;
    00007
    00008	//_____________________________________________________________________________
    00009	event Trigger(actor other, pawn EventInstigator)
    00010	{
    00011	    local int i;
    00012
    00013	    if ( EventInstigator.IsPlayerPawn() )
    00014	    {
    00015	      for (i=0; i<ActorsToPutToSleep.Length; i++)
    00016	        if ( ActorsToPutToSleep[i] != none )
    00017	        {
    00018	          Log("@@@ making "$ActorsToPutToSleep[i]$" Sleeping");
    00019	          ActorsToPutToSleep[i].velocity=vect(0,0,0);
    00020	          ActorsToPutToSleep[i].Acceleration = vect(0, 0, 0);
    00021	          ActorsToPutToSleep[i].SetPhysics(PHYS_None);
    00022	          ActorsToPutToSleep[i].bStasis=true;
    00023	          ActorsToPutToSleep[i].Controller.bStasis=true;
    00024	          ActorsToPutToSleep[i].SetCollision(false,false,false);
    00025	          ActorsToPutToSleep[i].SetDrawType(DT_None);
    00026	      		if (ActorsToPutToSleep[i].Shadow!=none)
    00027	      			ActorsToPutToSleep[i].Shadow.DetachProjector(true);
    00028	          level.incattente();
    00029	          if (Iacontroller(ActorsToPutToSleep[i].Controller).NiveauAlerte==1)
    00030	            level.decAlerte();
    00031	          else if (Iacontroller(ActorsToPutToSleep[i].Controller).NiveauAlerte==2)
    00032	            level.decAttaque();
    00033	          ActorsToPutToSleep[i].RefreshDisplaying();
    00034	        }
    00035	      Destroy();
    00036	    }
    00037	}
    00038
    00039
    00040
    00041	defaultproperties
    00042	{
    00043	}

End Source Code