## XIDMaps
Class Map05_Heliport

source: C:\XIII\XIDMaps\Classes\Map05_Heliport.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Info
             |
             +--XIII.MapInfo
                |
                +--XIDMaps.Map05_Heliport

Direct Known Subclasses:None

class Map05_Heliport
extends XIII.MapInfo

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

Variables
`int` | `StackPointer`
`float` | `TriggerDelay`

States
STA_isWarned

Function Summary
`void` | `SetGoalComplete(int N)`

State STA_isWarned Function Summary

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class Map05_Heliport extends MapInfo placeable;
    00005
    00006	VAR				bool bInformed;
    00007	VAR				Pawn PolicemenStack[4];
    00008	VAR				float TimeStack[4];
    00009	VAR				float TimeStamp;
    00010	VAR TRANSIENT	int StackPointer;
    00011	VAR()			float TriggerDelay;
    00012
    00013	//_____________________________________________________________________________
    00014	EVENT Trigger( Actor Other, Pawn EventInstigator )
    00015	{
    00016		LOCAL int i;
    00017
    00018	// record who had seen XIII and when
    00019		for (i=0;i<4;++i)
    00020			if (PolicemenStack[i]==none)
    00021			{
    00022				PolicemenStack[i]=EventInstigator;
    00023				TimeStack[i]=TimeStamp;
    00024			}
    00025		if (GetStateName()!='STA_isWarned')
    00026			GotoState('STA_isWarned');
    00027	}
    00028
    00029	FUNCTION SetGoalComplete(int N)
    00030	{
    00031		if ( N==0 )
    00032			SetPrimaryGoal(3);
    00033
    00034			super.SetGoalComplete(N);
    00035	}
    00036
    00037	EVENT Tick(float dt)
    00038	{
    00039		TimeStamp+=dt;
    00040	}
    00041
    00042	STATE STA_isWarned
    00043	{
    00044		EVENT Tick(float dt)
    00045		{
    00046			LOCAL int i;
    00047	//		LOCAL bool bNoPolicemenInList;
    00048
    00049	//		bNoPolicemenInList=true;
    00050
    00051			TimeStamp+=dt;
    00052			for (i=0;i<4;++i)
    00053			{
    00054				if (PolicemenStack[i]!=none)
    00055					if (PolicemenStack[i].bisdead)
    00056						PolicemenStack[i]=none;
    00057					else
    00058					{
    00059	//				bNoPolicemenInList=false;
    00060						if (TimeStamp-TimeStack[i]>TriggerDelay)
    00061							TriggerEvent(event,none,none);
    00062					}
    00063
    00064			}
    00065	//		if (bNoPolicemenInList)
    00066	//		{
    00067	//			GotoState('');
    00068	//		}
    00069
    00070		}
    00071	}
    00072
    00073
    00074
    00075	defaultproperties
    00076	{
    00077	     TriggerDelay=4.000000
    00078	     EndMapVideo="cine03"
    00079	     Tag="XIIIVu"
    00080	     Event="Goal02"
    00081	}

End Source Code