## XIDCine
Class SeenTrigger

source: C:\XIII\XIDCine\Classes\SeenTrigger.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Triggers
             |
             +--Engine.Trigger
                |
                +--XIDCine.SeenTrigger

Direct Known Subclasses:None

class SeenTrigger
extends Engine.Trigger

    //=============================================================================
    // SeenTrigger.
    // Created by iKi
    // Last Modification by iKi
    //=============================================================================

Variables
`float` | `CheckInterval`
`float` | `MinimalDistance`
`bool` | `bInitiallyActive`

Source Code

    00001	//=============================================================================
    00002	// SeenTrigger.
    00003	// Created by iKi
    00004	// Last Modification by iKi
    00005	//=============================================================================
    00006	class SeenTrigger extends Trigger
    00007		HideCategories(force,lightcolor,lighting,rolloff,sound);
    00008
    00009	#exec Texture Import File=Textures\seen_ico.pcx Name=Seen_ico Mips=Off Masked=1
    00010
    00011	VAR()	float CheckInterval;
    00012	VAR()	bool bInitiallyActive;
    00013	VAR()	float MinimalDistance;
    00014
    00015	STATE() SeenTrigger
    00016	{
    00017		EVENT BeginState()
    00018		{
    00019			bHidden=false;
    00020			SetDrawType(DT_Sprite);
    00021			Texture=None;
    00022			RefreshDisplaying();
    00023			if ( bInitiallyActive )
    00024				SetTimer( CheckInterval, true );
    00025		}
    00026
    00027		EVENT Timer( )
    00028		{
    00029			if ( PlayerCanSeeMe() )
    00030				DebugLog( "SeenTrigger::Timer::LastRenderDist"@ LastRenderDist );
    00031			if ( PlayerCanSeeMe() && LastRenderDist<MinimalDistance )
    00032			{
    00033				TriggerEvent( event, self, none );
    00034				if ( bTriggerOnceOnly )
    00035					Destroy();
    00036			}
    00037		}
    00038
    00039		EVENT Trigger( actor a, pawn p )
    00040		{
    00041			SetTimer( CheckInterval, true );
    00042		}
    00043
    00044	}
    00045
    00046
    00047
    00048	defaultproperties
    00049	{
    00050	     CheckInterval=0.300000
    00051	     MinimalDistance=1000.000000
    00052	     bTriggerOnceOnly=True
    00053	     bCollideActors=False
    00054	     InitialState="SeenTrigger"
    00055	     Texture=Texture'XIDCine.Seen_ico'
    00056	}

End Source Code