home *** CD-ROM | disk | FTP | other *** search
Text File | 2002-10-11 | 64.8 KB | 2,445 lines |
- library mwfunc;
-
- const
-
- #include_ "mwconst.abi"
-
- type
- #include_ "mwtype.abi"
-
- var
- static ObjectID last_sound_played;
- static Boolean any_sounds_played;
-
- //------------------------------------------------------------------------------------
-
- function init;
- code
- any_sounds_played = FALSE;
-
-
- endfunction;
-
-
- function getRelativeAlignment (ObjectID p1,ObjectID p2) : integer;
-
- var
-
- integer align1;
- integer align2;
-
- code
- align1 = getAlignment (p1);
- align2 = getAlignment (p2);
-
- if align2 == NEUTRAL_ALIGNMENT then
- return (NEUTRAL);
- endif;
- if align1 <> align2 then
- return (ENEMY);
- endif;
- return (FRIENDLY);
-
- endfunction;
-
- function SnapToGround(ObjectID obj);
- var
- LocPoint l;
-
- code
- getLocation(obj,l);
- l[1] = -1;
- teleport(obj,l);
- endfunction;
-
- function ProtectAGroup(integer group_num) : integer;
- // This one may or may not work. Needs testing.
- var
-
- code
-
- if (isShot (GroupObjectId(group_num))) then
- if (getRelativeAlignment(me,WhoShot(GroupObjectId(group_num))) == ENEMY) then
- setTarget(me,WhoShot(GroupObjectId(group_num)));
- return (1);
- endif;
- endif;
-
- return (0);
- endfunction;
-
-
- function GeneralPlayChatter(ObjectId sound,
- integer which_timer, integer what_delay, integer what_chance);
- // if Timer which_timer is over what_delay, there is a chance what_chance
- // that the sound sound is played. After this, the timer is reset.
- // use this function for easy handling of radio chatter.
- // what_chance is a number from 0 to 1000. The percentage chance of the sound playing is
- // what_chance / 10
- var
-
- code
- if (any_sounds_played == TRUE) then
- if (last_sound_played == sound) then
- what_chance = -1;
- endif;
- endif;
-
- if (TimeGreater(which_timer,what_delay)) then
- if (Rand(0,1000) <= what_chance) then
- PlaySound(sound);
- last_sound_played = sound;
- any_sounds_played = TRUE;
- ResetTimer(which_timer);
- endif;
-
- endif;
- endfunction;
-
- function SetMyTarget(integer searchrange) : boolean;
-
- var
-
- integer foe;
-
- code
- foe = FindObject(ME,FA_ENEMY,FT_DEFAULT,FC_BEST_TARGET,FF_WHO_SHOT + FF_SEEPLAYER,searchrange);
-
- if (foe <> no_unit) then
- SetTarget (me,foe);
- return (true);
- endif;
-
- return (false);
-
- endfunction;
-
- function TurretSetMyTarget(integer searchrange) : boolean;
-
- var
-
- integer foe;
-
- code
- foe = FindObject(ME,FA_ENEMY,FT_DEFAULT,FC_BEST_TARGET,FF_WHO_SHOT + FF_SEEPLAYER + FF_TARGETLOS,searchrange);
-
- if (foe <> no_unit) then
- SetTarget (me,foe);
- return (true);
- endif;
-
- return (false);
-
- endfunction;
-
- function FindEnemy(integer searchrange, integer flags) : boolean;
-
- var
- integer foe;
-
- code
- foe = FindObject(ME,FA_ENEMY,flags,FC_BEST_TARGET,FF_WHO_SHOT + FF_SEEPLAYER,searchrange);
-
- if (foe <> no_unit) then
- SetTarget (me,foe);
- return (true);
- endif;
-
- return (false);
-
- endfunction;
-
- function Bot_FindEnemy(integer searchrange) : boolean;
-
- var
- integer foe;
-
- code
- foe = FindObject(ME,FA_ENEMY,FT_DEFAULT,FC_BEST_TARGET,FF_WHO_SHOT + FF_SEEPLAYER + FF_LOOK_EVERYWHERE,searchrange);
-
- if (foe <> no_unit) then
- SetTarget (me,foe);
- return (true);
- endif;
-
- return (false);
-
- endfunction;
-
- function LeaveAttackState(integer withdrawrange) : boolean;
-
- var
-
- integer target;
-
- code
-
- target = gettarget(me);
-
- //1. I somehow got here without a legitimate target
- if (target < 0) then
- return(true);
- else
- //2. My target is dead
- if (isDead (target) == TRUE) then
- return(true);
- else
- //3. My target has gotten too far from me
- if ((isWithin(target,me,withdrawrange)) == FALSE) then
- if (WhoShot(me) <> target) then
- return(true);
- endif;
- endif;
- endif;
- endif;
-
-
- return (false);
-
- endfunction;
-
- function TurretLeaveAttackState(integer withdrawrange) : boolean;
-
- var
-
- integer target;
-
- code
-
- target = gettarget(me);
-
- //1. I somehow got here without a legitimate target
- if (target < 0) then
- return(true);
- else
- //2. My target is dead
- if (isDead (target) == TRUE) then
- return(true);
- else
- //3. My target has gotten too far from me
- if ((isWithin(target,me,withdrawrange)) == FALSE) then
- if (WhoShot(me) <> target) then
- return(true);
- endif;
- endif;
-
- //4. My target has gotten out of LOS from me
- if ((CanSee(me,target)) == FALSE) then
- if (WhoShot(me) <> target) then
- return(true);
- endif;
- endif;
- endif;
- endif;
-
-
- return (false);
-
- endfunction;
-
-
-
- function PlayChatter(ObjectID who_speaks, ObjectId sound,
- integer which_timer, integer what_delay, integer what_chance, Boolean check_combat);
- // if Timer which_timer is over what_delay and unit who_speaks is
- // alive, there is a chance what_chance
- // that the sound sound is played. After this, the timer is reset.
- // If check_combat is TRUE, the sound is only played if who_speaks is involved in a fight.
- // use this function for easy handling of radio chatter.
- // what_chance is a number from 0 to 1000. The percentage chance of the sound playing is
- // what_chance / 10
- var
-
- code
- if (any_sounds_played == TRUE) then
- if (last_sound_played == sound) then
- what_chance = -1;
- endif;
- endif;
-
-
- if ((IsDead(who_speaks) == FALSE) and (TimeGreater(which_timer,what_delay))) then
- if (Rand(0,1000) <= what_chance) then
- if ((check_combat == FALSE) or
- ((check_combat == TRUE) and (IsShot(who_speaks)))) then
- PlaySound(sound);
- last_sound_played = sound;
- any_sounds_played = TRUE;
- ResetTimer(which_timer);
- endif;
- endif;
- endif;
- endfunction;
-
-
- function GroupPlayChatter(integer group_who_speaks, ObjectId sound,
- integer which_timer, integer what_delay, integer what_chance, Boolean check_combat);
- // if Timer which_timer is over what_delay and group group_who_speaks is
- // alive, there is a chance what_chance
- // that the sound sound is played. After this, the timer is reset.
- // If check_combat is TRUE, the sound is only played if the group is involved in a fight.
- // use this function for easy handling of radio chatter.
- // what_chance is a number from 0 to 1000. The percentage chance of the sound playing is
- // what_chance / 10
- var
-
- code
- if (any_sounds_played == TRUE) then
- if (last_sound_played == sound) then
- what_chance = -1;
- endif;
- endif;
-
-
- if ((GroupAllDead(GroupObjectId(group_who_speaks)) == FALSE) and (TimeGreater(which_timer,what_delay))
- and (Rand(0,1000) <= what_chance)) then
- if ((check_combat == FALSE) or
- ((check_combat == TRUE) and (IsShot(GroupObjectId(group_who_speaks))))) then
- PlaySound(sound);
- last_sound_played = sound;
- any_sounds_played = TRUE;
- ResetTimer(which_timer);
- endif;
- endif;
-
- endfunction;
-
-
- // Cinema_ZoomOut():
- // Does a generic zoom-out camera animation suitable for mission victory or failure cut scenes.
- // "who" is the unit to zoom out from; it must be a single unit (typically the player's 'Mech).
- // "unique_timer_id" is the ID of a timer that the function can use that's not used for anything
- // else in any of the ABL scripts related to this mission.
- // "duration" is how long the zoom-out sequence will last. 10 to 20 seconds is generally
- // recommended, though this may be anything above 0. Since the distance to zoom out
- // is fixed, a longer duration will mean a slower zoom-out.
-
- function Cinema_ZoomOut(ObjectID who, integer unique_timer_id, real duration) : Boolean;
- var
- real time_remaining;
-
- code
- if (Not TimeGreater(unique_timer_id,0)) then
- StartTimer(unique_timer_id);
-
- Targetfollowobject(who);
- camerafollowobject(who);
- SetCameraFootShake(who,100);
-
- TargetOffset(0.0,5.0,0.0,0.0,true);
- CameraOffset(0.0,5.0,30.0,0.0,true);
-
- return (false);
- endif;
-
- if (TimeGreater(unique_timer_id,duration)) then
- return (true);
- endif;
-
- if (duration > 2.0) then
- if (TimeGreater(unique_timer_id,2.0)) then
- time_remaining = duration - 2.0;
- TargetOffset(0.0,9.0,-20.0,time_remaining,true);
- CameraOffset(0.0,40.0,150.0,time_remaining,true);
- endif;
- endif;
-
- return (false);
- endfunction;
-
-
- // IsShotOrDead():
- // Returns true if the unit was shot recently or is destroyed.
-
- function IsShotOrDead(ObjectID who) : Boolean;
- var
-
- code
- if (IsDead(who)) then
- return (true);
- endif;
-
- return (IsShot(who));
- endfunction;
-
-
- // WhoShotOrKilled():
- // Indicates who shot or destroyed a given unit
-
- function WhoShotOrKilled(ObjectID who) : ObjectID;
- var
-
- code
- if (IsDead(who)) then
- return (WhoDestroyed(who));
- endif;
-
- if (IsShot(who) == false) then
- return (WhoShot(who));
- endif;
-
- return (NO_UNIT);
- endfunction;
-
-
- // ReachedNav():
- // Indicates whether a unit (or group or team) IsWithin() a nav point
-
- function ReachedNav(ObjectID who, ObjectID nav) : Boolean;
- var
-
- code
- return (IsWithin(who,nav,150));
-
- endfunction;
-
- function WakeNearMe(Integer MyGroup, Integer HowClose) : Boolean;
- var
-
- code
-
- if (MyGroup<>0) then
- if (IsShot(GroupObjectID(MyGroup))) then
- return (TRUE);
- else
- if (IsWithin(ME,epl_player0,HowClose)) then
- return (TRUE);
- else
- return (FALSE);
- endif;
- endif;
- else
- if (IsShot(ME)) then
- return (TRUE);
- else
- if (IsWithin(ME,epl_player0,HowClose)) then
- return (TRUE);
- else
- return (FALSE);
- endif;
- endif;
- endif;
-
- endfunction;
-
- function AssignSkill(Integer SkillLevel);
- var
-
- code
-
- switch (SkillLevel)
-
- case 1: // Falling down cadet
- SetFiringDelay (ME,2.5,5.0);
- SetIgnoreFriendlyFire (ME,true);
- SetIsShotRadius (ME,80);
- SetEntropyMood (ME,NEUTRAL_START);
- SetCurMood (ME,NEUTRAL_START);
- SetSkillLevel (ME,10,20,5);
- SetAttackThrottle (ME,50);
- endcase;
-
- case 2: // Second time in his daddy's 'Mech
- SetFiringDelay (ME,2.0,4.0);
- SetIgnoreFriendlyFire (ME,true);
- SetIsShotRadius (ME,90);
- SetEntropyMood (ME,NEUTRAL_START);
- SetCurMood (ME,NEUTRAL_START);
- SetSkillLevel (ME,30,25,20);
- SetAttackThrottle (ME,65);
- endcase;
-
- case 3: // Low level flunky
- SetFiringDelay (ME,1.5,3.0);
- SetIgnoreFriendlyFire (ME,true);
- SetIsShotRadius (ME,120);
- SetEntropyMood (ME,NEUTRAL_START);
- SetCurMood (ME,NEUTRAL_START);
- SetSkillLevel (ME,50,30,30);
- SetAttackThrottle (ME,80);
- endcase;
-
- case 4: // Green
- SetFiringDelay (ME,1.1,2.2);
- SetIgnoreFriendlyFire (ME,true);
- SetIsShotRadius (ME,120);
- SetEntropyMood (ME,NEUTRAL_START);
- SetCurMood (ME,NEUTRAL_START);
- SetSkillLevel (ME,60,30,40);
- SetAttackThrottle (ME,80);
- endcase;
-
- case 5: // Regular pilot
- SetFiringDelay (ME,0.8,1.6);
- SetIgnoreFriendlyFire (ME,true);
- SetIsShotRadius (ME,120);
- SetEntropyMood (ME,NEUTRAL_START);
- SetCurMood (ME,NEUTRAL_START);
- SetSkillLevel (ME,70,45,45); // Was Elite 50
- SetAttackThrottle (ME,90);
- endcase;
-
- case 6: // Skilled pilot
- SetFiringDelay (ME,0.5,1.0);
- SetIgnoreFriendlyFire (ME,true);
- SetIsShotRadius (ME,120);
- SetEntropyMood (ME,NEUTRAL_START);
- SetCurMood (ME,NEUTRAL_START);
- SetSkillLevel (ME,80,60,50); // Was Elite 60
- SetAttackThrottle (ME,100);
- endcase;
-
- case 7: // Veteran pilot
- SetFiringDelay (ME,0.3,0.6);
- SetIgnoreFriendlyFire (ME,true);
- SetIsShotRadius (ME,150);
- SetEntropyMood (ME,NEUTRAL_START);
- SetCurMood (ME,NEUTRAL_START);
- SetSkillLevel (ME,90,75,55); // Was Elite 70
- SetAttackThrottle (ME,100);
- endcase;
-
- case 8: // Elite pilot
- SetFiringDelay (ME,0.2,0.4);
- SetIgnoreFriendlyFire (ME,true);
- SetIsShotRadius (ME,180);
- SetEntropyMood (ME,NEUTRAL_START);
- SetCurMood (ME,NEUTRAL_START);
- SetSkillLevel (ME,100,90,60); // Was Elite 80
- SetAttackThrottle (ME,100);
- endcase;
-
- case 9: // Very Elite MechWarrior
- SetFiringDelay (ME,0.1,0.3);
- SetIgnoreFriendlyFire (ME,true);
- SetIsShotRadius (ME,210);
- SetEntropyMood (ME,NEUTRAL_START);
- SetCurMood (ME,NEUTRAL_START);
- SetSkillLevel (ME,100,110,70); // Was Elite 85
- SetAttackThrottle (ME,100);
- endcase;
-
- case 10: // Almost a Boss
- SetFiringDelay (ME,0.0,0.3);
- SetIgnoreFriendlyFire (ME,true);
- SetIsShotRadius (ME,240);
- SetEntropyMood (ME,NEUTRAL_START);
- SetCurMood (ME,NEUTRAL_START);
- SetSkillLevel (ME,100,130,75); // Was Elite 90
- SetAttackThrottle (ME,100);
- endcase;
-
-
- /*SetFiringDelay (ME,minDelay,maxDelay);
- SetIgnoreFriendlyFire (ME,true);
- SetIsShotRadius (ME,isShotRadius);
- SetEntropyMood (ME,mood);
- SetCurMood (ME,mood);
- SetSkillLevel (ME,piloting,gunnery,eliteLevel);
- SetAttackThrottle (ME,attackThrottle);*/
-
- endswitch;
-
- endfunction;
-
- function SpinCamera1(ObjectID Targz, ObjectID Camz, Real Heightz, Real Timez, Boolean Shakez);
- var
-
- code
- playerai(epl_player0,true);
- SetCompositingEnabled(False);
-
- CinemaStart;
-
- starttimer(21); // This is the cineractive counter.
- resettimer(21);
-
- if (Shakez) then
- SetCameraFootShake(Targz,25);
- endif;
-
- FadeToBlack(0.0);
- FadeFromBlack(1.0);
-
- Targetfollowobject(Targz);
- Camerafollowobject(Camz);
- TargetOffset(0.0,0.0,0.0,0.0,false);
- TargetOffset(0.0,8.0,0.0,4.0,false);
- CameraOffset(-60.0,25.0,3.0,0.0,true);
- CameraOffset(0.0,8.0,-35.0,4.0,true);
-
- endfunction;
-
- function SpinCamera2(ObjectID Targz, ObjectID Camz, Real Heightz, Real Timez, Boolean Shakez);
- var
-
- code
-
- starttimer(21); // This is the cineractive counter.
- resettimer(21);
-
- Targetfollowobject(Targz);
- Camerafollowobject(Camz);
- TargetOffset(0.0,8.0,0.0,0.0,false);
- TargetOffset(0.0,8.0,0.0,2.0,false);
- CameraOffset(0.0,8.0,-35.0,0.0,true);
- CameraOffset(0.0,8.0,0.0,2.0,true);
-
- endfunction;
-
- function HeadonCamera(ObjectID Targz, ObjectID Camz, Real Heightz, Real Timez, Boolean Shakez);
- var
-
- code
- playerai(epl_player0,true);
- SetCompositingEnabled(False);
-
- CinemaStart;
-
- starttimer(21); // This is the cineractive counter.
- resettimer(21);
-
- if (Shakez) then
- SetCameraFootShake(Targz,25);
- endif;
-
- FadeToBlack(0.0);
- FadeFromBlack(5.0);
-
- Targetfollowobject(Targz);
- Camerafollowobject(Camz);
- Targetoffset(0.0,5.0,0.0,0.0,true);
- Targetoffset(0.0,5.0,0.0,0.0,true);
- Cameraoffset(0.0,Heightz,90.0,0.0,true);
- Cameraoffset(0.0,Heightz,35.0,Timez,true);
-
- endfunction;
-
- function ChaseCamera(ObjectID Targz, ObjectID Camz, Real Heightz, Real Timez, Boolean Shakez);
- var
-
- code
- playerai(epl_player0,true);
- SetCompositingEnabled(False);
-
- CinemaStart;
-
- starttimer(21); // This is the cineractive counter.
- resettimer(21);
-
- if (Shakez) then
- SetCameraFootShake(Targz,25);
- endif;
-
- FadeToBlack(0.0);
- FadeFromBlack(5.0);
-
- Targetfollowobject(Targz);
- Camerafollowobject(Camz);
- Targetoffset(0.0,5.0,0.0,0.0,true);
- Targetoffset(0.0,5.0,0.0,0.0,true);
- Cameraoffset(0.0,Heightz,-80.0,0.0,true);
- Cameraoffset(0.0,Heightz,-35.0,Timez,true);
-
- endfunction;
-
- function SpinOverCamera(ObjectID Targz, ObjectID Camz, Real Heightz, Real Timez, Boolean Shakez);
- var
-
- code
-
- playerai(epl_player0,true);
- SetCompositingEnabled(False);
-
- CinemaStart;
-
- starttimer(21); // This is the cineractive counter.
- resettimer(21);
-
- if (Shakez) then
- SetCameraFootShake(Targz,25);
- endif;
-
- FadeToBlack(0.0);
- Fadefromblack(2.0);
-
- Targetfollowobject(Targz);
- camerafollowobject(Camz);
- targetoffset(0.0,8.0,0.0,0.0,false);
- Cameraoffset(-100.0, Heightz+14.0, 35.0, 0.0, true);// Base Height - 35, Base Time - 17
- Cameraoffset( 90.0, Heightz , 15.0, Timez, true);
-
- endfunction;
-
- function SpinUnderCamera(ObjectID Targz, ObjectID Camz, Real Heightz, Real Timez, Boolean Shakez);
- var
-
- code
-
- playerai(epl_player0,true);
- SetCompositingEnabled(False);
-
- CinemaStart;
-
- starttimer(21); // This is the cineractive counter.
- resettimer(21);
-
- if (Shakez) then
- SetCameraFootShake(Targz,25);
- endif;
-
- FadeToBlack(0.0);
- Fadefromblack(8.0);
-
- Targetfollowobject(Targz);
- camerafollowobject(Camz);
- targetoffset(0.0,5.0,0.0,0.0,false);
-
- Cameraoffset(100.0, Heightz , -4.0, 0.0 , true); // Base Height - 16, Base Time - 17
- Cameraoffset( 0.0, Heightz-15.0, 35.0, Timez, true);
-
- endfunction;
-
- function SpinUnderCameraB(ObjectID Targz, ObjectID Camz, Real Heightz, Real Timez, Boolean Shakez);
- var
-
- code
-
- playerai(epl_player0,true);
- SetCompositingEnabled(False);
-
- CinemaStart;
-
- starttimer(21); // This is the cineractive counter.
- resettimer(21);
-
- if (Shakez) then
- SetCameraFootShake(Targz,25);
- endif;
-
- FadeToBlack(0.0);
- Fadefromblack(4.0);
-
- Targetfollowobject(Targz);
- camerafollowobject(Camz);
- targetoffset(0.0,8.0,0.0,0.0,false);
-
- Cameraoffset(-100.0, Heightz , -4.0, 0.0 , true); // Base Height - 16, Base Time - 17
- Cameraoffset( 0.0, Heightz-15.0, 30.0, Timez, true);
-
- endfunction;
-
- function StaticCamera(ObjectID Targz, ObjectID Camz, Real Heightz, Real Timez, Boolean Shakez);
- var
-
- code
-
- playerai(epl_player0,true);
- SetCompositingEnabled(False);
-
- CinemaStart;
-
- starttimer(21); // This is the cineractive counter.
- resettimer(21);
-
- if (Shakez) then
- SetCameraFootShake(Targz,25);
- endif;
-
- FadeToBlack(0.0);
- Fadefromblack(3.0);
-
- Targetfollowobject(Targz);
- camerafollowobject(Camz);
- targetoffset(0.0,2.0,0.0,0.0,false);
- Cameraoffset(0.0,Heightz,0.0,0.0,true); // Base Height - 2, Base Time - 0
- Cameraoffset(0.0,Heightz,0.0,Timez,true);
-
- endfunction;
-
- function JumpCamera(ObjectID Targz, ObjectID Camz, Real Heightz, Real Timez, Boolean Shakez);
- var
-
- code
-
- playerai(epl_player0,true);
- SetCompositingEnabled(False);
-
- CinemaStart;
-
- starttimer(21); // This is the cineractive counter.
- resettimer(21);
-
- if (Shakez) then
- SetCameraFootShake(Targz,25);
- endif;
-
- SetCameraFOV(55.0,Timez); // Base Time - 0.5
-
- endfunction;
-
- function PullOutCamera(ObjectID Targz, ObjectID Camz, Real Heightz, Real Timez, Boolean Shakez);
- // Pulls away from the target by Heightz amount in Timez time.
- var
-
- code
-
- playerai(epl_player0,true);
- SetCompositingEnabled(False);
-
- CinemaStart;
-
- starttimer(21); // This is the cineractive counter.
- resettimer(21);
-
- if (Shakez) then
- SetCameraFootShake(Targz,25);
- endif;
-
- FadeToBlack(0.0);
- Fadefromblack(8.0);
-
- Targetfollowobject(Targz);
- camerafollowobject(Camz);
- targetoffset(0.0,5.0,0.0,0.0,false);
-
- Cameraoffset(0.0, 15.0, 25.0, 0.0, true);
- Cameraoffset(0.0, 15.0 + (Heightz/3), 25.0 + heightz, Timez, true);
-
- endfunction;
-
- function RandIntroCamera(ObjectID PlayerMech, ObjectID Arena); // Pick a camera per arena
- var
-
- code
-
- switch (Arena)
- case 1: // Coliseum
- SpinOverCamera(PlayerMech,PlayerMech,17.0,17.0,true);
- endcase;
- case 2: // Coliseum Night
- SpinUnderCameraB(PlayerMech,PlayerMech,17.0,17.0,true);
- endcase;
- case 3: // Factory
- playerai(epl_player0,true);
- SetCompositingEnabled(False);
-
- CinemaStart;
-
- starttimer(21); // This is the cineractive counter.
- resettimer(21);
-
- FadeToBlack(0.0);
- Fadefromblack(8.0);
-
- Targetfollowobject(PlayerMech);
- camerafollowobject(PlayerMech);
- targetoffset(0.0,4.0,0.0,0.0,false);
-
- Cameraoffset(0.0,20.0,300.0,0.0,true);
- Cameraoffset(0.0,20.0,50.0,17.0,true);
- endcase;
- case 4: // Factory Night
- ChaseCamera(PlayerMech,PlayerMech,17.0,17.0,true);
- endcase;
- case 5: //Jungle
- playerai(epl_player0,true);
- SetCompositingEnabled(False);
-
- CinemaStart;
-
- starttimer(21); // This is the cineractive counter.
- resettimer(21);
-
- FadeToBlack(0.0);
- Fadefromblack(8.0);
-
- Targetfollowobject(PlayerMech);
- camerafollowobject(PlayerMech);
- targetoffset(0.0,4.0,0.0,0.0,false);
-
- Cameraoffset(-100.0,50.0,250.0,0.0,true);
- Cameraoffset(50.0,50.0,50.0,17.0,true);
- endcase;
- case 6: //Jungle Night
- HeadOnCamera(PlayerMech,PlayerMech,17.0,17.0,true);
- endcase;
- endswitch;
-
- endfunction;
-
- function RandClosingCamera(ObjectID PlayerMech); // TBD later
- var
-
- code
-
- Targetfollowobject(playermech);
- Camerafollowobject(playermech);
- Targetoffset(0.0,4.0,0.0,0.0,false);
- Cameraoffset(-30.0,125.0,75.0,0.0,false);
- Cameraoffset(60.0,20.0,25.0,14.0,false);
-
- endfunction;
-
- // SOLARIS VII - Adding new functions for Solaris
- function SolGenericIntro; // When you run out of arena and class specific intro messages
- var
-
- code
-
- if (not GetEventFlag("SolGrand")) then
- switch (GetEventInteger("SolGenericIntro"))
- case 0:
- PlayVoiceOverOnce("VO\Solaris\IntroGeneric1",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\IntroGeneric2",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\IntroGeneric3",TALKER_FIS);
- endcase;
- case 3:
- PlayVoiceOverOnce("VO\Solaris\IntroGeneric4",TALKER_FIS);
- endcase;
- case 4:
- PlayVoiceOverOnce("VO\Solaris\IntroGeneric5",TALKER_FIS);
- endcase;
- case 5:
- PlayVoiceOverOnce("VO\Solaris\IntroGeneric6",TALKER_FIS);
- endcase;
- case 6:
- PlayVoiceOverOnce("VO\Solaris\IntroGeneric7",TALKER_FIS);
- endcase;
- endswitch;
-
- if (GetEventInteger("SolGenericIntro")==6) then
- SetEventInteger("SolGenericIntro",0);
- else
- SetEventInteger("SolGenericIntro",GetEventInteger("SolGenericIntro") + 1);
- endif;
-
- else // This is in PostSeason
- switch (GetEventInteger("SolPostIntro"))
- case 0:
- PlayVoiceOverOnce("VO\Solaris\PostIntro1",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\PostIntro2",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\PostIntro3",TALKER_FIS);
- endcase;
- endswitch;
-
- if (GetEventInteger("SolPostIntro")==2) then
- SetEventInteger("SolPostIntro",0);
- else
- SetEventInteger("SolPostIntro",GetEventInteger("SolPostIntro") + 1);
- endif;
-
- endif;
-
- endfunction;
-
- function SolCycleCheck (integer PlayerMech) : integer; // Each round check this - Generic Solaris stuff
- var
-
- code
-
- // NERF CHECK - Are you hiding from everyone?
- if (timegreater(20,1)) then
- if (not timegreater(1,1)) then
- StartTimer(20); // This is the Coward timer
- endif;
- endif;
-
- if (IsShot(PlayerMech)) then // If the player is shot, they're ok
- ResetTimer(20);
- ResetTimer(19);
- endif;
-
- if (timegreater(1,300)) then // If the time is greater than 5 minutes, you are OK
- ResetTimer(20);
- ResetTimer(19);
- endif;
-
- if (timegreater(18,1)) then
- if (timegreater(19,60)) then // After some time you are disqualified - 90sec
- KillVoiceOvers;
- PlayVoiceOver("VO\Solaris\Disqualified",TALKER_FIS);
- StartTimer(2); // You are a loser
- ResetTimer(18);
- ResetTimer(19);
- ResetTimer(20);
- Return (1);
- endif;
- endif;
-
- if (timegreater(20,120)) then // 120sec
- KillVoiceOvers;
- switch (GetEventInteger("SolCoward"))
- case 0:
- PlayVoiceOver("VO\Solaris\NotFighting2",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOver("VO\Solaris\NotFighting3",TALKER_FIS);
- endcase;
- endswitch;
-
- if (GetEventInteger("SolCoward")==1) then
- SetEventInteger("SolCoward",0);
- else
- SetEventInteger("SolCoward",GetEventInteger("SolCoward") + 1);
- endif;
- ResetTimer(20);
- StartTimer(18);
- StartTimer(19);
- endif;
-
- //
-
- endfunction;
-
- function SolOpening; // Duncan's fast opening comments
- var
-
- code
-
- switch (GetEventInteger("SolOpening"))
- case 0:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening1",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening2",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening3",TALKER_FIS);
- endcase;
- case 3:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening4",TALKER_FIS);
- endcase;
- case 4:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening5",TALKER_FIS);
- endcase;
- case 5:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening6",TALKER_FIS);
- endcase;
- case 6:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening7",TALKER_FIS);
- endcase;
- case 7:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening8",TALKER_FIS);
- endcase;
- case 8:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening9",TALKER_FIS);
- endcase;
- case 9:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening10",TALKER_FIS);
- endcase;
- case 10:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening11",TALKER_FIS);
- endcase;
- case 11:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening12",TALKER_FIS);
- endcase;
- case 12:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening13",TALKER_FIS);
- endcase;
- case 13:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening14",TALKER_FIS);
- endcase;
- case 14:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening15",TALKER_FIS);
- endcase;
- case 15:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening16",TALKER_FIS);
- endcase;
- case 16:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening17",TALKER_FIS);
- endcase;
- case 17:
- PlayVoiceOverOnce("VO\Solaris\GenericOpening18",TALKER_FIS);
- endcase;
- endswitch;
-
- if (GetEventInteger("SolOpening")==17) then
- SetEventInteger("SolOpening",0);
- else
- SetEventInteger("SolOpening",GetEventInteger("SolOpening") + 1);
- endif;
-
- endfunction;
-
- function SolClosing; // Duncan's fast Closing comments
- var
-
- code
-
- switch (GetEventInteger("SolClosing"))
- case 0:
- PlayVoiceOverOnce("VO\Solaris\GenericClosing1",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\GenericClosing2",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\GenericClosing3",TALKER_FIS);
- endcase;
- case 3:
- PlayVoiceOverOnce("VO\Solaris\GenericClosing4",TALKER_FIS);
- endcase;
- case 4:
- PlayVoiceOverOnce("VO\Solaris\GenericClosing5",TALKER_FIS);
- endcase;
- case 5:
- PlayVoiceOverOnce("VO\Solaris\GenericClosing6",TALKER_FIS);
- endcase;
- case 6:
- PlayVoiceOverOnce("VO\Solaris\GenericClosing7",TALKER_FIS);
- endcase;
- case 7:
- PlayVoiceOverOnce("VO\Solaris\GenericClosing8",TALKER_FIS);
- endcase;
- case 8:
- PlayVoiceOverOnce("VO\Solaris\GenericClosing9",TALKER_FIS);
- endcase;
- case 9:
- PlayVoiceOverOnce("VO\Solaris\GenericClosing10",TALKER_FIS);
- endcase;
- case 10:
- PlayVoiceOverOnce("VO\Solaris\GenericClosing11",TALKER_FIS);
- endcase;
- case 11:
- PlayVoiceOverOnce("VO\Solaris\GenericClosing12",TALKER_FIS);
- endcase;
- case 12:
- PlayVoiceOverOnce("VO\Solaris\GenericClosing13",TALKER_FIS);
- endcase;
- case 13:
- PlayVoiceOverOnce("VO\Solaris\GenericClosing14",TALKER_FIS);
- endcase;
- case 14:
- PlayVoiceOverOnce("VO\Solaris\GenericClosing15",TALKER_FIS);
- endcase;
- case 15:
- PlayVoiceOverOnce("VO\Solaris\GenericClosing16",TALKER_FIS);
- endcase;
- endswitch;
-
- if (GetEventInteger("SolClosing")==15) then
- SetEventInteger("SolClosing",0);
- else
- SetEventInteger("SolClosing",GetEventInteger("SolClosing") + 1);
- endif;
-
- endfunction;
-
- function SolFinalThree(integer Fame); // Last Three fighters
- var
-
- code
-
- KillVoiceOvers;
- switch (GetEventInteger("SolFinalThree"))
- case 0:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeft3",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort7",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort4",TALKER_FIS);
- endcase;
- case 3:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeft1",TALKER_FIS);
- endcase;
- case 4:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort1",TALKER_FIS);
- endcase;
- case 5:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort2",TALKER_FIS);
- endcase;
- case 6:
- if (fame>0) then
- PlayVoiceOverOnce("VO\Solaris\FinalThree1",TALKER_FIS);
- endif;
- endcase;
- case 7:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort9",TALKER_FIS);
- endcase;
- case 8:
- if (fame>0) then
- PlayVoiceOverOnce("VO\Solaris\FinalThree2",TALKER_FIS);
- endif;
- endcase;
- case 9:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeftFastMatch",TALKER_FIS);
- endcase;
- case 10:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeft5",TALKER_FIS);
- endcase;
- case 11:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeft4",TALKER_FIS);
- endcase;
- case 12:
- if (fame>1) then
- PlayVoiceOverOnce("VO\Solaris\FinalThree4",TALKER_FIS);
- endif;
- endcase;
- case 13:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort8",TALKER_FIS);
- endcase;
- case 14:
- if (fame>1) then
- PlayVoiceOverOnce("VO\Solaris\FinalThree3",TALKER_FIS);
- endif;
- endcase;
- case 15:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort3",TALKER_FIS);
- endcase;
- case 16:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeft7",TALKER_FIS);
- endcase;
- case 17:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeft2",TALKER_FIS);
- endcase;
- case 18:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeft6",TALKER_FIS);
- endcase;
- case 19:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort6",TALKER_FIS);
- endcase;
- case 20:
- PlayVoiceOverOnce("VO\Solaris\ThreeLeftShort5",TALKER_FIS);
- endcase;
- endswitch;
-
- if (GetEventInteger("SolFinalThree")==20) then
- SetEventInteger("SolFinalThree",0);
- else
- SetEventInteger("SolFinalThree",GetEventInteger("SolFinalThree") + 1);
- endif;
-
- endfunction;
-
- function SolFinalTwo(integer Fame); // Last two fighters
- var
-
- code
-
- KillVoiceOvers;
- switch (GetEventInteger("SolFinalTwo") + 1)
- /*case 0: - Removed to fix bug (in IA always refers to light fights)
- PlayVoiceOverOnce("VO\Solaris\FinalDuelLight",TALKER_FIS);
- endcase;*/
- case 1:
- PlayVoiceOverOnce("VO\Solaris\FinalDuel1",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\FinalDuel2",TALKER_FIS);
- endcase;
- case 4:
- PlayVoiceOverOnce("VO\Solaris\FinalDuel3",TALKER_FIS);
- endcase;
- case 5:
- PlayVoiceOverOnce("VO\Solaris\FinalDuel4",TALKER_FIS);
- endcase;
- case 6:
- if (fame>0) then
- PlayVoiceOverOnce("VO\Solaris\FinalDuelModFame1",TALKER_FIS);
- endif;
- endcase;
- case 7:
- if (fame>0) then
- PlayVoiceOverOnce("VO\Solaris\FinalDuelModFame2",TALKER_FIS);
- endif;
- endcase;
- case 9:
- if (fame>0) then
- PlayVoiceOverOnce("VO\Solaris\FinalDuelModFame3",TALKER_FIS);
- endif;
- endcase;
- case 10:
- if (fame>1) then
- PlayVoiceOverOnce("VO\Solaris\FinalDuelBigFame1",TALKER_FIS);
- endif;
- endcase;
- case 11:
- if (fame>1) then
- PlayVoiceOverOnce("VO\Solaris\FinalDuelBigFame2",TALKER_FIS);
- endif;
- endcase;
- case 12:
- if (fame>1) then
- PlayVoiceOverOnce("VO\Solaris\FinalDuelBigFame3",TALKER_FIS);
- endif;
- endcase;
- case 13:
- if (fame>1) then
- PlayVoiceOverOnce("VO\Solaris\FinalDuelBigFame4",TALKER_FIS);
- endif;
- endcase;
- case 14:
- if (fame>2) then
- PlayVoiceOverOnce("VO\Solaris\FinalDuelTitle1",TALKER_FIS);
- endif;
- endcase;
- case 15:
- if (fame>2) then
- PlayVoiceOverOnce("VO\Solaris\FinalDuelTitle2",TALKER_FIS);
- endif;
- endcase;
- case 16:
- if (fame>2) then
- PlayVoiceOverOnce("VO\Solaris\FinalDuelTitle3",TALKER_FIS);
- endif;
- endcase;
- endswitch;
-
- if (GetEventInteger("SolFinalTwo")==20) then
- SetEventInteger("SolFinalTwo",1);
- else
- SetEventInteger("SolFinalTwo",GetEventInteger("SolFinalTwo") + 1);
- endif;
-
- endfunction;
-
- function SolStreak; // Are you on a winning Streak?
- var
-
- code
-
- switch (GetEventInteger("SolStreak"))
- case 2:
- PlayVoiceOverOnce("VO\Solaris\SpectreBionWinningStreak2",TALKER_FIS);
- endcase;
- case 4:
- PlayVoiceOverOnce("VO\Solaris\SpectreBionWinningStreak4",TALKER_FIS);
- endcase;
- case 7:
- PlayVoiceOverOnce("VO\Solaris\SpectreBionWinningStreak7",TALKER_FIS);
- endcase;
- endswitch;
-
- endfunction;
-
- function SolKillTwo(integer Fame); // You've killed two
- var
-
- code
-
- KillVoiceOvers;
- switch (GetEventInteger("SolKillTwo"))
- case 0:
- PlayVoiceOverOnce("VO\Solaris\TwoKills1",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\TwoKills10",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\TwoKills2",TALKER_FIS);
- endcase;
- case 3:
- PlayVoiceOverOnce("VO\Solaris\TwoKills3",TALKER_FIS);
- endcase;
- case 4:
- PlayVoiceOverOnce("VO\Solaris\TwoKills4",TALKER_FIS);
- endcase;
- case 5:
- PlayVoiceOverOnce("VO\Solaris\TwoKills5",TALKER_FIS);
- endcase;
- case 6:
- PlayVoiceOverOnce("VO\Solaris\TwoKills6",TALKER_FIS);
- endcase;
- case 7:
- if (fame>0) then
- PlayVoiceOverOnce("VO\Solaris\TwoKillsFamous",TALKER_FIS);
- endif;
- endcase;
- case 8:
- PlayVoiceOverOnce("VO\Solaris\TwoKills7",TALKER_FIS);
- endcase;
- case 9:
- if (fame>0) then
- PlayVoiceOverOnce("VO\Solaris\TwoKillsFamous2",TALKER_FIS);
- endif;
- endcase;
- case 10:
- PlayVoiceOverOnce("VO\Solaris\TwoKills8",TALKER_FIS);
- endcase;
- case 11:
- if (fame>0) then
- PlayVoiceOverOnce("VO\Solaris\TwoKillsFamous3",TALKER_FIS);
- endif;
- endcase;
- case 12:
- PlayVoiceOverOnce("VO\Solaris\TwoKills9",TALKER_FIS);
- endcase;
- case 13:
- if (fame>0) then
- PlayVoiceOverOnce("VO\Solaris\TwoKillsFamous4",TALKER_FIS);
- endif;
- endcase;
- endswitch;
-
- if (GetEventInteger("SolKillTwo")==13) then
- SetEventInteger("SolKillTwo",0);
- else
- SetEventInteger("SolKillTwo",GetEventInteger("SolKillTwo") + 1);
- endif;
-
- endfunction;
-
- function SolKillThree(integer Fame); // You've killed Three
- var
-
- code
-
- KillVoiceOvers;
- switch (GetEventInteger("SolKillThree"))
- case 0:
- PlayVoiceOverOnce("VO\Solaris\ThreeKills1",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\ThreeKills2",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\ThreeKills3",TALKER_FIS);
- endcase;
- case 3:
- PlayVoiceOverOnce("VO\Solaris\ThreeKills4",TALKER_FIS);
- endcase;
- case 4:
- if (fame>0) then
- PlayVoiceOverOnce("VO\Solaris\ThreeKillsFamous",TALKER_FIS);
- endif;
- endcase;
- case 5:
- PlayVoiceOverOnce("VO\Solaris\ThreeKills5",TALKER_FIS);
- endcase;
- case 6:
- if (fame>0) then
- PlayVoiceOverOnce("VO\Solaris\ThreeKillsFamous2",TALKER_FIS);
- endif;
- endcase;
- case 7:
- PlayVoiceOverOnce("VO\Solaris\ThreeKills6",TALKER_FIS);
- endcase;
- case 8:
- PlayVoiceOverOnce("VO\Solaris\ThreeKills7",TALKER_FIS);
- endcase;
- endswitch;
-
- if (GetEventInteger("SolKillThree")==8) then
- SetEventInteger("SolKillThree",1);
- else
- SetEventInteger("SolKillThree",GetEventInteger("SolKillThree") + 1);
- endif;
-
- endfunction;
-
- function SolKillFour(integer Fame); // You've killed Four
- var
-
- code
-
- KillVoiceOvers;
- switch (GetEventInteger("SolKillFour"))
- case 0:
- PlayVoiceOverOnce("VO\Solaris\FourKills1",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\FourKills2",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\FourKills3",TALKER_FIS);
- endcase;
- case 3:
- PlayVoiceOverOnce("VO\Solaris\FourKills4",TALKER_FIS);
- endcase;
- case 4:
- PlayVoiceOverOnce("VO\Solaris\FourKills5",TALKER_FIS);
- endcase;
- case 5:
- PlayVoiceOverOnce("VO\Solaris\FourKills6",TALKER_FIS);
- endcase;
- case 6:
- PlayVoiceOverOnce("VO\Solaris\FourKills7",TALKER_FIS);
- endcase;
- case 7:
- PlayVoiceOverOnce("VO\Solaris\FourKills8",TALKER_FIS);
- endcase;
- case 8:
- PlayVoiceOverOnce("VO\Solaris\FourKills9",TALKER_FIS);
- endcase;
- case 9:
- PlayVoiceOverOnce("VO\Solaris\FourKills10",TALKER_FIS);
- endcase;
- endswitch;
-
- if (GetEventInteger("SolKillFour")==9) then
- SetEventInteger("SolKillFour",0);
- else
- SetEventInteger("SolKillFour",GetEventInteger("SolKillFour") + 1);
- endif;
-
- endfunction;
-
- function SolLull; // Lull messages in Solaris
- var
-
- code
-
- PlayVoiceOver("VO\ThreeSecond",TALKER_SPE);
- switch (GetEventInteger("SolLull"))
- case 0:
- PlayVoiceOverOnce("VO\Solaris\LullInFight1",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\LullInFight2",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\LullInFight3",TALKER_FIS);
- endcase;
- case 3:
- PlayVoiceOverOnce("VO\Solaris\LullInFight4",TALKER_FIS);
- endcase;
- case 4:
- PlayVoiceOverOnce("VO\Solaris\LullInFight5",TALKER_FIS);
- endcase;
- case 5:
- PlayVoiceOverOnce("VO\Solaris\LullInFight6",TALKER_FIS);
- endcase;
- case 6:
- PlayVoiceOverOnce("VO\Solaris\LullInFight7",TALKER_FIS);
- endcase;
- case 7:
- PlayVoiceOverOnce("VO\Solaris\LullInFight8",TALKER_FIS);
- endcase;
- case 8:
- PlayVoiceOverOnce("VO\Solaris\LullInFight9",TALKER_FIS);
- endcase;
- case 9:
- PlayVoiceOverOnce("VO\Solaris\LullInFight10",TALKER_FIS);
- endcase;
- case 10:
- PlayVoiceOverOnce("VO\Solaris\LullInFight11",TALKER_FIS);
- endcase;
- case 11:
- PlayVoiceOverOnce("VO\Solaris\LullInFight12",TALKER_FIS);
- endcase;
- case 12:
- PlayVoiceOverOnce("VO\Solaris\LullInFight13",TALKER_FIS);
- endcase;
- case 13:
- PlayVoiceOverOnce("VO\Solaris\LullInFight14",TALKER_FIS);
- endcase;
- case 14:
- PlayVoiceOverOnce("VO\Solaris\LullInFight15",TALKER_FIS);
- endcase;
- endswitch;
-
- if (GetEventInteger("SolLull")==16) then
- SetEventInteger("SolLull",0);
- else
- SetEventInteger("SolLull",GetEventInteger("SolLull") + 1);
- endif;
-
- endfunction;
-
- function SolGenericColor; // This is the color commentary for the second half of the game
- var
-
- code
-
- PlayVoiceOver("VO\ThreeSecond",TALKER_SPE);
- if (not GetEventFlag("SolGrand")) then // Not in Post Season
- switch (GetEventInteger("SolGenericColor"))
- case 0:
- PlayVoiceOverOnce("VO\Solaris\SecondGenericColor1",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\SecondGenericColor2",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\SecondGenericColor3",TALKER_FIS);
- endcase;
- case 3:
- PlayVoiceOverOnce("VO\Solaris\SecondGenericColor4",TALKER_FIS);
- endcase;
- case 4:
- PlayVoiceOverOnce("VO\Solaris\SecondGenericColor5",TALKER_FIS);
- endcase;
- case 5:
- PlayVoiceOverOnce("VO\Solaris\SecondGenericColor6",TALKER_FIS);
- endcase;
- case 6:
- PlayVoiceOverOnce("VO\Solaris\SecondGenericColor7",TALKER_FIS);
- endcase;
- case 7:
- PlayVoiceOverOnce("VO\Solaris\SecondGenericColor8",TALKER_FIS);
- endcase;
- case 8:
- PlayVoiceOverOnce("VO\Solaris\SecondGenericColor9",TALKER_FIS);
- endcase;
- case 9:
- PlayVoiceOverOnce("VO\Solaris\SecondGenericColor10",TALKER_FIS);
- endcase;
- case 10:
- PlayVoiceOverOnce("VO\Solaris\SecondGenericColor11",TALKER_FIS);
- endcase;
- case 11:
- PlayVoiceOverOnce("VO\Solaris\SecondGenericColor12",TALKER_FIS);
- endcase;
- case 12:
- PlayVoiceOverOnce("VO\Solaris\SecondGenericColor13",TALKER_FIS);
- endcase;
- case 13:
- PlayVoiceOverOnce("VO\Solaris\SecondGenericColor14",TALKER_FIS);
- endcase;
- case 14:
- PlayVoiceOverOnce("VO\Solaris\SecondGenericColor15",TALKER_FIS);
- endcase;
- endswitch;
-
- if (GetEventInteger("SolGenericColor")==14) then
- SetEventInteger("SolGenericColor",0);
- else
- SetEventInteger("SolGenericColor",GetEventInteger("SolGenericColor") + 1);
- endif;
- else // In Post-Season
- switch (GetEventInteger("SolPostColor"))
- case 0:
- PlayVoiceOverOnce("VO\Solaris\PostColorCommentary1",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\SecondPostColor1",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\PostColorCommentary2",TALKER_FIS);
- endcase;
- case 3:
- PlayVoiceOverOnce("VO\Solaris\SecondPostColor2",TALKER_FIS);
- endcase;
- case 4:
- PlayVoiceOverOnce("VO\Solaris\PostColorCommentary3",TALKER_FIS);
- endcase;
- case 5:
- PlayVoiceOverOnce("VO\Solaris\SecondPostColor3",TALKER_FIS);
- endcase;
- endswitch;
-
- if (GetEventInteger("SolPostColor")==5) then
- SetEventInteger("SolPostColor",0);
- else
- SetEventInteger("SolPostColor",GetEventInteger("SolPostColor") + 1);
- endif;
- endif;
-
- endfunction;
-
-
- function SolDeath(integer Times); // Generic someone died messages
- var
-
- code
-
- KillVoiceOvers;
- switch (GetEventInteger("SolDeath") + Times)
- case 0:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath1",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong1",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath2",TALKER_FIS);
- endcase;
- case 3:
- PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong2",TALKER_FIS);
- endcase;
- case 4:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath3",TALKER_FIS);
- endcase;
- case 5:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath4",TALKER_FIS);
- endcase;
- case 6:
- PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong3",TALKER_FIS);
- endcase;
- case 7:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath5",TALKER_FIS);
- endcase;
- case 8:
- PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong4",TALKER_FIS);
- endcase;
- case 9:
- PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong5",TALKER_FIS);
- endcase;
- case 10:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath6",TALKER_FIS);
- endcase;
- case 11:
- PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong6",TALKER_FIS);
- endcase;
- case 12:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath7",TALKER_FIS);
- endcase;
- case 13:
- PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong7",TALKER_FIS);
- endcase;
- case 14:
- PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong8",TALKER_FIS);
- endcase;
- case 15:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath8",TALKER_FIS);
- endcase;
- case 16:
- PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong9",TALKER_FIS);
- endcase;
- case 17:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath9",TALKER_FIS);
- endcase;
- case 18:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath10",TALKER_FIS);
- endcase;
- case 19:
- PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong10",TALKER_FIS);
- endcase;
- case 20:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath11",TALKER_FIS);
- endcase;
- case 21:
- PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong11",TALKER_FIS);
- endcase;
- case 22:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath12",TALKER_FIS);
- endcase;
- case 23:
- PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong12",TALKER_FIS);
- endcase;
- case 24:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath13",TALKER_FIS);
- endcase;
- case 25:
- PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong13",TALKER_FIS);
- endcase;
- case 26:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath14",TALKER_FIS);
- endcase;
- case 27:
- PlayVoiceOverOnce("VO\Solaris\DeathCommentsLong14",TALKER_FIS);
- endcase;
- case 28:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath15",TALKER_FIS);
- endcase;
- case 29:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath16",TALKER_FIS);
- endcase;
- case 30:
- PlayVoiceOverOnce("VO\Solaris\GenericDeath17",TALKER_FIS);
- endcase;
- endswitch;
-
- if (GetEventInteger("SolDeath")==30) then
- SetEventInteger("SolDeath",0);
- else
- SetEventInteger("SolDeath",GetEventInteger("SolDeath") + 1 + Times);
- endif;
-
- endfunction;
-
- function SolAlliance(integer Alliance); // This is the random alliances message
- var
-
- code
-
- /*switch (Alliance)
- case 0:
- PlayVoiceOverOnce("VO\Solaris\InvitationToAlliance",TALKER_COC);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\BrokenAlliance",TALKER_COC);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\AllianceOver",TALKER_COC);
- endcase;
- endswitch;*/
- PlayVoiceOver("VO\OneSecond",TALKER_SPE);
-
- switch (GetEventInteger("SolAlliance"))
- case 0:
- switch (Alliance)
- case 0:
- PlayVoiceOverOnce("VO\Solaris\InvitationToAlliance",TALKER_COC);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\BrokenAlliance",TALKER_COC);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\AllianceOver",TALKER_COC);
- endcase;
- endswitch;
- SetEventInteger("SolAlliance",1);
- endcase;
- case 1:
- switch (Alliance)
- case 0:
- PlayVoiceOverOnce("VO\Solaris\InvitationToAlliance",TALKER_TER);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\BrokenAlliance",TALKER_TER);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\AllianceOver",TALKER_TER);
- endcase;
- endswitch;
- SetEventInteger("SolAlliance",2);
- endcase;
- case 2:
- switch (Alliance)
- case 0:
- PlayVoiceOverOnce("VO\Solaris\InvitationToAlliance",TALKER_ACE);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\BrokenAlliance",TALKER_ACE);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\AllianceOver",TALKER_ACE);
- endcase;
- endswitch;
- SetEventInteger("SolAlliance",3);
- endcase;
- case 3:
- switch (Alliance)
- case 0:
- PlayVoiceOverOnce("VO\Solaris\InvitationToAlliance",TALKER_FAN);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\BrokenAlliance",TALKER_FAN);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\AllianceBroken",TALKER_FAN);
- endcase;
- endswitch;
- SetEventInteger("SolAlliance",4);
- endcase;
- case 4:
- switch (Alliance)
- case 0:
- PlayVoiceOverOnce("VO\Solaris\InvitationToAlliance",TALKER_GRU);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\BrokenAlliance",TALKER_GRU);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\AllianceOver",TALKER_GRU);
- endcase;
- endswitch;
- SetEventInteger("SolAlliance",5);
- endcase;
- case 5:
- switch (Alliance)
- case 0:
- PlayVoiceOverOnce("VO\Solaris\InvitationToAlliance",TALKER_PRO);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\BrokenAlliance",TALKER_PRO);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\AllianceOver",TALKER_PRO);
- endcase;
- endswitch;
- SetEventInteger("SolAlliance",6);
- endcase;
- endswitch;
-
- endfunction;
-
- function SolSecondPlace; // This is when you come in second place
- var
-
- code
-
- KillVoiceOvers;
- switch (GetEventInteger("SolSecondPlace"))
- case 0:
- PlayVoiceOverOnce("VO\Solaris\FinishSecond1",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\FinishSecond2",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\FinishSecond3",TALKER_FIS);
- endcase;
- endswitch;
-
- if (GetEventInteger("SolSecondPlace")==2) then
- SetEventInteger("SolSecondPlace",0);
- else
- SetEventInteger("SolSecondPlace",GetEventInteger("SolSecondPlace") + 1);
- endif;
-
- endfunction;
-
- function SolThirdPlace; // This is when you come in third place
- var
-
- code
-
- KillVoiceOvers;
- switch (GetEventInteger("SolThirdPlace"))
- case 0:
- PlayVoiceOverOnce("VO\Solaris\FinishThird1",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\FinishThird2",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\FinishThird3",TALKER_FIS);
- endcase;
- endswitch;
-
- if (GetEventInteger("SolThirdPlace")==2) then
- SetEventInteger("SolThirdPlace",0);
- else
- SetEventInteger("SolThirdPlace",GetEventInteger("SolThirdPlace") + 1);
- endif;
-
- endfunction;
-
- function SolGenericVictory; // Random you've won messages
- var
-
- code
-
- KillVoiceOvers;
-
- if (not GetEventFlag("SolGrand")) then
- switch (GetEventInteger("SolGenericVictory"))
- case 0:
- PlayVoiceOverOnce("VO\Solaris\GenericVictory1",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\GenericVictory2",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\GenericVictory3",TALKER_FIS);
- endcase;
- case 3:
- PlayVoiceOverOnce("VO\Solaris\GenericVictory4",TALKER_FIS);
- endcase;
- case 4:
- PlayVoiceOverOnce("VO\Solaris\GenericVictory5",TALKER_FIS);
- endcase;
- case 5:
- PlayVoiceOverOnce("VO\Solaris\GenericVictory6",TALKER_FIS);
- endcase;
- case 6:
- PlayVoiceOverOnce("VO\Solaris\GenericVictory7",TALKER_FIS);
- endcase;
- case 7:
- PlayVoiceOverOnce("VO\Solaris\GenericVictory8",TALKER_FIS);
- endcase;
- case 8:
- PlayVoiceOverOnce("VO\Solaris\GenericVictory9",TALKER_FIS);
- endcase;
- case 9:
- PlayVoiceOverOnce("VO\Solaris\GenericVictory10",TALKER_FIS);
- endcase;
- endswitch;
-
- if (GetEventInteger("SolGenericVictory")==9) then
- SetEventInteger("SolGenericVictory",0);
- else
- SetEventInteger("SolGenericVictory",GetEventInteger("SolGenericVictory") + 1);
- endif;
-
- else // Post-Season
- switch (GetEventInteger("SolPostVictory"))
- case 0:
- PlayVoiceOverOnce("VO\Solaris\PostVictory1",TALKER_FIS);
- endcase;
- case 1:
- PlayVoiceOverOnce("VO\Solaris\PostVictory2",TALKER_FIS);
- endcase;
- case 2:
- PlayVoiceOverOnce("VO\Solaris\PostVictory3",TALKER_FIS);
- endcase;
- endswitch;
-
- if (GetEventInteger("SolPostVictory")==2) then
- SetEventInteger("SolPostVictory",0);
- else
- SetEventInteger("SolPostVictory",GetEventInteger("SolPostVictory") + 1);
- endif;
- endif;
-
- endfunction;
-
- function SolEnding (integer Arena, integer WeightClass, integer PlayerKiller, integer Placing); // This is called at the end of the mission
- var
-
- code
-
- AddSolarisBonusMoney(200000 * PlayerKiller);
-
- // Ranking system
- if (WeightClass < 5) then
- switch (GetEventInteger("SolRank"))
-
- case 0: // Rookie check
- SetEventInteger("SolRank",1);
- SetSolarisTitle(SolTitleOne);
- endcase;
-
- case 1: // Regular check
- if (GetEventInteger("SolTotalWins") > 2) then
- SetEventInteger("SolRank",2);
- SetSolarisTitle(SolTitleTwo);
- endif;
- endcase;
-
- case 2: // Veteran check
- if (GetEventInteger("SolMediumWins") + GetEventInteger("SolHeavyWins") + GetEventInteger("SolAssaultWins") > 6) then
- if (GetEventInteger("SolHeavyWins") > 0) or (WeightClass > 2) then
- SetEventInteger("SolRank",3);
- SetSolarisTitle(SolTitleThree);
- endif;
- endif;
- endcase;
-
- case 3: // Ace Check
- if (GetEventInteger("SolMediumWins") + GetEventInteger("SolHeavyWins") + GetEventInteger("SolAssaultWins") > 14) then
- if (WeightClass > 2) then
- if (GetEventInteger("SolHeavyWins") > 2) then
- SetEventInteger("SolRank",4);
- SetSolarisTitle(SolTitleFour);
- endif;
- else
- if (GetEventInteger("SolHeavyWins") > 3) then
- SetEventInteger("SolRank",4);
- SetSolarisTitle(SolTitleFour);
- endif;
- endif;
- endif;
- endcase;
-
- case 4: // Elite Check
- if (GetEventInteger("SolTotalWins") > 35) then
- SetEventInteger("SolRank",5);
- SetSolarisTitle(SolTitleFive);
- endif;
- endcase;
-
- endswitch;
- endif;
-
- if (WeightClass == 5) then
- if (GetEventInteger("SolRank") <> 10) then
- if (Placing == 1) then // First Place
- if (GetEventInteger("SolRank") < 6) then
- if (Arena == 1) then // Jungle
- SetEventInteger("SolRank",6);
- SetSolarisTitle(SolTitleSix);
- endif;
- if (Arena == 2) then // Factory
- SetEventInteger("SolRank",7);
- SetSolarisTitle(SolTitleSeven);
- endif;
- if (Arena == 3) then // Coliseum
- SetEventInteger("SolRank",8);
- SetSolarisTitle(SolTitleEight);
- endif;
- else
- SetEventInteger("SolRank",9);
- SetSolarisTitle(SolTitleNine);
- endif;
- endif;
- endif;
- endif;
-
- if (WeightClass == 6) then
- if (Placing == 1) then
- SetEventInteger("SolRank",10);
- SetSolarisTitle(SolTitleTen);
- endif;
- endif;
-
- switch (WeightClass)
- case 1: // Light
- SetEventInteger("SolLightWins",GetEventInteger("SolLightWins") + 1);
- endcase;
- case 2: // Medium
- SetEventInteger("SolMediumWins",GetEventInteger("SolMediumWins") + 1);
- endcase;
- case 3: // Heavy
- SetEventInteger("SolHeavyWins",GetEventInteger("SolHeavyWins") + 1);
- endcase;
- case 4: // Assault
- SetEventInteger("SolAssaultWins",GetEventInteger("SolAssaultWins") + 1);
- endcase;
- case 5: // Champ
- SetEventInteger("SolChampWins",GetEventInteger("SolChampWins") + 1);
- endcase;
- endswitch;
-
- SetEventInteger("SolTotalWins",GetEventInteger("SolTotalWins") + 1);
- //
-
- endfunction;
-
-
- function AddStandardBuckets;
- var
-
- code
- TrackBucket(Bucket_KILLS,0,true);
- TrackBucket(Bucket_DEATHS,0,true);
-
- TrackBucket(Bucket_CUSTOM,0,true);
- endfunction;
-
-
- function AddTeamGameBuckets;
- var
-
- code
- TrackBucket(Bucket_TEAM_WINS,0,true);
- endfunction;
-
- function SetupScoring_Attrition;
- var
-
- code
- SetFlagsEnabled(FLAGS_HIDE);
- SetCustomBucketNameIndex(904); // note, this uses "mission play" because attrition is no longer in Mercs
- AddStandardBuckets;
- AddCustomBucketParameter(Bucket_ENEMY_DAMAGE_INFLICT,1);
- AddCustomBucketParameter(Bucket_FRIENDLY_DAMAGE_INFLICT,-1);
- AddCustomBucketParameter(Bucket_ENEMY_KILLS,500);
- AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-500);
- AddCustomBucketParameter(Bucket_SUICIDES,-500);
- AddCustomBucketParameter(Bucket_ENEMY_KILLS_BY_TONNAGE,5);
- AddCustomBucketParameter(Bucket_ENEMY_COMPONENT_KILLS,50);
- AddCustomBucketParameter(Bucket_FRIENDLY_COMPONENT_KILLS,-50);
- endfunction;
-
- function SetupScoring_TeamAttrition;
- var
-
- code
- SetFlagsEnabled(FLAGS_HIDE);
- SetCustomBucketNameIndex(904); // note, this uses "mission play" because attrition is no longer in Mercs
- AddStandardBuckets;
- AddTeamGameBuckets;
- AddCustomBucketParameter(Bucket_ENEMY_DAMAGE_INFLICT,1);
- AddCustomBucketParameter(Bucket_FRIENDLY_DAMAGE_INFLICT,-1);
- AddCustomBucketParameter(Bucket_ENEMY_KILLS,500);
- AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-500);
- AddCustomBucketParameter(Bucket_SUICIDES,-500);
- AddCustomBucketParameter(Bucket_ENEMY_KILLS_BY_TONNAGE,5);
- AddCustomBucketParameter(Bucket_ENEMY_COMPONENT_KILLS,50);
- AddCustomBucketParameter(Bucket_FRIENDLY_COMPONENT_KILLS,-50);
- endfunction;
-
- function SetupScoring_Destruction;
- var
-
- code
- SetFlagsEnabled(FLAGS_HIDE);
- SetCustomBucketNameIndex(902);
- AddStandardBuckets;
- AddCustomBucketParameter(Bucket_KILLS,1);
- AddCustomBucketParameter(Bucket_SUICIDES,-1);
- endfunction;
-
- function SetupScoring_TeamDestruction;
- var
-
- code
- SetFlagsEnabled(FLAGS_HIDE);
- SetCustomBucketNameIndex(903);
- AddStandardBuckets;
- AddTeamGameBuckets;
- AddCustomBucketParameter(Bucket_ENEMY_KILLS,1);
- AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-1);
- AddCustomBucketParameter(Bucket_SUICIDES,-1);
- AddCustomBucketParameter(Bucket_FRIENDLY_DEATHS,0);
- endfunction;
-
- function SetupScoring_STB;
- var
-
- code
- SetFlagsEnabled(FLAGS_UNIVERSAL_ONLY);
- SetFlagCaptureEnabled(false);
- ShowFlagsAsNavPoints(TRUE);
- SetCustomBucketNameIndex(904); // note, this uses "mission play" because steal the beacon is no longer in Mercs
- AddStandardBuckets;
- AddCustomBucketParameter(Bucket_FLAG_HOLD_TIME,1);
- endfunction;
-
- function SetupScoring_KOTH(ObjectID hill, integer radius);
- var
-
- code
- SetFlagsEnabled(FLAGS_HIDE);
- if (hill <> -1) then
- TrackObjectBucket(Bucket_OBJECTIVE_CONTESTED,hill,radius,false);
- TrackObjectBucket(Bucket_OBJECTIVE_UNCONTESTED,hill,radius,false);
- endif;
- SetCustomBucketNameIndex(904); // note, this uses "mission play" because king of the hill is no longer in Mercs
- AddStandardBuckets;
- AddCustomBucketParameter(Bucket_OBJECTIVE_CONTESTED,1);
- AddCustomBucketParameter(Bucket_OBJECTIVE_UNCONTESTED,5);
- endfunction;
-
- function SetupScoring_TKOTH(ObjectID hill, integer radius);
- var
-
- code
- SetFlagsEnabled(FLAGS_HIDE);
- if (hill <> -1) then
- TrackObjectBucket(Bucket_OBJECTIVE_CONTESTED,hill,radius,false);
- TrackObjectBucket(Bucket_OBJECTIVE_UNCONTESTED,hill,radius,false);
- endif;
- SetCustomBucketNameIndex(904); // note, this uses "mission play" because king of the hill is no longer in Mercs
- AddStandardBuckets;
- AddTeamGameBuckets;
- AddCustomBucketParameter(Bucket_OBJECTIVE_CONTESTED,1);
- AddCustomBucketParameter(Bucket_OBJECTIVE_UNCONTESTED,5);
- endfunction;
-
- function SetupScoring_CTF;
- var
-
- code
- SetFlagsEnabled(FLAGS_TEAM_ONLY);
- ShowFlagsAsNavPoints(TRUE);
- SetCustomBucketNameIndex(904); // note, this uses "mission play" because capture the flag is no longer in Mercs
- AddStandardBuckets;
- AddCustomBucketParameter(Bucket_FLAGS_CAPTURED,1000);
- AddCustomBucketParameter(Bucket_ENEMY_KILLS,25);
- AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-50);
- endfunction;
-
- function SetupScoring_Territories(ObjectID hill, integer radius);
- var
-
- code
- SetFlagsEnabled(FLAGS_HIDE);
- if (hill <> -1) then
- TrackObjectBucket(Bucket_OBJECTIVE_UNCONTESTED,hill,radius,false);
- endif;
- SetCustomBucketNameIndex(904); // note, this uses "mission play" because territories is no longer in Mercs
- AddStandardBuckets;
- AddCustomBucketParameter(Bucket_OBJECTIVE_UNCONTESTED,1);
- endfunction;
-
- function SetupScoring_CaptureBase;
- var
-
- code
- SetFlagsEnabled(FLAGS_HIDE);
- SetCustomBucketNameIndex(904); // note, this uses "mission play" because capture base is no longer in Mercs
- AddStandardBuckets;
- AddCustomBucketParameter(Bucket_ENEMY_KILLS,25);
- AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-50);
- endfunction;
-
- function SetupScoring_DestroyObjective;
- var
-
- code
- SetFlagsEnabled(FLAGS_HIDE);
- SetCustomBucketNameIndex(904); // note, this uses "mission play" because destroy objective is no longer in Mercs
- AddStandardBuckets;
- // TODO: add scoring for objective destruction
- AddCustomBucketParameter(Bucket_ENEMY_KILLS,25);
- AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-50);
- endfunction;
-
- function SetupScoring_Escort;
- var
-
- code
- SetFlagsEnabled(FLAGS_HIDE);
- SetCustomBucketNameIndex(904); // note, this uses "mission play" because escort is no longer in Mercs
- AddStandardBuckets;
- AddCustomBucketParameter(Bucket_ENEMY_KILLS,500);
- AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-500);
- endfunction;
-
- //expansion scoring
-
- function SetupScoring_AbsoluteAttrition;
- var
-
- code
- SetFlagsEnabled(FLAGS_HIDE);
- SetCustomBucketNameIndex(904); // note, this uses "mission play" because absolute attrition is no longer in Mercs
- AddStandardBuckets;
-
- AddCustomBucketParameter(Bucket_ENEMY_KILLS_BY_RATIO, 4); //multiplies by the tonnage ratio 100 is even tonnage
- AddCustomBucketParameter(Bucket_ENEMY_DAMAGE_INFLICT_BY_RATIO,2); //
- AddCustomBucketParameter(Bucket_ENEMY_COMPONENT_KILLS,50);
-
- AddCustomBucketParameter(Bucket_FRIENDLY_DAMAGE_INFLICT,-1);
- AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-500);
- AddCustomBucketParameter(Bucket_SUICIDES,-500);
- AddCustomBucketParameter(Bucket_FRIENDLY_COMPONENT_KILLS,-50);
- endfunction;
-
- function SetupScoring_TeamAbsoluteAttrition;
- var
-
- code
- SetFlagsEnabled(FLAGS_HIDE);
- SetCustomBucketNameIndex(904); // note, this uses "mission play" because absolute attrition is no longer in Mercs
- AddStandardBuckets;
- AddTeamGameBuckets;
-
- AddCustomBucketParameter(Bucket_ENEMY_KILLS_BY_RATIO, 4); //multiplies by the tonnage ratio 100 is even tonnage
- AddCustomBucketParameter(Bucket_ENEMY_DAMAGE_INFLICT_BY_RATIO,2); //
- AddCustomBucketParameter(Bucket_ENEMY_COMPONENT_KILLS,50);
-
- AddCustomBucketParameter(Bucket_FRIENDLY_DAMAGE_INFLICT,-1);
- AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-500);
- AddCustomBucketParameter(Bucket_SUICIDES,-500);
- AddCustomBucketParameter(Bucket_FRIENDLY_COMPONENT_KILLS,-50);
- endfunction;
-
- function SetupScoring_Strongholds;
- var
-
- code
- SetFlagsEnabled(FLAGS_HIDE);
- SetCustomBucketNameIndex(904); // note, this uses "mission play" because strongholds is no longer in Mercs
- AddCustomBucketParameter(Bucket_ENEMY_KILLS,25);
- AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-25);
- AddCustomBucketParameter(Bucket_SUICIDES,-50);
- AddCustomBucketParameter(Bucket_ENEMY_TURRET_KILLS, 10);
- AddCustomBucketParameter(Bucket_FRIENDLY_TURRET_KILLS, -10);
- AddCustomBucketParameter(Bucket_ENEMY_BUILDING_KILLS, 150);
- AddCustomBucketParameter(Bucket_FRIENDLY_BUILDING_KILLS, - 150);
- AddStandardBuckets;
- AddTeamGameBuckets;
- endfunction;
-
-
- function SetupScoring_SiegeAssault;
- var
-
- code
- SetFlagsEnabled (FLAGS_HIDE);
- SetCustomBucketNameIndex (904); // note, this uses "mission play" because siege is no longer in Mercs
- AddCustomBucketParameter(Bucket_ENEMY_KILLS,25);
- AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-25);
- AddCustomBucketParameter(Bucket_SUICIDES,-50);
- AddCustomBucketParameter(Bucket_ENEMY_TURRET_KILLS, 10);
- AddCustomBucketParameter(Bucket_FRIENDLY_TURRET_KILLS, -10);
- AddCustomBucketParameter(Bucket_ENEMY_BUILDING_KILLS, 150);
- AddCustomBucketParameter(Bucket_FRIENDLY_BUILDING_KILLS, - 150);
- AddStandardBuckets;
- AddTeamGameBuckets;
- endfunction;
-
-
-
- function SetupScoring_GiantKillers;
- var
-
- code
- SetFlagsEnabled (FLAGS_HIDE);
- SetCustomBucketNameIndex (904); // note, this uses "mission play" because giant killers is no longer in Mercs
- AddStandardBuckets;
- AddTeamGameBuckets;
- AddCustomBucketParameter(Bucket_ENEMY_DAMAGE_INFLICT,1);
- AddCustomBucketParameter(Bucket_ENEMY_KILLS,75);
- AddCustomBucketParameter(Bucket_SUICIDES,-125);
- endfunction;
-
- function SetupScoring_ClanVsInnerSphere;
- var
-
- code
- SetFlagsEnabled (FLAGS_HIDE);
- SetCustomBucketNameIndex (904); // note, this uses "mission play" because clan versus inner sphere is no longer in Mercs
- AddStandardBuckets;
- AddTeamGameBuckets;
-
- AddCustomBucketParameter(Bucket_ENEMY_KILLS_BY_RATIO, 4); //multiplies by the tonnage ratio 100 is even tonnage
- AddCustomBucketParameter(Bucket_ENEMY_DAMAGE_INFLICT_BY_RATIO,2); //
- AddCustomBucketParameter(Bucket_ENEMY_COMPONENT_KILLS,50);
-
- AddCustomBucketParameter(Bucket_FRIENDLY_DAMAGE_INFLICT,-1);
- AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-200);
- AddCustomBucketParameter(Bucket_SUICIDES,-500);
- AddCustomBucketParameter(Bucket_FRIENDLY_COMPONENT_KILLS,-50);
- endfunction;
-
- function SetupScoring_Battle;
- var
-
- code
- SetFlagsEnabled(FLAGS_HIDE);
- SetCustomBucketNameIndex(900);
- AddStandardBuckets;
-
- AddCustomBucketParameter(Bucket_ENEMY_KILLS_BATTLE_RATIO, 1); //multiplies the 'Mech-specific kill value
- AddCustomBucketParameter(Bucket_ENEMY_DAMAGE_BATTLE_RATIO,1); //multiplies the 'Mech-specific battle ratio
- AddCustomBucketParameter(Bucket_ENEMY_COMPONENT_KILLS,25);
-
- AddCustomBucketParameter(Bucket_FRIENDLY_DAMAGE_INFLICT,-1);
- AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-200);
- AddCustomBucketParameter(Bucket_SUICIDES,-500);
- AddCustomBucketParameter(Bucket_FRIENDLY_COMPONENT_KILLS,-5);
- endfunction;
-
- function SetupScoring_TeamBattle;
- var
-
- code
- SetFlagsEnabled(FLAGS_HIDE);
- SetCustomBucketNameIndex(901);
- AddStandardBuckets;
- AddTeamGameBuckets;
-
- AddCustomBucketParameter(Bucket_ENEMY_KILLS_BATTLE_RATIO, 1); //multiplies the 'Mech-specific kill value
- AddCustomBucketParameter(Bucket_ENEMY_DAMAGE_BATTLE_RATIO,1); //multiplies the 'Mech-specific battle ratio
- AddCustomBucketParameter(Bucket_ENEMY_COMPONENT_KILLS,25);
-
- AddCustomBucketParameter(Bucket_FRIENDLY_DAMAGE_INFLICT,-1);
- AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,-150);
- AddCustomBucketParameter(Bucket_SUICIDES,-500);
- AddCustomBucketParameter(Bucket_FRIENDLY_COMPONENT_KILLS,-5);
- AddCustomBucketParameter(Bucket_FRIENDLY_DEATHS,0);
- endfunction;
-
- // for now, this is like destruction
- function SetupScoring_GenericMissionPlay;
- var
-
- code
- SetFlagsEnabled(FLAGS_HIDE);
- SetCustomBucketNameIndex(904);
- AddStandardBuckets;
- AddTeamGameBuckets;
-
- AddCustomBucketParameter(Bucket_ENEMY_KILLS,21);
- AddCustomBucketParameter(Bucket_ENEMY_BUILDING_KILLS,40);
- AddCustomBucketParameter(Bucket_ENEMY_TURRET_KILLS,6);
- AddCustomBucketParameter(Bucket_FRIENDLY_BUILDING_KILLS,0);
- AddCustomBucketParameter(Bucket_FRIENDLY_KILLS,0);
- AddCustomBucketParameter(Bucket_SUICIDES,-20);
- AddCustomBucketParameter(Bucket_FRIENDLY_DEATHS,0);
- endfunction;
-
-
- code
-
- print("mwfunc");
-
- endlibrary.
-