mirror of
https://github.com/JezuzLizard/t4sp_bot_warfare.git
synced 2025-09-18 14:17:27 +00:00
Add debug prints. Move objective related code into separate scripts.
Add the ability to prioritize objectives over targets.
This commit is contained in:
@@ -279,7 +279,6 @@ ClearScriptGoal()
|
||||
/*
|
||||
Returns whether the bot is at it's goal
|
||||
*/
|
||||
|
||||
AtScriptGoal()
|
||||
{
|
||||
if ( !isDefined( self.bot.script_goal ) )
|
||||
@@ -289,6 +288,40 @@ AtScriptGoal()
|
||||
return distanceSquared( self.origin, self.bot.script_goal ) <= ( self.bot.script_goal_dist * self.bot.script_goal_dist );
|
||||
}
|
||||
|
||||
/*
|
||||
Returns whether the bot has a priority objective
|
||||
*/
|
||||
HasPriorityObjective()
|
||||
{
|
||||
return self.bot.prio_objective;
|
||||
}
|
||||
|
||||
/*
|
||||
Sets the bot to prioritize the objective over targeting enemies
|
||||
*/
|
||||
SetPriorityObjective()
|
||||
{
|
||||
self.bot.prio_objective = true;
|
||||
self notify( "kill_goal" );
|
||||
}
|
||||
|
||||
/*
|
||||
Clears the bot's priority objective to allow the bot to target enemies automatically again
|
||||
*/
|
||||
ClearPriorityObjective()
|
||||
{
|
||||
self.bot.prio_objective = false;
|
||||
}
|
||||
|
||||
/*
|
||||
Checks whether the path generated by the ASTAR path finding is inaccessible
|
||||
*/
|
||||
GetPathIsInaccessible()
|
||||
{
|
||||
waittillframeend;
|
||||
return self.bot.path_inaccessible;
|
||||
}
|
||||
|
||||
/*
|
||||
Sets the aim position of the bot
|
||||
*/
|
||||
|
Reference in New Issue
Block a user