Thread Rating:
  • 5 Vote(s) - 4.2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release Cyborg's AI Survival Beta v0.22
#21
There is quite some stuff that you'll have to do to add new rounds.

1. Make sure the game doesn't end after round 5
In maps/mp/gametypes/globallogic_actor.gsc in Callback_ActorKilled.
Change this:
Code:
if (level.dogskilled == 40)
            {
                thread maps\mp\gametypes\_globallogic::endGame( "allies", "Your team survived the invasion and achieved a score of^3 " +level.scoretotal);
            }
To this:
Code:
if (level.dogskilled == 40)
    {
        level.gamestarted = 0;
        thread maps\mp\gametypes\_rank::roundmessage( "Round " +level.round+ " survived", "NONE" );
        level.round ++;
        thread maps\mp\gametypes\_rank::respawnhumans();
        thread maps\mp\gametypes\_rank::newroundstarttimer();
    }

2. Set how much bots have to be killed
In maps\mp\gametypes\_rank.gsc in newroundstarttimer()
In
Code:
if (!level.gameEnded)
    {
        level.gamestarted = 1;
        if (level.round == 2) level.killsneeded_round = 35;
        else if (level.round == 3) level.killsneeded_round = 40;
        else if (level.round == 4) level.killsneeded_round = 45;
        if (level.round != 5) maps\mp\gametypes\_rank::allowbotrespawn();
        else if (level.round == 5) self maps\mp\gametypes\_rank::dogroundstart();
    }
Add another
Code:
else if (level.round == x) level.killsneeded_round = x;
after
Code:
else if (level.round == 4) level.killsneeded_round = 45;
So for 60 bots in round 6
Code:
else if (level.round == 6) level.killsneeded_round = 60;

3. Add the round info
In maps\mp\gametypes\_rank.gsc in allowbotrespawn()
In
Code:
if (level.round == 2)
    {
        maps\mp\gametypes\_rank::roundmessage("Round 2", "35 bots with makarovs");
    }
    else if (level.round == 3)
    {  
        maps\mp\gametypes\_rank::roundmessage("Round 3", "40 bots with full-auto c-zechs");
    }
    else if (level.round == 4)
    {
        maps\mp\gametypes\_rank::roundmessage("Round 4", "45 bots with enfields");
    }
Add another one
So for round 6
Code:
else if (level.round == 6)
    {
        maps\mp\gametypes\_rank::roundmessage("Round 6", "60 bots with I don't know what not");
    }

4. Set the loadout of the bots

