## XIDPawn
Class HostageDetectVolume

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

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Brush
             |
             +--Engine.Volume
                |
                +--XIDPawn.HostageDetectVolume

Direct Known Subclasses:None

class HostageDetectVolume
extends Engine.Volume

    //-----------------------------------------------------------
    //    HostageDetectVolume
    //-----------------------------------------------------------

Variables
`XIIIPlayerPawn` | `XIII`
`bool` | `bActivated`

States
init

Function Summary
`void` | `Trigger(Actor Other, Pawn EventInstigator)`
    // When detectionvolume is triggered...
    //
`void` | `Trigger(Actor Other, Pawn EventInstigator)`
    // When detectionvolume is triggered...
    //

State init Function Summary

Source Code

    00001	//-----------------------------------------------------------
    00002	//    HostageDetectVolume
    00003	//-----------------------------------------------------------
    00004	class HostageDetectVolume extends Volume;
    00005
    00006	ignores touch;
    00007
    00008	var bool bActivated;
    00009	var XiiiPlayerPawn XIII;
    00010
    00011	auto state init
    00012	{
    00013	begin:
    00014	   XIII=XIIIPlayerPawn(XIIIGameInfo(level.game).mapinfo.XIIIpawn);
    00015	   gotostate('');
    00016	}
    00017
    00018
    00019	//-----------------------------------------------------------------------------------
    00020	//-----------------------------------------------------------------------------------
    00021	//Detection quand perso rentre dans volume avec otage
    00022	//
    00023	state() Detection
    00024	{
    00025		function Trigger( actor Other, pawn EventInstigator )
    00026	  {
    00027	  }
    00028	  //_______________________________________________________________
    00029	  // When HostageDetectvolume is triggered...
    00030		event Touch( actor Other)
    00031		{
    00032	      if (!bActivated)
    00033	     	{
    00034	          if (Other==XIII && XIII.bPrisonner)
    00035	          {
    00036	             bActivated=true;
    00037	             instigator=xiiipawn(Other);
    00038	             TriggerEvent(Event, Self, instigator);
    00039	             gotostate('');
    00040	          }
    00041	   	  }
    00042		}
    00043	begin:
    00044	}
    00045
    00046	// When detectionvolume is triggered...
    00047	//
    00048	function Trigger( actor Other, pawn EventInstigator )
    00049	{
    00050	     Instigator = EventInstigator;
    00051	     gotostate('Detection');
    00052	}
    00053
    00054
    00055
    00056	defaultproperties
    00057	{
    00058	     bStatic=False
    00059	     bAlwaysRelevant=True
    00060	     InitialState="Detection"
    00061	     CollisionRadius=126.000000
    00062	     CollisionHeight=126.000000
    00063	}

End Source Code