/////////////////////////////////////////////////////////////////////
// RAVCAR.S - Ravenscar exteriors
/////////////////////////////////////////////////////////////////////

SETUP

	IF !gd_PLACED_RC_MONSTERS
		Add gd_PLACED_RC_MONSTERS

		// *** REGENERATING SKELETONS ***

		PlaceC  RC_SKEL_1   pRC_SKEL_1A
		RestrictedWanderButAttackOnSight  RC_SKEL_1
        Add     gd_SKEL_1_LIFE

        SWITCH RAND-2
            CASE 0
        		PlaceC  RC_SKEL_2   pRC_SKEL_2A1
            CASE 1
        		PlaceC  RC_SKEL_2   pRC_SKEL_2A2
        ENDSWITCH
        RestrictedWanderButAttackOnSight  RC_SKEL_2
        Add     gd_SKEL_2_LIFE

        SWITCH RAND-2
            CASE 0
        		PlaceC  RC_SKEL_3   pRC_SKEL_3A1
            CASE 1
        		PlaceC  RC_SKEL_3   pRC_SKEL_3A2
        ENDSWITCH
        AddControl  RC_SKEL_3   Capture cM_GUARD_STAND1
        AddControl  RC_SKEL_3   Capture cM_GUARD_STAND2
        AddControl  RC_SKEL_3   Capture cM_GUARD_STAND3
        SequenceRandomlySelects   RC_SKEL_3
        SwitchOnSightOfPlayer   RC_SKEL_3 AttackDemo2
        Add     gd_SKEL_3_LIFE
        // Attack when player near

		PlaceC      RC_SKEL_4   pRC_SKEL_4A
        AddControl  RC_SKEL_4   Capture cM_GUARD_STAND1
        AddControl  RC_SKEL_4   Capture cM_GUARD_STAND2
        AddControl  RC_SKEL_4   Capture cM_GUARD_STAND3
        SequenceRandomlySelects   RC_SKEL_4
        SwitchOnSightOfPlayer   RC_SKEL_4 AttackDemo2
        Add     gd_SKEL_4_LIFE
        // Attack when player near

        SWITCH RAND-2
            CASE 0
        		PlaceC  RC_SKEL_5   pRC_SKEL_5A1
            CASE 1
        		PlaceC  RC_SKEL_5   pRC_SKEL_5A2
        ENDSWITCH
        AddControl  RC_SKEL_5   Capture cM_GUARD_STAND1
        AddControl  RC_SKEL_5   Capture cM_GUARD_STAND2
        AddControl  RC_SKEL_5   Capture cM_GUARD_STAND3
        SequenceRandomlySelects   RC_SKEL_5
        SwitchOnSightOfPlayer   RC_SKEL_5 AttackDemo2
        Add     gd_SKEL_5_LIFE
        // Attack when player near

		PlaceC      RC_SKEL_6   pRC_SKEL_6A1
        AddControl  RC_SKEL_6   MoveC pRC_SKEL_6A2
        AddControl  RC_SKEL_6   MoveC pRC_SKEL_6A1
        SequenceLoops   RC_SKEL_6
        SwitchOnSightOfPlayer   RC_SKEL_6   AttackDemo2
        Add     gd_SKEL_6_LIFE

		PlaceC  RC_SKEL_7   pRC_SKEL_7A
        RestrictedWanderButAttackOnSight  RC_SKEL_7
        Add     gd_SKEL_7_LIFE

		PlaceC  RC_SKEL_8   pRC_SKEL_8A
        RestrictedWanderButAttackOnSight  RC_SKEL_8
        Add     gd_SKEL_8_LIFE

		PlaceC  RC_SKEL_9   pRC_SKEL_9A
        RestrictedWanderButAttackOnSight  RC_SKEL_9
        Add     gd_SKEL_9_LIFE

		PlaceC  RC_SKEL_10  pRC_SKEL_10A1
        AddControl RC_SKEL_10   MoveC pRC_SKEL_10A2
        AddControl RC_SKEL_10   MoveC pRC_SKEL_10A1
        SequenceLoops   RC_SKEL_10
        SwitchOnSightOfPlayer   RC_SKEL_10   AttackDemo2
        Add     gd_SKEL_10_LIFE

		// *** REGENERATING ZOMBIES ***

		PlaceC  RC_ZOMBIE_1     pRC_ZOMBIE_1A
        AddControl  RC_ZOMBIE_1 Capture cM_TALK_WARNING1
        AddControl  RC_ZOMBIE_1 Capture cM_TALK_SURPRISE2
        AddControl  RC_ZOMBIE_1 Capture cM_TALK_QUESTION2
        AddControl  RC_ZOMBIE_1 Capture cM_TALK_CREEP_BEG2
        AddControl  RC_ZOMBIE_1 MoveCDir pRC_ZOMBIE_1A
        SequenceRandomlySelects   RC_ZOMBIE_1
        SwitchOnSightOfPlayer   RC_ZOMBIE_1 SetScriptFlagControl gd_RC_ZOMBIE_1N2_RUMBLE
        Add     gd_ZOMBIE_1_LIFE

		PlaceC  RC_ZOMBIE_2     pRC_ZOMBIE_2A
        AddControl  RC_ZOMBIE_2 Capture cM_TALK_REFER_OTHER_PERSON1
        AddControl  RC_ZOMBIE_2 Capture cM_TALK_CURSE1
        AddControl  RC_ZOMBIE_2 Capture cM_TALK_THREATEN1
        AddControl  RC_ZOMBIE_2 Capture cM_TALK_DISAGREE3
        AddControl  RC_ZOMBIE_2 MoveCDir pRC_ZOMBIE_2A
        SequenceRandomlySelects   RC_ZOMBIE_2
        SwitchOnSightOfPlayer   RC_ZOMBIE_2 SetScriptFlagControl gd_RC_ZOMBIE_1N2_RUMBLE
        Add     gd_ZOMBIE_2_LIFE

		PlaceC  RC_ZOMBIE_3     pRC_ZOMBIE_3A
        RestrictedWanderButAttackOnSight  RC_ZOMBIE_3
        Add     gd_ZOMBIE_3_LIFE

        SWITCH RAND-2
            CASE 0
        		PlaceC  RC_ZOMBIE_4   pRC_ZOMBIE_4A1
            CASE 1
        		PlaceC  RC_ZOMBIE_4   pRC_ZOMBIE_4A2
        ENDSWITCH
        RestrictedWanderButAttackOnSight  RC_ZOMBIE_4
        Add     gd_ZOMBIE_4_LIFE

		PlaceC  RC_ZOMBIE_5     pRC_ZOMBIE_5A
        RestrictedWanderButAttackOnSight  RC_ZOMBIE_5
        Add     gd_ZOMBIE_5_LIFE

   		PlaceC  RC_ZOMBIE_6   pRC_ZOMBIE_6A2
        AddControl  RC_ZOMBIE_6   Capture cM_GUARD_STAND1
        AddControl  RC_ZOMBIE_6   Capture cM_GUARD_STAND2
        AddControl  RC_ZOMBIE_6   Capture cM_GUARD_STAND3
        SequenceRandomlySelects   RC_ZOMBIE_6
        SwitchOnSightOfPlayer   RC_ZOMBIE_6 AttackDemo2
        Add     gd_ZOMBIE_6_LIFE

        SWITCH RAND-2
            CASE 0
        		PlaceC  RC_ZOMBIE_7   pRC_ZOMBIE_7A1
            CASE 1
        		PlaceC  RC_ZOMBIE_7   pRC_ZOMBIE_7A2
        ENDSWITCH
        RestrictedWanderButAttackOnSight RC_ZOMBIE_7
        Add     gd_ZOMBIE_7_LIFE

        SWITCH RAND-2
            CASE 0
        		PlaceC  RC_ZOMBIE_8   pRC_ZOMBIE_8A1
            CASE 1
        		PlaceC  RC_ZOMBIE_8   pRC_ZOMBIE_8A2
        ENDSWITCH
		RestrictedWanderButAttackOnSight  RC_ZOMBIE_8
        Add     gd_ZOMBIE_8_LIFE

		PlaceC  RC_ZOMBIE_9     pRC_ZOMBIE_9A
        RestrictedWanderButAttackOnSight  RC_ZOMBIE_9
        Add     gd_ZOMBIE_9_LIFE

    	PlaceC  RC_ZOMBIE_10    pRC_ZOMBIE_10A1
        AddControl RC_ZOMBIE_10   MoveC pRC_ZOMBIE_10A2
        AddControl RC_ZOMBIE_10   MoveC pRC_ZOMBIE_10A1
        SequenceLoops   RC_ZOMBIE_10
        SwitchOnSightOfPlayer   RC_ZOMBIE_10   AttackDemo2
        Add     gd_ZOMBIE_10_LIFE

		// *** STATIC SKELETON GUARDS ***

		PlaceC								RC_SKEL_11	pS_11
        RestrictedWanderButAttackOnSight	RC_SKEL_11
		PlaceC								RC_SKEL_12	pS_12
        RestrictedWanderButAttackOnSight	RC_SKEL_12
		PlaceC								RC_SKEL_13	pS_13
        RestrictedWanderButAttackOnSight	RC_SKEL_13
		PlaceC								RC_SKEL_14	pS_14
        RestrictedWanderButAttackOnSight	RC_SKEL_14
		PlaceC								RC_SKEL_15	pS_15
        RestrictedWanderButAttackOnSight	RC_SKEL_15
		PlaceC								RC_SKEL_16	pS_16
        RestrictedWanderButAttackOnSight	RC_SKEL_16
		PlaceC								RC_SKEL_17	pS_17
        RestrictedWanderButAttackOnSight	RC_SKEL_17
		PlaceC								RC_SKEL_18	pS_18
        RestrictedWanderButAttackOnSight	RC_SKEL_18
		PlaceC								RC_SKEL_19	pS_19
        RestrictedWanderButAttackOnSight	RC_SKEL_19
		PlaceC								RC_SKEL_20	pS_20
        RestrictedWanderButAttackOnSight	RC_SKEL_20

		// *** STATIC ZOMBIE GUARDS ***

		PlaceC								RC_ZOMBIE_11	pZ_11
        RestrictedWanderButAttackOnSight	RC_ZOMBIE_11
		PlaceC								RC_ZOMBIE_12	pZ_12
        RestrictedWanderButAttackOnSight	RC_ZOMBIE_12
		PlaceC								RC_ZOMBIE_13	pZ_13
        RestrictedWanderButAttackOnSight	RC_ZOMBIE_13
		PlaceC								RC_ZOMBIE_14	pZ_14
        RestrictedWanderButAttackOnSight	RC_ZOMBIE_14
		PlaceC								RC_ZOMBIE_15	pZ_15
        RestrictedWanderButAttackOnSight	RC_ZOMBIE_15
		PlaceC								RC_ZOMBIE_16	pZ_16
        RestrictedWanderButAttackOnSight	RC_ZOMBIE_16
		PlaceC								RC_ZOMBIE_17	pZ_17
        RestrictedWanderButAttackOnSight	RC_ZOMBIE_17
		PlaceC								RC_ZOMBIE_18	pZ_18
        RestrictedWanderButAttackOnSight	RC_ZOMBIE_18
		PlaceC								RC_ZOMBIE_19	pZ_19
        RestrictedWanderButAttackOnSight	RC_ZOMBIE_19
		PlaceC								RC_ZOMBIE_20	pZ_20
        RestrictedWanderButAttackOnSight	RC_ZOMBIE_20


		// *** AMBUSH AT TEMPLE GATES ***

		FreezeC		RC_SKEL_15
		FreezeC		RC_SKEL_16
		FreezeC		RC_ZOMBIE_15
		FreezeC		RC_ZOMBIE_16
		FreezeC		RC_ZOMBIE_20
		AttackDemo2	RC_SKEL_15
		AttackDemo2	RC_SKEL_16
		AttackDemo2	RC_ZOMBIE_15
		AttackDemo2	RC_ZOMBIE_16
		AttackDemo2	RC_ZOMBIE_20

		// *** GARGOYLE GUARDS ***

		PlaceC RAV_GARG_1 pGARG_1
		PlaceC RAV_GARG_2 pGARG_2
		PlaceC RAV_GARG_3 pGARG_3
		PlaceC RAV_GARG_4 pGARG_4
		MoveC			RAV_GARG_2			pGARG_2B
		AddControl		RAV_GARG_2	MoveC	pGARG_2
		SequenceLoops	RAV_GARG_2
		MoveC			RAV_GARG_3			pGARG_3B
		AddControl		RAV_GARG_3	MoveC	pGARG_3
		SequenceLoops	RAV_GARG_3
		MoveC			RAV_GARG_4			pGARG_4B
		AddControl		RAV_GARG_4	MoveC	pGARG_4
		SequenceLoops	RAV_GARG_4

		// *** DEAD BODIES ***

		PlaceC DEAD_BOD_1 pDEAD_1
		PlaceC DEAD_BOD_2 pDEAD_2
		PlaceC DEAD_BOD_3 pDEAD_3
		PlaceC DEAD_BOD_4 pDEAD_4
		PlaceC DEAD_BOD_5 pDEAD_5

		Add gt_CUE_RAVCAR_DEAD_BODS

	//ELSE
	//	RunS CheckBodies
	ENDIF

