mirror of
https://github.com/ineedbots/t4_bot_warfare.git
synced 2025-04-22 16:05:44 +00:00
improved cap capflag
This commit is contained in:
parent
bdea53b670
commit
0884902695
@ -4529,6 +4529,18 @@ bot_cap()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Gets the carriers ent num
|
||||||
|
*/
|
||||||
|
getCarrierEntNum()
|
||||||
|
{
|
||||||
|
carrierNum = -1;
|
||||||
|
if (isDefined(self.carrier))
|
||||||
|
carrierNum = self.carrier getEntityNumber();
|
||||||
|
|
||||||
|
return carrierNum;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Bots go and get the flag
|
Bots go and get the flag
|
||||||
*/
|
*/
|
||||||
@ -4545,12 +4557,30 @@ bot_cap_get_flag( flag )
|
|||||||
|
|
||||||
evt = self waittill_any_return( "goal", "bad_path", "new_goal" );
|
evt = self waittill_any_return( "goal", "bad_path", "new_goal" );
|
||||||
|
|
||||||
wait 1;
|
|
||||||
|
|
||||||
self.bot_lock_goal = false;
|
|
||||||
|
|
||||||
if ( evt != "new_goal" )
|
if ( evt != "new_goal" )
|
||||||
self ClearScriptGoal();
|
self ClearScriptGoal();
|
||||||
|
|
||||||
|
if ( evt != "goal" )
|
||||||
|
{
|
||||||
|
self.bot_lock_goal = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self SetScriptGoal( self.origin, 64 );
|
||||||
|
curCarrier = flag getCarrierEntNum();
|
||||||
|
|
||||||
|
while ( curCarrier == flag getCarrierEntNum() && self isTouching( flag.trigger ) )
|
||||||
|
{
|
||||||
|
cur = flag.curProgress;
|
||||||
|
wait 0.5;
|
||||||
|
|
||||||
|
if ( flag.curProgress == cur )
|
||||||
|
break;//some enemy is near us, kill him
|
||||||
|
}
|
||||||
|
|
||||||
|
self ClearScriptGoal();
|
||||||
|
|
||||||
|
self.bot_lock_goal = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user