In maps\mp\gametypes\_rank.gsc in onPlayerSpawned()
In
Code:
if(is_bot(self) && self.team == "axis")
        {
            self takeAllWeapons();
            self clearPerks();
            wait 0.5;

            if (level.round == 1)
            {
                self giveWeapon("knife_ballistic_mp");
                self setWeaponAmmoClip("knife_ballistic_mp", 0);
                self setWeaponAmmoStock("knife_ballistic_mp", 0);
                self switchToWeapon("knife_ballistic_mp");
            }
            else if (level.round == 2)
            {
                self giveWeapon("makarov_mp");
                self setWeaponAmmoStock("makarov_mp", 300);
                self switchToWeapon("makarov_mp");
                self thread refillammo();
            }
            else if (level.round == 3)
            {
                self giveWeapon("cz75_auto_mp");
                self setWeaponAmmoStock("cz75_auto_mp", 300);
                self switchToWeapon("cz75_auto_mp");
                self thread refillammo();
            }
            else if (level.round == 4)
            {
                self giveWeapon("enfield_mp");
                self setWeaponAmmoStock("enfield_mp", 300);
                self switchToWeapon("enfield_mp");
                self thread refillammo();
            }
Add another one
So for round 6 where bots have scorpions
Code:
else if (level.round == 6)
            {
                self giveWeapon("skorpion_mp");
                self setWeaponAmmoStock("skorpion_mp", 300);
                self switchToWeapon("skorpion_mp");
                self thread refillammo();
            }

5. Make sure the game stops after round x

In maps/mp/gametypes/globallogic_player.gsc in Callback_PlayerKilled
Change this
Code:
if (level.killsneeded_round == level.axiskilled_round)
        {
            
            level.gamestarted = 0;
            level.activeSatellites["allies"]--;
            assert( level.activeSatellites["allies"] >= 0 );
            if ( level.activeSatellites["allies"] < 0 )
                level.activeSatellites["allies"] = 0;
            maps\mp\_killstreakrules::killstreakStop( "radardirection_mp", "allies");
            level notify ( "uav_update" );
            
            thread maps\mp\gametypes\_rank::roundmessage( "Round " +level.round+ " survived", "NONE" );
            level.round ++;
            level.axisspawned = 0;
            level.axiskilled_round = 0;
            thread maps\mp\gametypes\_rank::respawnhumans();
            thread maps\mp\gametypes\_rank::newroundstarttimer();
            
        }
To this
Code:
if (level.killsneeded_round == level.axiskilled_round)
        {
            
            level.gamestarted = 0;
            level.activeSatellites["allies"]--;
            assert( level.activeSatellites["allies"] >= 0 );
            if ( level.activeSatellites["allies"] < 0 )
                level.activeSatellites["allies"] = 0;
            maps\mp\_killstreakrules::killstreakStop( "radardirection_mp", "allies");
            level notify ( "uav_update" );
            
            if(level.round == x)
            {
                thread maps\mp\gametypes\_globallogic::endGame( "allies", "Your team survived the invasion and achieved a score of^3 " +level.scoretotal);
            }
            else
            {
                thread maps\mp\gametypes\_rank::roundmessage( "Round " +level.round+ " survived", "NONE" );
                level.round ++;
                level.axisspawned = 0;
                level.axiskilled_round = 0;
                thread maps\mp\gametypes\_rank::respawnhumans();
                thread maps\mp\gametypes\_rank::newroundstarttimer();
            }
        }
Where x is the last round that is played.

Happy tweaking!
If you have found a nice round setup, please let me know and I'll consider putting it in the mod! Smile

(07-14-2011, 18:50)Elite_Nudel Wrote: And it works on Dedi Servers. I played it on a Server the first time.
That's great news! Big Grin
Thanks for letting me know.

Reply

#22
Since Elite_Nudel requested me to show how to add new killstreaks to the menu. I thought It'll be nice to place that here as well(if I go on like this this topic will be moved to the tutorials section Big Grin).

For now it's still quite easy to add a new killstreak to the shop. Once I'll start using a quickmessage menu, I think it'll be harder.

1. Add a new line of text to the shop menu.
In maps\mp\gametypes\_rank.gsc in openMenu()
In
Code:
while( self.menuOpen == 0 )
        {
                self waittill( "Left" );
                self runMenu("Killstreak shop", "Buy UAV: 1000 Credits|Buy Mortar Team: 2000 Credits|Buy Death Machine: 6000 Credits");
        }
Add another one in runMenu
So if you want a grim reaper for 4500 credits this script will look like this
Code:
while( self.menuOpen == 0 )
        {
                self waittill( "Left" );
                self runMenu("Killstreak shop", "Buy UAV: 1000 Credits|Buy Mortar Team: 2000 Credits|Buy Death Machine: 6000 Credits|Buy Grim Repaer: 4500 Credits");
        }
Make sure you don't forget the |

2. Creating the function for the menu.
In maps\mp\gametypes\_rank.gsc in runFunc
In
Code:
case "Buy UAV: 1000 Credits":
                if(self.money >= 1000)
                {
                    self.money -= 1000;
                    self.hud_score settext(self.money +" credits");
                    self maps\mp\gametypes\_hardpoints::giveKillstreak("radar_mp", "radar_mp", true, true);  
                    self setClientUIVisibilityFlag( "hud_visible", 1);
                    self enableweapons();
                    self.menuOpen = 0;
                    self.hud_menuhelp settext("^3USE+KNIFE ^7open shop");
                    self thread ScoreHUD( -1000, "negative" );
                    self notify( "exit_menu" );
                    self iPrintln("UAV purchased");
                }
                else
                {
                    self iPrintln("Insufficient credits");
                }
                
                break;
        case "Buy Mortar Team: 2000 Credits":
                if(self.money >= 2000)
                {
                    self.money -= 2000;
                    self.hud_score settext(self.money +" credits");
                    self thread maps\mp\gametypes\_hardpoints::giveKillstreak("mortar_mp", "mortar_mp", true, true);  
                    self setClientUIVisibilityFlag( "hud_visible", 1);
                    self enableweapons();
                    self.menuOpen = 0;
                    self.hud_menuhelp settext("^3USE+KNIFE ^7open shop");
                    self thread ScoreHUD( -2000, "negative" );
                    self notify( "exit_menu" );
                    self iPrintln("Mortar Team purchased");
                }
                else
                {
                    self iPrintln("Insufficient credits");
                }
                
                break;
        case "Buy Death Machine: 6000 Credits":
                if(self.money >= 6000)
                {
                    self.money -= 6000;
                    self.hud_score settext(self.money +" credits");
                    self thread maps\mp\gametypes\_hardpoints::giveKillstreak("minigun_mp", "minigun_mp", true, true);  
                    self setClientUIVisibilityFlag( "hud_visible", 1);
                    self enableweapons();
                    self.menuOpen = 0;
                    self.hud_menuhelp settext("^3USE+KNIFE ^7open shop");
                    self thread ScoreHUD( -6000, "negative" );
                    self notify( "exit_menu" );
                    self iPrintln("Death Machine purchased");
                }
                else
                {
                    self iPrintln("Insufficient credits");
                }
                
                break;
Add another one.
So for our grim reaper
Code:
case "Buy UAV: 1000 Credits":
                if(self.money >= 1000)
                {
                    self.money -= 1000;
                    self.hud_score settext(self.money +" credits");
                    self maps\mp\gametypes\_hardpoints::giveKillstreak("radar_mp", "radar_mp", true, true);  
                    self setClientUIVisibilityFlag( "hud_visible", 1);
                    self enableweapons();
                    self.menuOpen = 0;
                    self.hud_menuhelp settext("^3USE+KNIFE ^7open shop");
                    self thread ScoreHUD( -1000, "negative" );
                    self notify( "exit_menu" );
                    self iPrintln("UAV purchased");
                }
                else
                {
                    self iPrintln("Insufficient credits");
                }
                
                break;
        case "Buy Mortar Team: 2000 Credits":
                if(self.money >= 2000)
                {
                    self.money -= 2000;
                    self.hud_score settext(self.money +" credits");
                    self thread maps\mp\gametypes\_hardpoints::giveKillstreak("mortar_mp", "mortar_mp", true, true);  
                    self setClientUIVisibilityFlag( "hud_visible", 1);
                    self enableweapons();
                    self.menuOpen = 0;
                    self.hud_menuhelp settext("^3USE+KNIFE ^7open shop");
                    self thread ScoreHUD( -2000, "negative" );
                    self notify( "exit_menu" );
                    self iPrintln("Mortar Team purchased");
                }
                else
                {
                    self iPrintln("Insufficient credits");
                }
                
                break;
        case "Buy Death Machine: 6000 Credits":
                if(self.money >= 6000)
                {
                    self.money -= 6000;
                    self.hud_score settext(self.money +" credits");
                    self thread maps\mp\gametypes\_hardpoints::giveKillstreak("minigun_mp", "minigun_mp", true, true);  
                    self setClientUIVisibilityFlag( "hud_visible", 1);
                    self enableweapons();
                    self.menuOpen = 0;
                    self.hud_menuhelp settext("^3USE+KNIFE ^7open shop");
                    self thread ScoreHUD( -6000, "negative" );
                    self notify( "exit_menu" );
                    self iPrintln("Death Machine purchased");
                }
                else
                {
                    self iPrintln("Insufficient credits");
                }
                
                break;
        case "Buy Grim Reaper: 4500 Credits":
                if(self.money >= 4500)
                {
                    self.money -= 4500;
                    self.hud_score settext(self.money +" credits");
                    self thread maps\mp\gametypes\_hardpoints::giveKillstreak("m202_flash_mp", "m202_flash_mp", true, true);  
                    self setClientUIVisibilityFlag( "hud_visible", 1);
                    self enableweapons();
                    self.menuOpen = 0;
                    self.hud_menuhelp settext("^3USE+KNIFE ^7open shop");
                    self thread ScoreHUD( -4500, "negative" );
                    self notify( "exit_menu" );
                    self iPrintln("Grim Reaper purchased");
                }
                else
                {
                    self iPrintln("Insufficient credits");
                }
                
                break;
Make sure the thing in Case is the same as the menu text line.
Reply

#23
v.0.2 approved
Reply

#24
(07-16-2011, 18:43)d0h! Wrote: v.0.2 approved
And with that, version 0.2 has been released! Big Grin
Check the version updates section in the first post for the update info. I have mainly focused on polishing the game a bit and add some more settings. In the next version I'll mainly focus on making this a seperate gametype. The versions after that will give more content.

Reply

#25
(07-16-2011, 19:24)Cyborgking Wrote:
(07-16-2011, 18:43)d0h! Wrote: v.0.2 approved
And with that, version 0.2 has been released! Big Grin
Check the version updates section in the first post for the update info. I have mainly focused on polishing the game a bit and add some more settings. In the next version I'll mainly focus on making this a seperate gametype. The versions after that will give more content.

Cool Smile But nooo Sad Yet i must make my changes in this new Version! :/ Even i had added Dragon's Breath! Ok i start work ^^
Reply

#26
Wait USE+Knife wtf Is Use?
Reply

#27
(07-21-2011, 03:01)DerpPolice Wrote: Wait USE+Knife wtf Is Use?
Use is the same key that you use for pickup up a gun, planting/disarming a bomb, etc.
However in version 2, you don't see that anymore, you just see what keys you have to press.
Reply

#28
Hi,
I have an problem I edit this mod but I have 1 fail but I cant see any fail.
The Fail is in this passage.
mp_AI-Survival\maps\mp\gametypes\_globallogic_player

PHP Code:
updateGlobalBotKilledCounter()
{
    
self endon("disconnect");
    
wait.05 );
    
maps\mp\gametypes\_globallogic_utils::WaitTillSlowProcessAllowed();
    
    if ( 
isDefinedself.pers["isBot"] ) )
    {
        
level.globalLarrysKilled++;
    }