END

/////////////////////////////////////////////////////////////////////

VIG TempSetup FALSE

    DisableTeleport RV_HEXSTONE

	Set	gd_WEATHER_TYPE	0
	Set gd_WIND_TYPE	1
    RunS CueWeather

	// clear music flags
	Remove gg_PLAYING_RAVCAR_MUSIC
	Remove gg_RAVCAR_MUSIC_COUNTER
	Remove gg_RAVCAR_OTHER_TUNE
END

/////////////////////////////////////////////////////////////////////

VIG StartRavcarMusic !gg_PLAYING_RAVCAR_MUSIC
	Add gg_PLAYING_RAVCAR_MUSIC
	Set gg_RAVCAR_MUSIC_COUNTER 0
	PlayMusic rpg27.wav
END

/////////////////////////////////////////////////////////////////////

VIG MonitorRavcarMusic OneMin

	AddTo gg_RAVCAR_MUSIC_COUNTER 1

	IF gg_RAVCAR_MUSIC_COUNTER=2
		
		Set gg_RAVCAR_MUSIC_COUNTER 0

		IF gg_RAVCAR_OTHER_TUNE
			Remove gg_RAVCAR_OTHER_TUNE
			PlayMusic rpg27.wav
		ELSE
			Add gg_RAVCAR_OTHER_TUNE
			PlayMusic rpg22.wav
		ENDIF
		
	ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG KillBods ONESEC && gt_CUE_RAVCAR_DEAD_BODS

	Remove gt_CUE_RAVCAR_DEAD_BODS

	AwardOb DEAD_BOD_1 gold "dosh" 3
	AwardOb DEAD_BOD_2 gold "dosh" 7
	AwardOb DEAD_BOD_3 gold "dosh" 11
	AwardOb DEAD_BOD_4 gold "dosh" 9
	AwardOb DEAD_BOD_5 gold "dosh" 5
	SetHP DEAD_BOD_1 1
	SetHP DEAD_BOD_2 1
	SetHP DEAD_BOD_3 1
	SetHP DEAD_BOD_4 1
	SetHP DEAD_BOD_5 1
	SamplesOff
	NormalDamageNA DEAD_BOD_1 5
	NormalDamageNA DEAD_BOD_2 5
	NormalDamageNA DEAD_BOD_3 5
	NormalDamageNA DEAD_BOD_4 5
	NormalDamageNA DEAD_BOD_5 5
	SamplesOn

