## XIII
Class MagneticPassTrigger

source: C:\XIII\XIII\Classes\MagneticPassTrigger.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Triggers
             |
             +--XIII.XIIITriggers
                |
                +--XIII.MagneticPassTrigger

Direct Known Subclasses:None

class MagneticPassTrigger
extends XIII.XIIITriggers

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

Variables
`Texture` | `Icon` Delay before event
`Texture` | `NeverUsedIcon` Delay before event
`float` | `OutDelay` Delay before event
`name` | `OutEvent` Event to cause
`Texture` | `UsedIcon` Delay before event

Function Summary
`void` | `PostBeginPlay()`
    //_____________________________________________________________________________
`void` | `Trigger(Actor Other, Pawn EventInstigator)`
    //_____________________________________________________________________________
    // Magnetic Pass Used

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class MagneticPassTrigger extends XIIITriggers;
    00005
    00006	var() name  OutEvent;   // Event to cause
    00007	var() float OutDelay;   // Delay before event
    00008	var texture Icon;
    00009	var() texture NeverUsedIcon;
    00010	var() texture UsedIcon;
    00011	//var(DoorLock) XIIIPorte LinkedDoor;
    00012
    00013	//_____________________________________________________________________________
    00014	function PostBeginPlay()
    00015	{
    00016	    Super.PostBeginPlay();
    00017	    Icon = NeverUsedIcon;
    00018	}
    00019
    00020	//_____________________________________________________________________________
    00021	// Magnetic Pass Used
    00022	function Trigger( actor Other, pawn EventInstigator )
    00023	{
    00024	    // test if interaction exists
    00025		if ( ( XIIIGameInfo(Level.Game).MapInfo.XIIIController.MyInteraction.TargetActor != none ) && ( XIIIGameInfo(Level.Game).MapInfo.XIIIController.MyInteraction.TargetActor == self ) )
    00026		{
    00027			Instigator = EventInstigator;
    00028			Icon = UsedIcon;
    00029			gotostate('Dispatch');
    00030		}
    00031	}
    00032
    00033	//_____________________________________________________________________________
    00034	// Dispatch events.
    00035	state() Dispatch
    00036	{
    00037	    ignores trigger;
    00038	Begin:
    00039	  if( (OutEvent != '') && (OutEvent != 'None') )
    00040	  {
    00041	    Sleep( OutDelay );
    00042	    TriggerEvent(OutEvent,self,Instigator);
    00043	  }
    00044	  GotoState('');
    00045	}
    00046
    00047
    00048
    00049	defaultproperties
    00050	{
    00051	     NeverUsedIcon=Texture'XIIIMenu.HUD.Hand_ClosedDoor'
    00052	     UsedIcon=Texture'XIIIMenu.HUD.Hand_SearchBody'
    00053	     bCanBeLocked=True
    00054	     bInteractive=True
    00055	}

End Source Code