## XIDMaps
Class Hual01a

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

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

Direct Known Subclasses:None

class Hual01a
extends XIDMaps.Map06_HualparBase

    //-----------------------------------------------------------
    // Hual01a
    // Created by iKi on ??? ???? 2001
    // Last Modification Fev 08th 2002 by iKi
    //-----------------------------------------------------------

Variables
`XIIIMover` | `BridgeLever`
`name` | `CloseBridgeEvent`
`Array` | `GeneratedEnemies`
`name` | `LowPowerEvent`
`XIIIMover` | `PowerLever`
`bool` | `bPremiersEnnemisGeneres`
`bool` | `bYaDuJus`
`int` | `eNumEnnemi`

Function Summary
`void` | `SetGoalComplete(int N)`
`void` | `Trigger(Actor Other, Pawn EventInstigator)`

Source Code

    00001	//-----------------------------------------------------------
    00002	// Hual01a
    00003	// Created by iKi on ??? ???? 2001
    00004	// Last Modification Fev 08th 2002 by iKi
    00005	//-----------------------------------------------------------
    00006	class Hual01a extends Map06_HualparBase;
    00007
    00008	VAR() XIIIMover BridgeLever;
    00009	VAR() XIIIMover PowerLever;
    00010	VAR() name CloseBridgeEvent;
    00011	VAR() name LowPowerEvent;
    00012	VAR() Array<GenNMI> GeneratedEnemies;
    00013	VAR bool bYaDuJus;
    00014	VAR bool bPremiersEnnemisGeneres;
    00015	VAR int eNumEnnemi;
    00016
    00017
    00018	FUNCTION SetGoalComplete(int N)
    00019	{
    00020	    Local int i;
    00021
    00022	    if ( N < Objectif.Length )
    00023			Super.SetGoalComplete(N);
    00024
    00025	    switch (N)
    00026	    {
    00027		case 666:
    00028			bYaDuJus = true;
    00029			if (PowerLever!=none)
    00030			{
    00031				PowerLever.GoToState('PlayerTriggerToggle','Close'); // jam powersupply lever
    00032			}
    00033			//SetPrimaryGoal(1);
    00034			Objectif[1].bPrimary = true;
    00035			SetGoalComplete(1);
    00036			break;
    00037		case 555:
    00038			if ( !bYaDuJus )
    00039			{
    00040				if ( BridgeLever != none )
    00041				{
    00042					BridgeLever.GoToState('PlayerTriggerToggle','Close'); // jam bridge lever
    00043					TriggerEvent( LowPowerEvent, self, none );
    00044					SetPrimaryGoal(1);
    00045				}
    00046			}
    00047			else
    00048			{
    00049				TriggerEvent ( CloseBridgeEvent, self, none );
    00050				BridgeLever.GoToState('Locked');
    00051				BridgeLever.bNoInteractionIcon = true;
    00052			}
    00053			break;
    00054		}
    00055	}
    00056
    00057
    00058	FUNCTION Trigger( actor Other , pawn EventInstigator )
    00059	{
    00060		local GenNMI Generateur;
    00061		local int i;
    00062
    00063		if ( !bPremiersEnnemisGeneres )
    00064		{
    00065			for (i=0;i<4;i++)
    00066			{
    00067				Generateur = GeneratedEnemies[i];
    00068				if ( Generateur != none )
    00069				{
    00070					//log(self@"---> GENERATEUR ENNEMI"@Generateur@"ACTIVE");
    00071					Generateur.Trigger(self,none);
    00072				}
    00073			}
    00074			eNumEnnemi = i;
    00075			bPremiersEnnemisGeneres = true;
    00076		}
    00077		else
    00078		{
    00079			Generateur = GeneratedEnemies[eNumEnnemi];
    00080			if ( Generateur != none )
    00081			{
    00082				//log(self@"---> GENERATEUR ENNEMI"@Generateur@"ACTIVE");
    00083				Generateur.Trigger(self,none);
    00084				eNumEnnemi ++;
    00085			}
    00086		}
    00087	}
    00088
    00089
    00090	// No script needed as there is only one objective.
    00091
    00092
    00093	defaultproperties
    00094	{
    00095	     CloseBridgeEvent="PontA"
    00096	     LowPowerEvent="PowerLow"
    00097	     iLoadSpecificValue=26
    00098	}

End Source Code