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