END

/////////////////////////////////////////////////////////////////////

VIG TempleGateAmbush ONESEC && !gt_TG_AMBUSH && (DISTFROM-P-RC_ZOMBIE_15-8 || DAMAGED-RC_SKEL_15 ||	DAMAGED-RC_SKEL_16 || DAMAGED-RC_ZOMBIE_15 || DAMAGED-RC_ZOMBIE_16 || DAMAGED-RC_ZOMBIE_20)

	Add gt_TG_AMBUSH

	UnFreezeC	RC_SKEL_15
	UnFreezeC	RC_SKEL_16
	UnFreezeC	RC_ZOMBIE_15
	UnFreezeC	RC_ZOMBIE_16
	UnFreezeC	RC_ZOMBIE_20

	GiveSightOfPlayerTo	RC_SKEL_15
	GiveSightOfPlayerTo	RC_SKEL_16
	GiveSightOfPlayerTo	RC_ZOMBIE_15
	GiveSightOfPlayerTo	RC_ZOMBIE_16
	GiveSightOfPlayerTo	RC_ZOMBIE_20

END

/////////////////////////////////////////////////////////////////////

VIG Garg_123_Attack	ONESEC && !gt_RAV_GARG_ATTACK_123 && (INAREA-P-NEAR_KEEP || DAMAGED-RAV_GARG_1 || DAMAGED-RAV_GARG_2 || DAMAGED-RAV_GARG_3)

	Add gt_RAV_GARG_ATTACK_123

	GiveSightOfPlayerTo RAV_GARG_1
	GiveSightOfPlayerTo RAV_GARG_2
	GiveSightOfPlayerTo RAV_GARG_3
	AttackDemo2 RAV_GARG_1
	AttackDemo2 RAV_GARG_2
	AttackDemo2 RAV_GARG_3

END

/////////////////////////////////////////////////////////////////////

VIG Garg_4_Attack	ONESEC && !gt_RAV_GARG_ATTACK_4 && (INAREA-P-NEAR_MANOR || DAMAGED-RAV_GARG_4)

	Add gt_RAV_GARG_ATTACK_4

	GiveSightOfPlayerTo RAV_GARG_4
	AttackDemo2 RAV_GARG_4

END

/////////////////////////////////////////////////////////////////////
//
//VIG HexStoneRV MSG-iTouchHexStone
//	MoveCDir P pP_HEX_STONE
//	UUComplete P
//END
//
/////////////////////////////////////////////////////////////////////

VIG CheckBodies FALSE

    IF  ISDEAD-RC_SKEL_1 &&		gd_SKEL_1_LIFE
        RunS RC_CheckSkel_1
    ENDIF
    IF  ISDEAD-RC_SKEL_2 &&		gd_SKEL_2_LIFE
        RunS RC_CheckSkel_2
    ENDIF
    IF  ISDEAD-RC_SKEL_3 &&		gd_SKEL_3_LIFE
        RunS RC_CheckSkel_3
    ENDIF
    IF  ISDEAD-RC_SKEL_4 &&		gd_SKEL_4_LIFE
        RunS RC_CheckSkel_4
    ENDIF
    IF  ISDEAD-RC_SKEL_5 &&		gd_SKEL_5_LIFE
        RunS RC_CheckSkel_5
    ENDIF
	IF  ISDEAD-RC_SKEL_6 &&		gd_SKEL_6_LIFE
		RunS RC_CheckSkel_6
	ENDIF
	IF  ISDEAD-RC_SKEL_7 &&		gd_SKEL_7_LIFE
		RunS RC_CheckSkel_7
	ENDIF
	IF  ISDEAD-RC_SKEL_8 &&		gd_SKEL_8_LIFE
		RunS RC_CheckSkel_8
	ENDIF
	IF  ISDEAD-RC_SKEL_9 &&		gd_SKEL_9_LIFE
		RunS RC_CheckSkel_9
	ENDIF
	IF  ISDEAD-RC_SKEL_10 &&	gd_SKEL_10_LIFE
		RunS RC_CheckSkel_10
	ENDIF
	IF  ISDEAD-RC_ZOMBIE_1 &&	gd_ZOMBIE_1_LIFE
		RunS RC_CheckZombie_1
	ENDIF
	IF  ISDEAD-RC_ZOMBIE_2 &&	gd_ZOMBIE_2_LIFE
		RunS RC_CheckZombie_2
	ENDIF
	IF  ISDEAD-RC_ZOMBIE_3 &&	gd_ZOMBIE_3_LIFE
		RunS RC_CheckZombie_3
	ENDIF
	IF  ISDEAD-RC_ZOMBIE_4 &&	gd_ZOMBIE_4_LIFE
		RunS RC_CheckZombie_4
	ENDIF
	IF  ISDEAD-RC_ZOMBIE_5 &&	gd_ZOMBIE_5_LIFE
		RunS RC_CheckZombie_5
	ENDIF
    IF  ISDEAD-RC_ZOMBIE_6 &&	gd_ZOMBIE_6_LIFE
		RunS RC_CheckZombie_6
    ENDIF
    IF  ISDEAD-RC_ZOMBIE_7 &&	gd_ZOMBIE_7_LIFE
        RunS RC_CheckZombie_7
    ENDIF
    IF  ISDEAD-RC_ZOMBIE_8 &&	gd_ZOMBIE_8_LIFE
        RunS RC_CheckZombie_8
    ENDIF
    IF  ISDEAD-RC_ZOMBIE_9 &&	gd_ZOMBIE_9_LIFE
        RunS RC_CheckZombie_9
    ENDIF
    IF  ISDEAD-RC_ZOMBIE_10 &&	gd_ZOMBIE_10_LIFE
        RunS RC_CheckZombie_10
	ENDIF

