Add missing return values to check_complete functions.

Fix mistakes in scripts. Create bot objective glob and add objectives on map to the glob. Don't create 3 separate threads for bot think.
This commit is contained in:
JezuzLizard
2023-03-27 21:38:25 -07:00
parent 872630b7e2
commit ae7cfb991a
7 changed files with 374 additions and 87 deletions

View File

@ -15,7 +15,7 @@ bot_should_aimatsinglenormalzombie()
bot_check_complete_aimatsinglenormalzombie()
{
return false;
}
bot_set_complete_aimatsinglenormalzombie()
@ -70,7 +70,7 @@ bot_should_shootsinglenormalzombie()
bot_check_complete_shootsinglenormalzombie()
{
return false;
}
bot_set_complete_shootsinglenormalzombie()
@ -125,7 +125,7 @@ bot_should_aimatmultiplenormalzombies()
bot_check_complete_aimatmultiplenormalzombies()
{
return false;
}
bot_set_complete_aimatmultiplenormalzombies()
@ -180,7 +180,7 @@ bot_should_shootmultiplenormalzombies()
bot_check_complete_shootmultiplenormalzombies()
{
return false;
}
bot_set_complete_shootmultiplenormalzombies()
@ -235,7 +235,7 @@ bot_should_meleesinglenormalzombie()
bot_check_complete_meleesinglenormalzombie()
{
return false;
}
bot_set_complete_meleesinglenormalzombie()
@ -290,7 +290,7 @@ bot_should_shootsingledogzombie()
bot_check_complete_shootsingledogzombie()
{
return false;
}
bot_set_complete_shootsingledogzombie()
@ -345,7 +345,7 @@ bot_should_shootmultipledogzombies()
bot_check_complete_shootmultipledogzombies()
{
return false;
}
bot_set_complete_shootmultipledogzombies()
@ -400,7 +400,7 @@ bot_should_meleesingledogzombie()
bot_check_complete_meleesingledogzombie()
{
return false;
}
bot_set_complete_meleesingledogzombie()

View File

@ -10,17 +10,21 @@ bot_movetoobjective_process_order()
bot_should_movetoobjective()
{
if ( isDefined( self.action_queue[ "objective" ][ 0 ] ) )
{
return true;
}
return false;
}
bot_check_complete_movetoobjective()
{
return self.zbot_actions_in_queue[ "movement" ][ "movetoobjective" ].completed;
}
bot_set_complete_movetoobjective()
{
self.zbot_actions_in_queue[ "movement" ][ "movetoobjective" ].completed = true;
}
bot_movetoobjective_on_completion()
@ -40,6 +44,10 @@ bot_movetoobjective_on_cancel()
bot_movetoobjective_should_postpone()
{
if ( self bot_should_flee() )
{
return true;
}
return false;
}
@ -70,7 +78,7 @@ bot_should_train()
bot_check_complete_train()
{
return false;
}
bot_set_complete_train()
@ -125,7 +133,7 @@ bot_should_camp()
bot_check_complete_camp()
{
return false;
}
bot_set_complete_camp()
@ -180,7 +188,7 @@ bot_should_flee()
bot_check_complete_flee()
{
return false;
}
bot_set_complete_flee()

View File

@ -47,7 +47,7 @@ bot_should_purchase_magicbox()
bot_check_complete_magicbox()
{
return false;
}
bot_set_complete_magicbox()
@ -116,7 +116,7 @@ bot_should_purchase_wallbuy()
bot_check_complete_wallbuy()
{
return false;
}
bot_set_complete_wallbuy()
@ -171,7 +171,7 @@ bot_should_purchase_wallbuy_ammo()
bot_check_complete_wallbuy_ammo()
{
return false;
}
bot_set_complete_wallbuy_ammo()
@ -226,7 +226,7 @@ bot_should_purchase_perk()
bot_check_complete_perk_purchase()
{
return false;
}
bot_set_complete_perk_purchase()
@ -281,7 +281,7 @@ bot_should_purchase_door()
bot_check_complete_door_purchase()
{
return false;
}
bot_set_complete_door_purchase()
@ -336,7 +336,7 @@ bot_should_purchase_debris()
bot_check_complete_debris_purchase()
{
return false;
}
bot_set_complete_debris_purchase()
@ -391,7 +391,7 @@ bot_should_purchase_trap()
bot_check_complete_trap_purchase()
{
return false;
}
bot_set_complete_trap_purchase()
@ -446,7 +446,7 @@ bot_should_purchase_packapunch()
bot_check_complete_packapunch_purchase()
{
return false;
}
bot_set_complete_packapunch_purchase()
@ -501,7 +501,7 @@ bot_should_revive_player()
bot_check_complete_revive_player()
{
return false;
}
bot_set_complete_revive_player()
@ -556,7 +556,7 @@ bot_should_grab_buildable()
bot_check_complete_grab_buildable()
{
return false;
}
bot_set_complete_grab_buildable()
@ -611,7 +611,7 @@ bot_should_build_buildable()
bot_check_complete_build_buildable()
{
return false;
}
bot_set_complete_build_buildable()
@ -676,7 +676,7 @@ bot_part_should_cancel()
bot_check_complete_grab_part()
{
return false;
}
bot_set_complete_grab_part()
@ -773,7 +773,7 @@ bot_should_grab_powerup()
bot_check_complete_grab_powerup()
{
return false;
}
bot_set_complete_grab_powerup()