## XIDMaps
Class Plage00

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

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

Direct Known Subclasses:None

class Plage00
extends XIDMaps.Map01_Plage

    //=============================================================================
    // Plage00.
    //=============================================================================

Variables
`bool` | `InjuredEffectOn`

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

Source Code

    00001	//=============================================================================
    00002	// Plage00.
    00003	//=============================================================================
    00004	class Plage00 extends Map01_Plage
    00005	     placeable;
    00006
    00007	var(PlageSetup) float XIIISpeedFactorLimitBeforeHeal; // To limit XIII Speed at the beginning
    00008	var(PlageSetup) bool InjuredEffectInitiallyOn;
    00009	var bool InjuredEffectOn;
    00010	var(PlageSetup) float InjuredEffectTransitionDelay;
    00011
    00012	EVENT PostBeginPlay()
    00013	{
    00014		local mutator m;
    00015
    00016		Super.PostBeginPlay();
    00017
    00018		// prise en compte d un mutator qui retire les poings au joueur
    00019		m = Spawn( class'PRock01aMutator' );
    00020		m.NextMutator = Level.Game.BaseMutator.NextMutator;
    00021		Level.Game.BaseMutator = m; //.AddMutator(m);
    00022	}
    00023
    00024	//FUNCTION bool SaveInventoryForFlash(XIIIPawn P){ return true; }
    00025
    00026	//FUNCTION bool RestoreInventoryAfterFlash(XIIIPawn P){ return true; }
    00027
    00028	//_____________________________________________________________________________
    00029	FUNCTION FirstFrame()
    00030	{
    00031	    Super.FirstFrame();
    00032
    00033	    // Trigger clouds
    00034	    TriggerEvent('PL_nuages', Self, none);
    00035
    00036	    // ::TODO:: SHOULD NOT BE DONE WHEN LOADING AT A CHECKPOINT
    00037	    if ( Caps(XIIIGameInfo(Level.Game).StartSpotEvent) != "LOAD" )
    00038	    {
    00039	      // Change MainCharacter HitPoints
    00040	      XIIIPawn.Health = XIIIPawn.Default.Health*0.50;
    00041
    00042	      // Change Main character Speed
    00043	      XIIIPawn.SpeedFactorLimit = XIIISpeedFactorLimitBeforeHeal;
    00044	      XIIIPawn.SetGroundSpeed(1.0);
    00045	    }
    00046
    00047	    XIIIPawn.SoundStepCategory=1;
    00048
    00049		InjuredEffectOn = InjuredEffectInitiallyOn;
    00050		Level.SetInjuredEffect( InjuredEffectOn, InjuredEffectTransitionDelay );
    00051	}
    00052
    00053	event Trigger(actor a,pawn p)
    00054	{
    00055		InjuredEffectOn = ! InjuredEffectOn;
    00056		Level.SetInjuredEffect( InjuredEffectOn, InjuredEffectTransitionDelay );
    00057
    00058	}
    00059	//_____________________________________________________________________________
    00060	function SetGoalComplete(int N)
    00061	{
    00062	    Switch ( N )
    00063	    {
    00064	      Case 91:
    00065	        SetPrimaryGoal(0);
    00066	        Break;
    00067	      Case 92:
    00068	        SetPrimaryGoal(1);
    00069	        Break;
    00070	      Case 93:
    00071	        SetPrimaryGoal(2);
    00072	        Super.SetGoalComplete(2);
    00073	        Break;
    00074	    }
    00075	    Super.SetGoalComplete(N);
    00076	}
    00077
    00078	//_____________________________________________________________________________
    00079
    00080
    00081
    00082	defaultproperties
    00083	{
    00084	     InjuredEffectInitiallyOn=True
    00085	     InjuredEffectTransitionDelay=1.000000
    00086	}

End Source Code