END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckSkel_1 FALSE
    RemoveC RC_SKEL_1
    IF  gd_SKEL_1_LIFE=0
        ResetStats  RC_SKEL_1
        AddTo   gd_SKEL_1_LIFE  1
        PlaceC  RC_SKEL_1   pRC_SKEL_1B
        RestrictedWanderButAttackOnSight  RC_SKEL_1
    ELSE
        IF  gd_SKEL_1_LIFE=1
            ResetStats  RC_SKEL_1
            AddTo   gd_SKEL_1_LIFE  1
            SWITCH RAND-2
                CASE 0
        		    PlaceC  RC_SKEL_1   pRC_SKEL_1C1
                CASE 1
        		    PlaceC  RC_SKEL_1   pRC_SKEL_1C2
            ENDSWITCH
            RestrictedWanderButAttackOnSight  RC_SKEL_1
        ELSE
            Remove  gd_SKEL_1_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckSkel_2 FALSE
    RemoveC RC_SKEL_2
    IF  gd_SKEL_2_LIFE=0
        ResetStats  RC_SKEL_2
        AddTo   gd_SKEL_2_LIFE  1
        SWITCH RAND-2
            CASE 0
        		PlaceC  RC_SKEL_2   pRC_SKEL_2B1
            CASE 1
        		PlaceC  RC_SKEL_2   pRC_SKEL_2B2
        ENDSWITCH
        RestrictedWanderButAttackOnSight  RC_SKEL_2
    ELSE
        IF gd_SKEL_2_LIFE=1
            ResetStats  RC_SKEL_2
            AddTo       gd_SKEL_2_LIFE  1
            PlaceC      RC_SKEL_2   pRC_SKEL_2C1
            AddControl  RC_SKEL_2   MoveCDir pRC_SKEL_2C2
            AddControl  RC_SKEL_2   MoveCDir pRC_SKEL_2C1
            SequenceLoops   RC_SKEL_2
            SwitchOnSightOfPlayer   RC_SKEL_2 AttackDemo2
        ELSE
            Remove  gd_SKEL_2_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckSkel_3 FALSE
    RemoveC RC_SKEL_3
    IF  gd_SKEL_3_LIFE=0
        ResetStats  RC_SKEL_3
        AddTo   gd_SKEL_3_LIFE  1
   		PlaceC  RC_SKEL_3   pRC_SKEL_3B1
        AddControl  RC_SKEL_3   MoveCDir pRC_SKEL_3B2
        AddControl  RC_SKEL_3   Capture  cM_V6_LOOK_AROUND2_BETTER
        AddControl  RC_SKEL_3   MoveCDir pRC_SKEL_3B1
        AddControl  RC_SKEL_3   Capture  cM_V6_LOOK_AROUND2_BETTER
        SequenceLoops   RC_SKEL_3
        SwitchOnSightOfPlayer   RC_SKEL_3 AttackDemo2
    ELSE
        IF  gd_SKEL_3_LIFE=1
            ResetStats  RC_SKEL_3
            AddTo   gd_SKEL_3_LIFE  1
            PlaceC  RC_SKEL_3   pRC_SKEL_3C
            RestrictedWanderButAttackOnSight  RC_SKEL_3
        ELSE
            Remove  gd_SKEL_3_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckSkel_4 FALSE
    RemoveC RC_SKEL_4
    IF  gd_SKEL_4_LIFE=0
        ResetStats  RC_SKEL_4
        AddTo   gd_SKEL_4_LIFE  1
        PlaceC  RC_SKEL_4   pRC_SKEL_4B
        RestrictedWanderButAttackOnSight  RC_SKEL_4
    ELSE
        IF  gd_SKEL_4_LIFE=1
            ResetStats  RC_SKEL_4
            AddTo   gd_SKEL_4_LIFE  1
            PlaceC  RC_SKEL_4   pRC_SKEL_4C
            RestrictedWanderButAttackOnSight  RC_SKEL_4
        ELSE
            Remove  gd_SKEL_4_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckSkel_5 FALSE
    RemoveC RC_SKEL_5
    IF  gd_SKEL_5_LIFE=0
        ResetStats  RC_SKEL_5
        AddTo   gd_SKEL_5_LIFE  1
        PlaceC  RC_SKEL_5   pRC_SKEL_5B
        RestrictedWanderButAttackOnSight  RC_SKEL_5
    ELSE
        IF  gd_SKEL_5_LIFE=1
            ResetStats  RC_SKEL_5
            AddTo   gd_SKEL_5_LIFE  1
            PlaceC  RC_SKEL_5   pRC_SKEL_5C1
            AddControl RC_SKEL_5    MoveC pRC_SKEL_5C2
            AddControl RC_SKEL_5    MoveC pRC_SKEL_5C1
            SequenceLoops   RC_SKEL_5
            SwitchOnSightOfPlayer   RC_SKEL_5   AttackDemo2
        ELSE
            Remove  gd_SKEL_5_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckSkel_6 FALSE
    RemoveC RC_SKEL_6
    IF  gd_SKEL_6_LIFE=0
        ResetStats  RC_SKEL_6
        AddTo   gd_SKEL_6_LIFE  1
        PlaceC  RC_SKEL_6   pRC_SKEL_6B
        RestrictedWanderButAttackOnSight  RC_SKEL_6
    ELSE
        IF  gd_SKEL_6_LIFE=1
            ResetStats  RC_SKEL_6
            AddTo   gd_SKEL_6_LIFE  1
            PlaceC  RC_SKEL_6   pRC_SKEL_6C
            RestrictedWanderButAttackOnSight  RC_SKEL_6
        ELSE
            Remove  gd_SKEL_6_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckSkel_7 FALSE
    RemoveC RC_SKEL_7
    IF  gd_SKEL_7_LIFE=0
        ResetStats  RC_SKEL_7
        AddTo   gd_SKEL_7_LIFE  1
        PlaceC  RC_SKEL_7   pRC_SKEL_7B
        AddControl  RC_SKEL_7   Capture cM_GUARD_STAND1
        AddControl  RC_SKEL_7   Capture cM_GUARD_STAND2
        AddControl  RC_SKEL_7   Capture cM_GUARD_STAND3
        SequenceRandomlySelects   RC_SKEL_7
        SwitchOnSightOfPlayer   RC_SKEL_7 AttackDemo2
        // I'm guarding an entrance.
    ELSE
        IF  gd_SKEL_7_LIFE=1
            ResetStats  RC_SKEL_7
            AddTo   gd_SKEL_7_LIFE  1
            SWITCH RAND-2
                CASE 0
        		    PlaceC  RC_SKEL_7   pRC_SKEL_7C1
                CASE 1
        		    PlaceC  RC_SKEL_7   pRC_SKEL_7C2
            ENDSWITCH
            AddControl  RC_SKEL_7   Capture cM_GUARD_STAND1
            AddControl  RC_SKEL_7   Capture cM_GUARD_STAND2
            AddControl  RC_SKEL_7   Capture cM_GUARD_STAND3
            SequenceRandomlySelects   RC_SKEL_7
            SwitchOnSightOfPlayer   RC_SKEL_7 AttackDemo2
            // I'm guarding something.
        ELSE
            Remove  gd_SKEL_7_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckSkel_8 FALSE
    RemoveC RC_SKEL_8
    IF  gd_SKEL_8_LIFE=0
        ResetStats  RC_SKEL_8
        AddTo   gd_SKEL_8_LIFE  1
        PlaceC  RC_SKEL_8   pRC_SKEL_8B
        RestrictedWanderButAttackOnSight  RC_SKEL_8
    ELSE
        IF  gd_SKEL_8_LIFE=1
            ResetStats  RC_SKEL_8
            AddTo   gd_SKEL_8_LIFE  1
            PlaceC  RC_SKEL_8   pRC_SKEL_8C
            RestrictedWanderButAttackOnSight  RC_SKEL_8
        ELSE
            Remove  gd_SKEL_8_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckSkel_9 FALSE
    RemoveC RC_SKEL_9
    IF  gd_SKEL_9_LIFE=0
        ResetStats  RC_SKEL_9
        AddTo   gd_SKEL_9_LIFE  1
        SWITCH RAND-2
            CASE 0
        		PlaceC  RC_SKEL_9   pRC_SKEL_9B1
            CASE 1
        		PlaceC  RC_SKEL_9   pRC_SKEL_9B2
        ENDSWITCH
        RestrictedWanderButAttackOnSight  RC_SKEL_9
    ELSE
        IF  gd_SKEL_9_LIFE=1
            ResetStats  RC_SKEL_9
            AddTo   gd_SKEL_9_LIFE  1
            PlaceC  RC_SKEL_9   pRC_SKEL_9C
            RestrictedWanderButAttackOnSight  RC_SKEL_9
        ELSE
            Remove  gd_SKEL_9_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckSkel_10 FALSE
    RemoveC RC_SKEL_10
    IF  gd_SKEL_10_LIFE=0
        ResetStats  RC_SKEL_10
        AddTo   gd_SKEL_10_LIFE  1
        PlaceC  RC_SKEL_10   pRC_SKEL_10B1
        AddControl RC_SKEL_10   MoveC pRC_SKEL_10B2
        AddControl RC_SKEL_10   MoveC pRC_SKEL_10B1
        SequenceLoops   RC_SKEL_10
        SwitchOnSightOfPlayer   RC_SKEL_10   AttackDemo2
    ELSE
        IF  gd_SKEL_10_LIFE=1
            ResetStats  RC_SKEL_10
            AddTo   gd_SKEL_10_LIFE  1
            PlaceC  RC_SKEL_10   pRC_SKEL_10C
            RestrictedWanderButAttackOnSight  RC_SKEL_10
        ELSE
            Remove  gd_SKEL_10_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckZombie_1 FALSE
    RemoveC RC_ZOMBIE_1
    Remove  gd_RC_ZOMBIE_1
    IF  gd_ZOMBIE_1_LIFE=0
        ResetStats  RC_ZOMBIE_1
        AddTo   gd_ZOMBIE_1_LIFE  1
        PlaceC  RC_ZOMBIE_1   pRC_ZOMBIE_1B1
        AttackDemo2 RC_ZOMBIE_1
        PushControl RC_ZOMBIE_1
        IF gd_ZOMBIE_2_LIFE=1
            AddControl  RC_ZOMBIE_1 Capture  cM_TALK_WARNING1
            AddControl  RC_ZOMBIE_1 Capture  cM_TALK_SURPRISE2
            AddControl  RC_ZOMBIE_1 Capture  cM_TALK_REFER_SELF1
            AddControl  RC_ZOMBIE_1 Capture  cM_TALK_CREEP_BEG2
            AddControl  RC_ZOMBIE_1 MoveCDir pRC_ZOMBIE_1B
            SequenceRandomlySelects   RC_ZOMBIE_1
            SwitchOnSightOfPlayer   RC_ZOMBIE_1 PopControl
        ELSE
            AddControl  RC_ZOMBIE_1 Capture cM_LOOK_AROUND_HANDS_HIPS1
            AddControl  RC_ZOMBIE_1 Capture cM_LOOK_AROUND_SCARED1
            AddControl  RC_ZOMBIE_1 Capture cM_SHUFFLE4
            AddControl  RC_ZOMBIE_1 Capture cSG_STAND_BORED3
            SequenceRandomlySelects   RC_ZOMBIE_1
            SwitchOnSightOfPlayer   RC_ZOMBIE_1 PopControl
        ENDIF
    ELSE
        IF  gd_ZOMBIE_1_LIFE=1
            ResetStats  RC_ZOMBIE_1
            AddTo   gd_ZOMBIE_1_LIFE  1
            PlaceC  RC_ZOMBIE_1   pRC_ZOMBIE_1C
            AttackDemo2 RC_ZOMBIE_1
            PushControl RC_ZOMBIE_1
            IF gd_ZOMBIE_2_LIFE=1
                AddControl  RC_ZOMBIE_1 Capture  cM_TALK_WARNING1
                AddControl  RC_ZOMBIE_1 Capture  cM_TALK_SURPRISE2
                AddControl  RC_ZOMBIE_1 Capture  cM_TALK_REFER_SELF1
                AddControl  RC_ZOMBIE_1 Capture  cM_TALK_CREEP_BEG2
                AddControl  RC_ZOMBIE_1 MoveCDir pRC_ZOMBIE_1B
                SequenceRandomlySelects   RC_ZOMBIE_1
                SwitchOnSightOfPlayer   RC_ZOMBIE_1 PopControl
            ELSE
                AddControl  RC_ZOMBIE_1 Capture cM_LOOK_AROUND_HANDS_HIPS1
                AddControl  RC_ZOMBIE_1 Capture cM_LOOK_AROUND_SCARED1
                AddControl  RC_ZOMBIE_1 Capture cM_SHUFFLE4
                AddControl  RC_ZOMBIE_1 Capture cSG_STAND_BORED3
                SequenceRandomlySelects   RC_ZOMBIE_1
                SwitchOnSightOfPlayer   RC_ZOMBIE_1 PopControl
            ENDIF
        ELSE
            Remove  gd_ZOMBIE_1_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_Zombie1A_Attack ONESEC && !gd_RC_ZOMBIE_1 && gd_ZOMBIE_1_LIFE=0 && (gd_RC_ZOMBIE_1N2_RUMBLE || DAMAGED-RC_ZOMBIE_1)
    
	Add gd_RC_ZOMBIE_1
	Add gd_RC_ZOMBIE_1N2_RUMBLE
    AttackDemo2 RC_ZOMBIE_1
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckZombie_2 FALSE
    RemoveC RC_ZOMBIE_2
    Remove  gd_RC_ZOMBIE_2
    IF  gd_ZOMBIE_2_LIFE=0
        ResetStats  RC_ZOMBIE_2
        AddTo   gd_ZOMBIE_2_LIFE  1
        PlaceC  RC_ZOMBIE_2   pRC_ZOMBIE_2B1
        AttackDemo2 RC_ZOMBIE_2
        PushControl RC_ZOMBIE_2
        IF gd_ZOMBIE_1_LIFE=1
            AddControl  RC_ZOMBIE_2 Capture  cM_TALK_QUESTION1
            AddControl  RC_ZOMBIE_2 Capture  cM_TALK_CURSE1
            AddControl  RC_ZOMBIE_2 Capture  cM_TALK_REFER_SELF1
            AddControl  RC_ZOMBIE_2 Capture  cM_TALK_DISAGREE2
            AddControl  RC_ZOMBIE_2 MoveCDir pRC_ZOMBIE_2B1
            SequenceRandomlySelects   RC_ZOMBIE_2
            SwitchOnSightOfPlayer   RC_ZOMBIE_2 PopControl
        ELSE
            AddControl  RC_ZOMBIE_2 Capture cM_LOOK_AROUND_HANDS_HIPS1
            AddControl  RC_ZOMBIE_2 Capture cM_LOOK_AROUND_SCARED1
            AddControl  RC_ZOMBIE_2 Capture cM_SHUFFLE4
            AddControl  RC_ZOMBIE_2 Capture cSG_STAND_BORED3
            SequenceRandomlySelects   RC_ZOMBIE_2
            SwitchOnSightOfPlayer   RC_ZOMBIE_2 PopControl
        ENDIF
    ELSE
        IF  gd_ZOMBIE_2_LIFE=1
            ResetStats  RC_ZOMBIE_2
            AddTo   gd_ZOMBIE_2_LIFE  1
            PlaceC  RC_ZOMBIE_2   pRC_ZOMBIE_2B1
            AttackDemo2 RC_ZOMBIE_2
            PushControl RC_ZOMBIE_2
            IF gd_ZOMBIE_1_LIFE=1
                AddControl  RC_ZOMBIE_2 Capture  cM_TALK_QUESTION1
                AddControl  RC_ZOMBIE_2 Capture  cM_TALK_CURSE1
                AddControl  RC_ZOMBIE_2 Capture  cM_TALK_REFER_SELF1
                AddControl  RC_ZOMBIE_2 Capture  cM_TALK_DISAGREE2
                AddControl  RC_ZOMBIE_2 MoveCDir pRC_ZOMBIE_2B1
                SequenceRandomlySelects   RC_ZOMBIE_2
                SwitchOnSightOfPlayer   RC_ZOMBIE_2 PopControl
            ELSE
                AddControl  RC_ZOMBIE_2 Capture cM_LOOK_AROUND_HANDS_HIPS1
                AddControl  RC_ZOMBIE_2 Capture cM_LOOK_AROUND_SCARED1
                AddControl  RC_ZOMBIE_2 Capture cM_SHUFFLE4
                AddControl  RC_ZOMBIE_2 Capture cSG_STAND_BORED3
                SequenceRandomlySelects   RC_ZOMBIE_2
                SwitchOnSightOfPlayer   RC_ZOMBIE_2 PopControl
            ENDIF
        ELSE
            Remove  gd_ZOMBIE_2_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_Zombie2A_Attack ONESEC && !gd_RC_ZOMBIE_2 && gd_ZOMBIE_2_LIFE=0 && (gd_RC_ZOMBIE_1N2_RUMBLE || DAMAGED-RC_ZOMBIE_2)

    Add gd_RC_ZOMBIE_2
	Add gd_RC_ZOMBIE_1N2_RUMBLE
    AttackDemo2 RC_ZOMBIE_2
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckZombie_3 FALSE
    RemoveC RC_ZOMBIE_3
    IF  gd_ZOMBIE_3_LIFE=0
        ResetStats  RC_ZOMBIE_3
        AddTo   gd_ZOMBIE_3_LIFE  1
        PlaceC  RC_ZOMBIE_3   pRC_ZOMBIE_3B
        RestrictedWanderButAttackOnSight  RC_ZOMBIE_3
    ELSE
        IF  gd_ZOMBIE_3_LIFE=1
            ResetStats  RC_ZOMBIE_3
            AddTo   gd_ZOMBIE_3_LIFE  1
            PlaceC  RC_ZOMBIE_3   pRC_ZOMBIE_3C
            RestrictedWanderButAttackOnSight  RC_ZOMBIE_3
        ELSE
            Remove  gd_ZOMBIE_3_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckZombie_4 FALSE
    RemoveC RC_ZOMBIE_4
    IF  gd_ZOMBIE_4_LIFE=0
        ResetStats  RC_ZOMBIE_4
        AddTo   gd_ZOMBIE_4_LIFE  1
        PlaceC  RC_ZOMBIE_4   pRC_ZOMBIE_4B
        RestrictedWanderButAttackOnSight  RC_ZOMBIE_4
    ELSE
        IF  gd_ZOMBIE_4_LIFE=1
            ResetStats  RC_ZOMBIE_4
            AddTo   gd_ZOMBIE_4_LIFE  1
            PlaceC  RC_ZOMBIE_4   pRC_ZOMBIE_4C1
            AddControl RC_ZOMBIE_4 MoveCDir pRC_ZOMBIE_4C2
            AddControl RC_ZOMBIE_4 MoveCDir pRC_ZOMBIE_4C1
            SequenceLoops   RC_ZOMBIE_4
            SwitchOnSightOfPlayer   RC_ZOMBIE_4   AttackDemo2
        ELSE
            Remove  gd_ZOMBIE_4_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckZombie_5 FALSE
    RemoveC RC_ZOMBIE_5
    IF  gd_ZOMBIE_5_LIFE=0
        ResetStats  RC_ZOMBIE_5
        AddTo   gd_ZOMBIE_5_LIFE  1
        PlaceC  RC_ZOMBIE_5 pRC_ZOMBIE_5B
		RestrictedWanderButAttackOnSight RC_ZOMBIE_5
    ELSE
        IF  gd_ZOMBIE_5_LIFE=1
            ResetStats  RC_ZOMBIE_5
            AddTo   gd_ZOMBIE_5_LIFE  1
            PlaceC  RC_ZOMBIE_5   pRC_ZOMBIE_5C
			RestrictedWanderButAttackOnSight RC_ZOMBIE_5
        ELSE
            Remove  gd_ZOMBIE_5_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckZombie_6 FALSE
    RemoveC RC_ZOMBIE_6
    Remove  gd_RC_ZOMBIE_6
    IF  gd_ZOMBIE_6_LIFE=0
        ResetStats  RC_ZOMBIE_6
        AddTo   gd_ZOMBIE_6_LIFE  1
        SWITCH RAND-2
            CASE 0
        		PlaceC  RC_ZOMBIE_6   pRC_ZOMBIE_6B1
            CASE 1
        		PlaceC  RC_ZOMBIE_6   pRC_ZOMBIE_6B2
        ENDSWITCH
        RestrictedWanderButAttackOnSight  RC_ZOMBIE_6
    ELSE
        IF  gd_ZOMBIE_6_LIFE=1
            ResetStats  RC_ZOMBIE_6
            AddTo   gd_ZOMBIE_6_LIFE  1
            PlaceC  RC_ZOMBIE_6   pRC_ZOMBIE_6C
            RestrictedWanderButAttackOnSight  RC_ZOMBIE_6
        ELSE
            Remove  gd_ZOMBIE_6_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_Zombie6A_Attack ONESEC && !gd_RC_ZOMBIE_6 && gd_ZOMBIE_6_LIFE=0 && (INAREA-P-rc_zombie_guard2 || DAMAGED-RC_ZOMBIE_6)
    Add         gd_RC_ZOMBIE_6
    AttackDemo2 RC_ZOMBIE_6
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckZombie_7 FALSE
    RemoveC RC_ZOMBIE_7
    IF  gd_ZOMBIE_7_LIFE=0
        ResetStats  RC_ZOMBIE_7
        AddTo   gd_ZOMBIE_7_LIFE  1
        PlaceC  RC_ZOMBIE_7 pRC_ZOMBIE_7B
		RestrictedWanderButAttackOnSight RC_ZOMBIE_7
    ELSE
        IF  gd_ZOMBIE_7_LIFE=1
            ResetStats  RC_ZOMBIE_7
            AddTo   gd_ZOMBIE_7_LIFE  1
            SWITCH RAND-2
                CASE 0
        		    PlaceC  RC_ZOMBIE_7   pRC_ZOMBIE_7C1
                CASE 1
        		    PlaceC  RC_ZOMBIE_7   pRC_ZOMBIE_7C2
            ENDSWITCH
            RestrictedWanderButAttackOnSight RC_ZOMBIE_7
        ELSE
            Remove  gd_ZOMBIE_7_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckZombie_8 FALSE
    RemoveC RC_ZOMBIE_8
    IF  gd_ZOMBIE_8_LIFE=0
        ResetStats  RC_ZOMBIE_8
        AddTo   gd_ZOMBIE_8_LIFE  1
        SWITCH RAND-2
            CASE 0
        		PlaceC  RC_ZOMBIE_8   pRC_ZOMBIE_8B1
            CASE 1
        		PlaceC  RC_ZOMBIE_8   pRC_ZOMBIE_8B2
        ENDSWITCH
        RestrictedWanderButAttackOnSight  RC_ZOMBIE_8
    ELSE
        IF  gd_ZOMBIE_8_LIFE=1
            ResetStats  RC_ZOMBIE_8
            AddTo   gd_ZOMBIE_8_LIFE  1
            PlaceC  RC_ZOMBIE_8   pRC_ZOMBIE_8C
            RestrictedWanderButAttackOnSight  RC_ZOMBIE_8
        ELSE
            Remove  gd_ZOMBIE_8_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckZombie_9 FALSE
    RemoveC RC_ZOMBIE_9
    IF  gd_ZOMBIE_9_LIFE=0
        ResetStats  RC_ZOMBIE_9
        AddTo   gd_ZOMBIE_9_LIFE  1
        SWITCH RAND-2
            CASE 0
        		PlaceC  RC_ZOMBIE_9   pRC_ZOMBIE_9B1
            CASE 1
        		PlaceC  RC_ZOMBIE_9   pRC_ZOMBIE_9B2
        ENDSWITCH
        RestrictedWanderButAttackOnSight  RC_ZOMBIE_9
    ELSE
        IF  gd_ZOMBIE_9_LIFE=1
            ResetStats  RC_ZOMBIE_9
            AddTo   gd_ZOMBIE_9_LIFE  1
            PlaceC  RC_ZOMBIE_9   pRC_ZOMBIE_9C
            RestrictedWanderButAttackOnSight  RC_ZOMBIE_9
        ELSE
            Remove  gd_ZOMBIE_9_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

