## XIDMaps
Class Usa02

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

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

Direct Known Subclasses:None

class Usa02
extends XIDMaps.Map12_PortUSA

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

Variables
`PhysicsVolume` | `FirewallVolume` Point aroudn which the helico will move (but not far away)
`USA02HelicoBoss` | `HelicoBoss` Point aroudn which the helico will move (but not far away)
`USA02HelicoBossController` | `HelicoBossC` Point aroudn which the helico will move (but not far away)
`USA02HelicoBossPoint` | `HelicoBossCrashPoint` Point aroudn which the helico will move (but not far away)
`USA02HelicoBossPoint` | `HelicoBossEndPoint` Point aroudn which the helico will move (but not far away)
`HelicoBossNavigationPoint1,` | `HelicoBossNavigationPoint2` making a line for the boss path
`USA02HelicoBossPoint` | `HelicoBossStart` The location the helico is spawned
`XIIIPlayerController` | `PC` Point aroudn which the helico will move (but not far away)
`int` | `eNbTouches` Point aroudn which the helico will move (but not far away)
`float` | `fCollisionHeight` Point aroudn which the helico will move (but not far away)
`float` | `fCollisionRadius` Point aroudn which the helico will move (but not far away)
`float` | `fDelaiRengaineArme` Point aroudn which the helico will move (but not far away)
`float` | `fMinAcquisitionTime` Point aroudn which the helico will move (but not far away)
`float` | `fStabilityBeforeMissileDelay` Point aroudn which the helico will move (but not far away)

States
STA_PostponeChopperSpawn

Function Summary
`void` | `SetGoalComplete(int N)`
    //_____________________________________________________________________________
`void` | `SpawnChopper( )`

State STA_PostponeChopperSpawn Function Summary

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class Usa02 extends Map12_PortUSA;
    00005
    00006	var (USA02SetUp) USA02HelicoBossPoint HelicoBossStart;            // The location the helico is spawned
    00007	var (USA02SetUp) USA02HelicoBossPoint HelicoBossNavigationPoint1, HelicoBossNavigationPoint2;  // making a line for the boss path
    00008	var (USA02SetUp) USA02HelicoBossPoint HelicoBossEndPoint;         // Point aroudn which the helico will move (but not far away)
    00009	var (USA02SetUp) USA02HelicoBossPoint HelicoBossCrashPoint;         // Point aroudn which the helico will move (but not far away)
    00010	var USA02HelicoBoss HelicoBoss;
    00011	var USA02HelicoBossController HelicoBossC;
    00012
    00013	var (USA02SetUp) float fMinAcquisitionTime;
    00014	var (USA02SetUp) float fStabilityBeforeMissileDelay;
    00015	var (USA02SetUp) float fCollisionHeight;
    00016	var (USA02SetUp) float fCollisionRadius;
    00017	var (USA02SetUp) float fDelaiRengaineArme;
    00018	var (USA02SetUp) int eNbTouches;
    00019	var (USA02SetUp) PhysicsVolume FirewallVolume;
    00020
    00021	var XIIIPlayerController PC;
    00022
    00023	// Use a XIIIGoalTrigger 90 To spawn HelicoBoss.
    00024
    00025	//_____________________________________________________________________________
    00026	FUNCTION SetGoalComplete(int N)
    00027	{
    00028		switch ( N )
    00029		{
    00030		case 90:
    00031			GotoState( 'STA_PostponeChopperSpawn' );
    00032			break;
    00033		}
    00034		Super.SetGoalComplete(N);
    00035	}
    00036
    00037	FUNCTION SpawnChopper( )
    00038	{
    00039		// Spawn HelicoBoss
    00040		HelicoBoss = Spawn(class'USA02HelicoBoss', self,, HelicoBossStart.Location, HelicoBossStart.Rotation);
    00041		HelicoBossC = Spawn(class'USA02HelicoBossController', self,, HelicoBossStart.Location, HelicoBossStart.Rotation);
    00042		HelicoBossC.Possess(HelicoBoss);
    00043		HelicoBossC.NavPoint1 = HelicoBossNavigationPoint1;
    00044		HelicoBossC.NavPoint2 = HelicoBossNavigationPoint2;
    00045		HelicoBossC.EndPoint = HelicoBossEndPoint;
    00046		HelicoBossC.CrashPoint = HelicoBossCrashPoint;
    00047		HelicoBossC.MinAcquisitionTime = fMinAcquisitionTime;
    00048		HelicoBossC.fStabilityBeforeMissileDelay = fStabilityBeforeMissileDelay;
    00049		HelicoBoss.bUseCylinderCollision = true;
    00050		HelicoBoss.SetCollisionSize( fCollisionRadius, fCollisionHeight );
    00051		HelicoBoss.Health = eNbTouches;
    00052		HelicoBoss.default.Health= eNbTouches;
    00053		XIIIBaseHud(XIIIController.MyHud).AddBossBar( HelicoBoss );
    00054	}
    00055
    00056	state STA_PostponeChopperSpawn
    00057	{
    00058	begin:
    00059		sleep( 0.5 );
    00060		SpawnChopper( );
    00061	}
    00062
    00063	event Trigger( actor Other, pawn EventInstigator )
    00064	{
    00065		SetTimer2(fDelaiRengaineArme,false);
    00066		if ( FirewallVolume != none )
    00067			FirewallVolume.bPainCausing = true;
    00068	}
    00069
    00070	event Timer2()
    00071	{
    00072		PC = XIIIGameInfo(Level.Game).MapInfo.XIIIController;
    00073		if ( PC.bWeaponMode )
    00074		{
    00075			PC.OldWeap = PC.Pawn.Weapon.InventoryGroup;
    00076			PC.Pawn.Weapon.PutDown();
    00077		}
    00078		else
    00079		{
    00080			PC.OldItem = XIIIItems(PC.Pawn.SelectedItem);
    00081			PC.OldItem.PutDown();
    00082		}
    00083		PC.bWeaponBlock = true;
    00084		PC.Pawn.PendingWeapon = none;
    00085	//	PawnOwner.PendingItem = none;
    00086	}
    00087
    00088
    00089
    00090
    00091	defaultproperties
    00092	{
    00093	     fMinAcquisitionTime=1.500000
    00094	     fStabilityBeforeMissileDelay=1.000000
    00095	     fCollisionHeight=200.000000
    00096	     fCollisionRadius=250.000000
    00097	     fDelaiRengaineArme=2.000000
    00098	     eNbTouches=3
    00099	     EndMapVideo="cine12"
    00100	}

End Source Code