flared movement

This commit is contained in:
ineed bots 2023-06-07 13:34:21 -06:00
parent 1f5c23f275
commit 7b1973a689

View File

@ -1926,7 +1926,24 @@ killWalkOnEvents()
self endon( "disconnect" ); self endon( "disconnect" );
self endon( "death" ); self endon( "death" );
self waittill_any( "flash_rumble_loop", "new_enemy", "new_goal_internal", "goal_internal", "bad_path_internal" ); self waittill_any( "new_enemy", "new_goal_internal", "goal_internal", "bad_path_internal" );
waittillframeend;
self notify( "kill_goal" );
}
/*
Will stop the goal walk when an enemy is found or flashed or a new goal appeared for the bot.
*/
watchOnFlared()
{
self endon( "kill_goal" );
self endon( "disconnect" );
self endon( "death" );
while ( !self isFlared() )
wait 0.05;
waittillframeend; waittillframeend;
@ -1963,6 +1980,7 @@ doWalk( goal, dist, isScriptGoal )
self thread doWalkScriptNotify(); self thread doWalkScriptNotify();
self thread killWalkOnEvents(); self thread killWalkOnEvents();
self thread watchOnFlared();
self thread watchOnGoal( goal, dist ); self thread watchOnGoal( goal, dist );
current = self initAStar( goal ); current = self initAStar( goal );