VIG RC_CheckZombie_10 FALSE
    RemoveC RC_ZOMBIE_10
    IF  gd_ZOMBIE_10_LIFE=0
        ResetStats  RC_ZOMBIE_10
        AddTo   gd_ZOMBIE_10_LIFE  1
        PlaceC  RC_ZOMBIE_10 pRC_ZOMBIE_10B
        RestrictedWanderButAttackOnSight  RC_ZOMBIE_10
    ELSE
        IF  gd_ZOMBIE_10_LIFE=1
            ResetStats  RC_ZOMBIE_10
            AddTo   gd_ZOMBIE_10_LIFE  1
            SWITCH RAND-2
                CASE 0
        		    PlaceC  RC_ZOMBIE_10   pRC_ZOMBIE_10C1
                CASE 1
        		    PlaceC  RC_ZOMBIE_10   pRC_ZOMBIE_10C2
            ENDSWITCH
            RestrictedWanderButAttackOnSight  RC_ZOMBIE_10
        ELSE
            Remove  gd_ZOMBIE_10_LIFE
        ENDIF
    ENDIF
END

/////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////

VIG FlyBy FALSE

	Widescreen TRUE

	// *** EXAMPLE CAMERA FLY-BY CODE ***

	// use UUCameraComplete to wait for a pan to finish
	// use SetCamMoveConstant to set camera movement per frame
	//     - remember the movie is played at 25fps no matter how slow it records

	SetCamMoveConstant 30
	FreeCam
	PhotoOn

	camcut Flyby03

	campan Flyby01
	UUCameraComplete

	campan Flyby02
	UUCameraComplete

	PhotoOff

	// *** END OF FLY-BY ***

	Widescreen FALSE

