## XIII
Class SixSenseForcedVolume

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

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Brush
             |
             +--Engine.Volume
                |
                +--XIII.SixSenseForcedVolume

Direct Known Subclasses:None

class SixSenseForcedVolume
extends Engine.Volume

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

Variables
`XIIIPlayerPawn` | `PawnInside`
`SixSenseSkill` | `SSSk`

States
WaitForTouch

State WaitForTouch Function Summary
`void` | `Timer()`
    //_____________________________________________________________________________
`void` | `UnTouch(Actor Other)`
`void` | `Touch(Actor Other)`

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class SixSenseForcedVolume extends Volume;
    00005
    00006	var SixSenseSkill SSSk;
    00007	var XIIIPlayerPawn PawnInside;
    00008
    00009	//_____________________________________________________________________________
    00010	auto state WaitForTouch
    00011	{
    00012	    function Touch (actor Other)
    00013	    {
    00014	      Log(self@"touched by"@other);
    00015
    00016	      if ( XIIIPlayerPawn(Other) != none )
    00017	      {
    00018	        if ( XIIIPlayerPawn(Other).SSSk == none )
    00019	        {
    00020	          XIIIPlayercontroller(XIIIPlayerPawn(Other).Controller).ConsoleCommand("ImAnAlien");
    00021	          PawnInside = XIIIPlayerPawn(Other);
    00022	          SSSk = XIIIPlayerPawn(Other).SSSk;
    00023	          SetTimer(0.05, true);
    00024	        }
    00025	        else
    00026	        {
    00027	          SSSk = XIIIPlayerPawn(Other).SSSk;
    00028	          SetTimer(0.05, true);
    00029	        }
    00030	      }
    00031	    }
    00032	    function UnTouch (actor Other)
    00033	    {
    00034	      Log(self@"untouched by"@other);
    00035
    00036	      if (XIIIPlayerPawn(Other) != none )
    00037	      {
    00038	        if ( XIIIPlayerPawn(Other).SSSk != none )
    00039	        {
    00040	          SSSk = XIIIPlayerPawn(Other).SSSk;
    00041	          XIIIPlayerPawn(Other).SSSk = none;
    00042	          SSSk.Destroy();
    00043	          SetTimer(0.0, false);
    00044	        }
    00045	      }
    00046	    }
    00047	}
    00048
    00049	//_____________________________________________________________________________
    00050	function Timer()
    00051	{
    00052	    if ( SSSk != none )
    00053	      SSSk.Timer();
    00054	    else
    00055	      SSSk = PawnInside.SSSk;
    00056
    00057	}
    00058
    00059
    00060
    00061	defaultproperties
    00062	{
    00063	     bStatic=False
    00064	     bAlwaysRelevant=True
    00065	}

End Source Code