XIII
Class ZigouillateurTriggerBis

source: C:\XIII\XIII\Classes\ZigouillateurTriggerBis.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Triggers
         |
         +--XIII.ZigouillateurTriggerBis
Direct Known Subclasses:None

class ZigouillateurTriggerBis
extends Engine.Triggers

//----------------------------------------------------------- // //-----------------------------------------------------------
Variables
 Array PersosAZigouiller


Function Summary
 void Zigouill(Actor Other)
     
//_____________________________________________________________________________



Source Code


00001	//-----------------------------------------------------------
00002	//
00003	//-----------------------------------------------------------
00004	class ZigouillateurTriggerBis extends Triggers;
00005	
00006	var() Array<Actor> PersosAZigouiller;
00007	
00008	//_____________________________________________________________________________
00009	function Zigouill(actor Other)
00010	{
00011	    local int i;
00012	    local XIIIPlayerPawn XPlayer;
00013	
00014	    foreach DynamicActors(class'XIIIPlayerPawn', XPlayer)
00015	      break;
00016	
00017	    for (i=0;i<PersosAZigouiller.Length;i++)
00018	    {
00019	      if (PersosAZigouiller[i] != none)
00020	      {
00021	        if ( (XIIIPawn(PersosAZigouiller[i]) == none) || (XPlayer == none) )
00022	          PersosAZigouiller[i].Destroy();
00023	        else
00024	        { // destroy only if not visible and not in player's hand
00025	          if ( !XPlayer.Controller.CanSee(Pawn(PersosAZigouiller[i]))
00026	          && ( XIIIPawn(PersosAZigouiller[i]) != XPlayer.LHand.pOnShoulder ) )
00027	            PersosAZigouiller[i].Destroy();
00028	        }
00029	      }
00030	    }
00031	    TriggerEvent(event,self,Pawn(other));
00032	    Destroy();
00033	}
00034	
00035	//_____________________________________________________________________________
00036	event Touch(actor other)
00037	{
00038	    Zigouill(other);
00039	}
00040	
00041	//_____________________________________________________________________________
00042	event Trigger(actor other, pawn eventinstigator)
00043	{
00044	    Zigouill(other);
00045	}
00046	
00047	
00048	
00049	defaultproperties
00050	{
00051	}

End Source Code