mirror of
https://github.com/ineedbots/t4_bot_warfare.git
synced 2025-04-21 23:45:43 +00:00
start twar
This commit is contained in:
parent
c675a4a46c
commit
4b347b0d9a
@ -947,6 +947,8 @@ start_bot_threads()
|
||||
self thread bot_sd_attackers();
|
||||
|
||||
self thread bot_cap();
|
||||
|
||||
self thread bot_war();
|
||||
}
|
||||
|
||||
self thread bot_revive_think();
|
||||
@ -4024,3 +4026,45 @@ bot_cap_get_flag(flag)
|
||||
if (evt != "new_goal")
|
||||
self ClearScriptGoal();
|
||||
}
|
||||
|
||||
/*
|
||||
Bots play the war gamemode
|
||||
*/
|
||||
bot_war()
|
||||
{
|
||||
self endon( "death" );
|
||||
self endon( "disconnect" );
|
||||
level endon("game_ended");
|
||||
|
||||
if ( level.gametype != "twar" )
|
||||
return;
|
||||
|
||||
myTeam = self.pers[ "team" ];
|
||||
otherTeam = getOtherTeam( myTeam );
|
||||
|
||||
for ( ;; )
|
||||
{
|
||||
wait( randomintrange( 3, 5 ) );
|
||||
|
||||
if ( self.bot_lock_goal )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!isDefined(level.twarFlags))
|
||||
continue;
|
||||
|
||||
flag = maps\mp\gametypes\twar::locate_contested_twar_flag();
|
||||
|
||||
if (!isDefined(flag))
|
||||
continue;
|
||||
|
||||
// check if should cap
|
||||
if (game["war_momentum"][self.team + "_multiplier"] == getDvarInt("twar_momentumMaxMultiplier"))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user