Hello everyone,
Many thanks to Cyborgking for the help that you've been giving generously here in this thread, and, of course, the same goes to others' contributions. I hope we will have your permission to modify the mod to suite our interests.
After having to set the number of bots spawning in the maps to 100, we feel that it would be interesting to give our bots the ability of using killstreaks. So, we deployed the 'RandomInt switch/Thread' of Rotceh_dnih from the Tutorial section to give our bots the random killstreaks as so:
_rank.gsc
Code:
if(self.team == "axis")
{
self takeAllWeapons();
self clearPerks();
wait 0.5;
self setPerk("specialty_grenadepulldeath");
self setPerk("perk_second_chance_pro");
self setPerk("specialty_pistoldeath");
self setPerk("specialty_Lightweight");
self setPerk("specialty_finalstand");
self setPerk("specialty_scavenger");
self setPerk("specialty_quieter");
self thread randomstuff();
.....
Code:
randomstuff()
{
switch(RandomInt(5))
{
case 0:
self.randomKillstreak = "supplydrop_mp";
break;
case 1:
self.randomKillstreak = "turret_drop_mp";
break;
case 2:
self.randomKillstreak = "m220_tow_drop_mp";
break;
case 3:
self.randomKillstreak = "radardirection_mp";
break;
case 4:
self.randomKillstreak = "tow_turret_drop_mp";
break;
}
self maps\mp\gametypes\_hardpoints::giveKillstreak(self.randomKillstreak );
}
However, this randomInt Switch works fine, but, what the bots ever get are just the "m220_tow_drop" with "radardirection_mp" and nothing else. It's rather odd to us as the 'function call' is random.
So, any idea of why it doesn't work in random as it should!?
Also, we gave human players a few killstreaks as so:
_rank.gsc
Code:
onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player");
self thread doKillstreaks();
....
Code:
doKillstreaks()
{
self endon("disconnect");
{
self.killstreak[0] = "killstreak_mortar_mp";
self.killstreak[1] = "killstreak_supply_drop";
self.killstreak[2] = "dogs_mp";
self.killstreak[3] = "turret_drop_mp";
}
}
Once again, this works perfectly apart from the fact that when bots captured our "turret_drop_mp" they don't seem to know how to use it and the same to their own turret drops. So, is there an additional coding needed to make bots to know how to deploy the turrets?
Any help would be very much appreciated.
Many thanks