END

/////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////

VIG FlyBy2 FALSE

	Widescreen TRUE

	// *** EXAMPLE CAMERA FLY-BY CODE ***

	// use UUCameraComplete to wait for a pan to finish
	// use SetCamMoveConstant to set camera movement per frame
	//     - remember the movie is played at 25fps no matter how slow it records

	SetCamMoveConstant 30
	FreeCam
	PhotoOn

	camcut Flyby05

	campan Flyby04
	UUCameraComplete

	campan Flyby01
	UUCameraComplete

	campan Flyby02
	UUCameraComplete

	PhotoOff

	// *** END OF FLY-BY ***

	Widescreen FALSE

END

/////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////

VIG FlyBy3 FALSE

	Widescreen TRUE

	// *** EXAMPLE CAMERA FLY-BY CODE ***

	// use UUCameraComplete to wait for a pan to finish
	// use SetCamMoveConstant to set camera movement per frame
	//     - remember the movie is played at 25fps no matter how slow it records

	SetCamMoveConstant 30
	FreeCam
	PhotoOn

	camcut Flyby06

	campan Flyby07
	UUCameraComplete

	campan Flyby08
	UUCameraComplete

	PhotoOff

	// *** END OF FLY-BY ***

	Widescreen FALSE

END

/////////////////////////////////////////////////////////////////////

