## XIDPawn
Class CWndBackShotTrigger

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

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Triggers
             |
             +--XIII.XIIITriggers
                |
                +--XIII.CWndSFXTrigger
                   |
                   +--XIDPawn.CWndBackShotTrigger

Direct Known Subclasses:None

class CWndBackShotTrigger
extends XIII.CWndSFXTrigger

    //-----------------------------------------------------------
    // Trigger to display CWnd on screen
    //-----------------------------------------------------------

Variables
`XIIIPlayerController` | `XPC`

States
STA_BackShotSFXTrigger

Function Summary
`void` | `Trigger(Actor Other, Pawn EventInstigator)`
    //____________________________________________________________________

State STA_BackShotSFXTrigger Function Summary

Source Code

    00001	//-----------------------------------------------------------
    00002	// Trigger to display CWnd on screen
    00003	//-----------------------------------------------------------
    00004	class CWndBackShotTrigger extends CWndSFXTrigger;
    00005
    00006
    00007	var(CWndSFXTrigger) actor EnemyInTheBack;
    00008
    00009	var XIIIPlayerController XPC;
    00010
    00011
    00012	//____________________________________________________________________
    00013	function Trigger( actor Other, pawn EventInstigator )
    00014	{
    00015		Instigator = EventInstigator;
    00016		Disable( 'Trigger' );
    00017		SetTimer2(0.1,false);
    00018	}
    00019
    00020	//____________________________________________________________________
    00021	event Timer2()
    00022	{
    00023		XPC = XIIIGameInfo(Level.Game).MapInfo.XIIIController;
    00024
    00025		// cas d'un ennemi qui shoote le joueur dans le dos
    00026		if (( EnemyInTheBack.IsA('BaseSoldier') ) || ( EnemyInTheBack.IsA('GenNMI') ))
    00027		{
    00028			if ( EnemyInTheBack.IsA('GenNMI') )
    00029			{
    00030				EnemyInTheBack = GenNMI(EnemyInTheBack).SpawnActor;
    00031			}
    00032			GotoState('STA_BackShotSFXTrigger');
    00033		}
    00034	}
    00035
    00036	//____________________________________________________________________
    00037	State STA_BackShotSFXTrigger
    00038	{
    00039		event Tick( float dt )
    00040		{
    00041			if (( EnemyInTheBack == none ) || ( BaseSoldier(EnemyInTheBack).bIsDead ))
    00042				Destroy();
    00043			else
    00044			{
    00045				if ( IAController(BaseSoldier(EnemyInTheBack).Controller).bTire )
    00046				{
    00047					if ( !XPC.CanSee(BaseSoldier(EnemyInTheBack)) )
    00048					{
    00049						if ( (Level.Game != none) && (Level.Game.DetailLevel < 2) )
    00050							bAnimatedInRealTime = false;
    00051						iPhase = -1;
    00052						SetTimer(0.25,false);
    00053						TriggerEvent( Event, Self, Instigator );
    00054						GotoState('');
    00055					}
    00056					else
    00057						Destroy();
    00058				}
    00059			}
    00060		}
    00061	}
    00062
    00063
    00064
    00065	defaultproperties
    00066	{
    00067	}

End Source Code