## XIII
Class HeadShotSFXTrigger

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

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

Direct Known Subclasses:None

class HeadShotSFXTrigger
extends XIII.XIIITriggers

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

Variables
`color` | `FilterColor`
`Material` | `FilterTexture`
`float` | `HighLight`

Function Summary
`void` | `Trigger(Actor Other, Pawn EventInstigator)`
    //____________________________________________________________________
    // Triggered by a character when dying, check if died by requireed cond then spawn CWndHeadShot

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class HeadShotSFXTrigger extends XIIITriggers;
    00005
    00006	var() color FilterColor;
    00007	var() float HighLight;
    00008	var() Material FilterTexture;
    00009
    00010	//____________________________________________________________________
    00011	// Triggered by a character when dying, check if died by requireed cond then spawn CWndHeadShot
    00012	function Trigger( actor Other, pawn EventInstigator )
    00013	{
    00014	    // Other = Dead, EventInstigator = Killer
    00015	    Local XIIIPawn XP;
    00016	    Local CWndHeadShot CWnd;
    00017
    00018	    if ( !EventInstigator.IsPlayerPawn() )
    00019	      return;
    00020
    00021	    XP = XIIIPawn(Other);
    00022	    DebugLog("HeadShotSFXTrigger by "$XP$" HitDamageType="$XP.HitDamageType);
    00023	    if ( (XP == none) || (XP.HitDamageType != class'DTHeadShot') )
    00024	      return;
    00025
    00026	    XP = XIIIPlayerPawn(EventInstigator);
    00027	    if ( XIIIBaseHUD(XIIIPlayerController(XP.Controller).MyHud).HudDlg != none )
    00028	      return;
    00029	    XIIIBaseHUD(XIIIPlayerController(XP.Controller).MyHud).EraseLowPriorityCartoonWindows();
    00030	    if ( CWnd != none )
    00031	        CWnd.Destroy();
    00032	    CWnd = Spawn(class'XIII.CWndHeadShot',XP);
    00033	    if ( CWnd != none )
    00034	    {
    00035	      CWnd.Killed = XIIIPawn(Other);
    00036	      CWnd.MyHudForFX = XIIIBaseHUD(XIIIPlayerController(XP.Controller).MyHud);
    00037	      CWnd.FilterColor = FilterColor;
    00038	      CWnd.HighLight = HighLight;
    00039	      CWnd.FilterTexture = FilterTexture;
    00040	      CWnd.Timer();
    00041	      DebugLog("HeadShotSFXTrigger NewCWnd"@CWnd);
    00042	    }
    00043	//    Destroy(); // now this can be triggered several times
    00044	}
    00045
    00046
    00047
    00048	defaultproperties
    00049	{
    00050	     FilterColor=(G=116,R=244,A=150)
    00051	     HighLight=0.300000
    00052	}

End Source Code