VIG UndeadNoises1 ONESEC 
	SWITCH RAND-21
		CASE 1
			IF ONMAP-RC_ZOMBIE_1 && !ISDEAD-RC_ZOMBIE_1 && !INCOMBAT-RC_ZOMBIE_1
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_1
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_1
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_1
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_1
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_1
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_1
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 2
			IF ONMAP-RC_ZOMBIE_2 && !ISDEAD-RC_ZOMBIE_2 && !INCOMBAT-RC_ZOMBIE_2
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_2
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_2
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_2
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_2
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_2
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_2
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 3
			IF ONMAP-RC_ZOMBIE_3 && !ISDEAD-RC_ZOMBIE_3 && !INCOMBAT-RC_ZOMBIE_3
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_3
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_3
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_3
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_3
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_3
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_3
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 4
			IF ONMAP-RC_ZOMBIE_4 && !ISDEAD-RC_ZOMBIE_4 && !INCOMBAT-RC_ZOMBIE_4
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_4
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_4
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_4
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_4
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_4
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_4
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 5
			IF ONMAP-RC_ZOMBIE_5 && !ISDEAD-RC_ZOMBIE_5 && !INCOMBAT-RC_ZOMBIE_5
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_5
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_5
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_5
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_5
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_5
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_5
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 6
			IF ONMAP-RC_ZOMBIE_6 && !ISDEAD-RC_ZOMBIE_6 && !INCOMBAT-RC_ZOMBIE_6
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_6
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_6
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_6
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_6
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_6
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_6
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 7
			IF ONMAP-RC_ZOMBIE_7 && !ISDEAD-RC_ZOMBIE_7 && !INCOMBAT-RC_ZOMBIE_7
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_7
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_7
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_7
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_7
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_7
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_7
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 8
			IF ONMAP-RC_ZOMBIE_8 && !ISDEAD-RC_ZOMBIE_8 && !INCOMBAT-RC_ZOMBIE_8
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_8
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_8
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_8
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_8
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_8
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_8
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 9
			IF ONMAP-RC_ZOMBIE_9 && !ISDEAD-RC_ZOMBIE_9 && !INCOMBAT-RC_ZOMBIE_9
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_9
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_9
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_9
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_9
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_9
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_9
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 10
			IF ONMAP-RC_ZOMBIE_10 && !ISDEAD-RC_ZOMBIE_10 && !INCOMBAT-RC_ZOMBIE_10
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_10
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_10
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_10
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_10
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_10
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_10
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 11
			IF ONMAP-RC_ZOMBIE_11 && !ISDEAD-RC_ZOMBIE_11 && !INCOMBAT-RC_ZOMBIE_11
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_11
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_11
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_11
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_11
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_11
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_11
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 12
			IF ONMAP-RC_ZOMBIE_12 && !ISDEAD-RC_ZOMBIE_12 && !INCOMBAT-RC_ZOMBIE_12
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_12
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_12
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_12
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_12
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_12
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_12
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 13
			IF ONMAP-RC_ZOMBIE_13 && !ISDEAD-RC_ZOMBIE_13 && !INCOMBAT-RC_ZOMBIE_13
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_13
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_13
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_13
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_13
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_13
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_13
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 14
			IF ONMAP-RC_ZOMBIE_14 && !ISDEAD-RC_ZOMBIE_14 && !INCOMBAT-RC_ZOMBIE_14
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_14
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_14
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_14
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_14
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_14
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_14
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 15
			IF ONMAP-RC_ZOMBIE_15 && !ISDEAD-RC_ZOMBIE_15 && !INCOMBAT-RC_ZOMBIE_15
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_15
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_15
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_15
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_15
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_15
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_15
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 16
			IF ONMAP-RC_ZOMBIE_16 && !ISDEAD-RC_ZOMBIE_16 && !INCOMBAT-RC_ZOMBIE_16
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_16
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_16
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_16
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_16
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_16
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_16
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 17
			IF ONMAP-RC_ZOMBIE_17 && !ISDEAD-RC_ZOMBIE_17 && !INCOMBAT-RC_ZOMBIE_17
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_17
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_17
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_17
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_17
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_17
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_17
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 18
			IF ONMAP-RC_ZOMBIE_18 && !ISDEAD-RC_ZOMBIE_18 && !INCOMBAT-RC_ZOMBIE_18
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_18
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_18
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_18
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_18
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_18
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_18
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 19
			IF ONMAP-RC_ZOMBIE_19 && !ISDEAD-RC_ZOMBIE_19 && !INCOMBAT-RC_ZOMBIE_19
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_19
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_19
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_19
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_19
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_19
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_19
						ENDSWITCH 
				ENDSWITCH
			ENDIF
		CASE 20
			IF ONMAP-RC_ZOMBIE_20 && !ISDEAD-RC_ZOMBIE_20 && !INCOMBAT-RC_ZOMBIE_20
				SWITCH RAND-2
					CASE 0
						SWITCH RAND-6
							CASE 0
								PlaySFXPerson undead1.wav RC_ZOMBIE_20
							CASE 1
//								PlaySFXPerson undead2.wav RC_ZOMBIE_20
							CASE 2
								PlaySFXPerson undead3.wav RC_ZOMBIE_20
							CASE 3
								PlaySFXPerson undead5.wav RC_ZOMBIE_20
							CASE 4
								PlaySFXPerson undead6.wav RC_ZOMBIE_20
							CASE 5
//								PlaySFXPerson undead7.wav RC_ZOMBIE_20
						ENDSWITCH 
				ENDSWITCH
			ENDIF
	ENDSWITCH
END

/////////////////////////////////////////////////////////////////////

