(08-23-2011, 13:58)p2tk Wrote: Hey can any tell me how i can remove the dog round, because the need to long for respawning and its very boring, to play vs the dogs
I can give a try.
In the next version I'll mix dogs with bots in one round btw, with the focus on the bots and not the dogs.
1. Making sure you don't go to the dogs round and set how many bots have to be killed
In maps/mp/gametypes/_rank in newroundstarttimer()
Change this:
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();
}
To this:
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;
else if (level.round == 4) level.killsneeded_round = x;
maps\mp\gametypes\_rank::allowbotrespawn();
}
Where x is how many bots have to be killed
2. Add round info for round 5
In maps\mp\gametypes\_rank.gsc in allowbotrespawn()
Change this:
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");
}
To this:
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");
}
else if (level.round == 5)
{
maps\mp\gametypes\_rank::roundmessage("Round 5", "x bots with I don't know what not");
}
3. Set the loadout for round 5
In maps\mp\gametypes\_rank.gsc in onPlayerSpawned()
Change this:
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();
}]
To this:
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();
}
else if (level.round == 5)
{
self giveWeapon(someweaponhere);
self setWeaponAmmoStock(someweaponhere, 300);
self switchToWeapon(someweaponhere);
self thread refillammo();
}
4. Making sure the game ends
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 == 5)
{
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();
}
}
Hope that helps!
Btw: I am going to stop these tutorials for now because I want to focus on the next version (v0.3). Most of these tutorials will have to be remade anyway when v0.3 is released.