It would be nice wehn every yone can help me.
Reply

#29
(07-22-2011, 01:03)Elite_otten Wrote: Hi,
I have an problem I edit this mod but I have 1 fail but I cant see any fail.
The Fail is in this passage.
mp_AI-Survival\maps\mp\gametypes\_globallogic_player

PHP Code:
updateGlobalBotKilledCounter()
{
    
self endon("disconnect");
    
wait.05 );
    
maps\mp\gametypes\_globallogic_utils::WaitTillSlowProcessAllowed();
    
    if ( 
isDefinedself.pers["isBot"] ) )
    {
        
level.globalLarrysKilled++;
    }




It would be nice wehn every yone can help me.
With fail you mean an error I guess?
What kind of errror do you get?

Reply

#30
Yea, I mean an error

In black ops come the error bad syntax script error
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] FXAA Injector Battlefield 3+Best Settings [Update danoc1 v1.3 Beta] iPaddie 31 64,626 08-30-2013, 00:51
Last Post: Squideh
  [Release] Semi hardcore 1.1 beta (Killcam on and ff off) atenziono 61 37,923 08-09-2013, 18:13
Last Post: OzonE
  [Release] Tactical Training Mod Beta 2 Hixos 30 28,120 05-31-2013, 17:20
Last Post: kool123
  [Release] Black Ops 2 Camos in MW2 V3.0 -(Cyborg, Dragon, Comic, Paladin, and Ghosts)- DidUknowiPwn 10 13,103 05-25-2013, 07:00
Last Post: DidUknowiPwn
  [Tutorial] How to get a CS:GO beta key Romuald27 17 10,742 04-05-2013, 18:12
Last Post: SuperNovaAO
  [Release] HideAndSeek Mod v1.0 BETA Tomsen1410 18 18,470 03-21-2013, 08:13
Last Post: Ryanrc
  [Release] Zombie Epidemic Mod Beta Lemon 92 67,425 03-07-2013, 12:30
Last Post: Lemon
  [Release] Black Tomato M 0.4.2 BETA // Ingame Admin Menu d0h! 5 12,359 01-01-2013, 22:23
Last Post: joey
Rainbow [Release] xZombie Mod (Beta) Nekochan 206 95,287 01-01-2013, 08:33
Last Post: SMIRNOFF2096
  [News] Guild Wars 2 Beta Lemon 10 7,374 12-11-2012, 16:48
Last Post: narkos

Forum Jump:


Users browsing this thread:
9 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.