mirror of
https://github.com/JezuzLizard/t4sp_bot_warfare.git
synced 2025-04-23 06:55:44 +00:00
Split bot actions script into 3 different scripts.
This commit is contained in:
parent
31c885a396
commit
f75726147c
@ -1,45 +1,49 @@
|
|||||||
#include common_scripts\utility;
|
#include common_scripts\utility;
|
||||||
#include maps\_utility;
|
#include maps\_utility;
|
||||||
#include maps\_zombiemode_utility;
|
#include maps\_zombiemode_utility;
|
||||||
#include scripts\sp\bots\bot_actions;
|
|
||||||
#include scripts\sp\bots\bot_utility;
|
|
||||||
|
|
||||||
|
#include scripts\sp\bots\actions\combat;
|
||||||
|
#include scripts\sp\bots\actions\movement;
|
||||||
|
#include scripts\sp\bots\actions\objective;
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
//3 separate bot think threads
|
//3 separate bot think threads
|
||||||
//Objective group is for things to go to usually allowing the bot to kill zombies on the way and survive as normal
|
//Objective group is for things to go to usually allowing the bot to kill zombies on the way and survive as normal
|
||||||
//Objectives can be canceled/postponed by combat thread, movement thread or by other objectives
|
//Objectives can be canceled/postponed by combat thread, movement thread or by other objectives
|
||||||
register_bot_action( "objective", "magicbox", ::bot_magicbox_purchase, ::bot_magicbox_action_order, ::bot_should_purchase_magicbox, ::bot_magicbox_purchase_on_completion, ::bot_magicbox_purchase_should_cancel, ::bot_magicbox_purchase_on_cancel, ::bot_magicbox_purchase_should_postpone, ::bot_magicbox_purchase_on_postpone, ::bot_magicbox_purchase_priority );
|
register_bot_action( "objective", "magicbox", ::bot_magicbox_purchase, ::bot_magicbox_process_order, ::bot_should_purchase_magicbox, ::bot_magicbox_purchase_on_completion, ::bot_magicbox_purchase_should_cancel, ::bot_magicbox_purchase_on_cancel, ::bot_magicbox_purchase_should_postpone, ::bot_magicbox_purchase_on_postpone, ::bot_magicbox_purchase_priority );
|
||||||
register_bot_action( "objective", "wallbuy", ::bot_wallbuy_purchase, ::bot_wallbuy_action_order, ::bot_should_purchase_wallbuy, ::bot_wallbuy_purchase_on_completion, ::bot_wallbuy_purchase_should_cancel, ::bot_wallbuy_purchase_on_cancel, ::bot_wallbuy_purchase_should_postpone, ::bot_wallbuy_purchase_on_postpone, ::bot_wallbuy_purchase_priority );
|
register_bot_action( "objective", "wallbuy", ::bot_wallbuy_purchase, ::bot_wallbuy_process_order, ::bot_should_purchase_wallbuy, ::bot_wallbuy_purchase_on_completion, ::bot_wallbuy_purchase_should_cancel, ::bot_wallbuy_purchase_on_cancel, ::bot_wallbuy_purchase_should_postpone, ::bot_wallbuy_purchase_on_postpone, ::bot_wallbuy_purchase_priority );
|
||||||
register_bot_action( "objective", "wallbuyammo", ::bot_wallbuy_ammo_purchase, ::bot_wallbuyammo_action_order, ::bot_should_purchase_wallbuy_ammo, ::bot_wallbuy_ammo_purchase_on_completion, ::bot_wallbuy_ammo_purchase_should_cancel, ::bot_wallbuy_ammo_purchase_on_cancel, ::bot_wallbuy_ammo_purchase_should_postpone, ::bot_wallbuy_ammo_purchase_on_postpone, ::bot_wallbuy_ammo_purchase_priority );
|
register_bot_action( "objective", "wallbuyammo", ::bot_wallbuy_ammo_purchase, ::bot_wallbuyammo_process_order, ::bot_should_purchase_wallbuy_ammo, ::bot_wallbuy_ammo_purchase_on_completion, ::bot_wallbuy_ammo_purchase_should_cancel, ::bot_wallbuy_ammo_purchase_on_cancel, ::bot_wallbuy_ammo_purchase_should_postpone, ::bot_wallbuy_ammo_purchase_on_postpone, ::bot_wallbuy_ammo_purchase_priority );
|
||||||
register_bot_action( "objective", "perk", ::bot_perk_purchase, ::bot_perk_action_order, ::bot_should_purchase_perk, ::bot_perk_purchase_on_completion, ::bot_perk_purchase_should_cancel, ::bot_perk_purchase_on_cancel, ::bot_perk_purchase_should_postpone, ::bot_perk_purchase_on_postpone, ::bot_perk_purchase_priority );
|
register_bot_action( "objective", "perk", ::bot_perk_purchase, ::bot_perk_process_order, ::bot_should_purchase_perk, ::bot_perk_purchase_on_completion, ::bot_perk_purchase_should_cancel, ::bot_perk_purchase_on_cancel, ::bot_perk_purchase_should_postpone, ::bot_perk_purchase_on_postpone, ::bot_perk_purchase_priority );
|
||||||
register_bot_action( "objective", "door", ::bot_door_purchase, ::bot_door_action_order, ::bot_should_purchase_door, ::bot_door_purchase_on_completion, ::bot_door_purchase_should_cancel, ::bot_door_purchase_on_cancel, ::bot_door_purchase_should_postpone, ::bot_door_purchase_on_postpone, ::bot_door_purchase_priority );
|
register_bot_action( "objective", "door", ::bot_door_purchase, ::bot_door_process_order, ::bot_should_purchase_door, ::bot_door_purchase_on_completion, ::bot_door_purchase_should_cancel, ::bot_door_purchase_on_cancel, ::bot_door_purchase_should_postpone, ::bot_door_purchase_on_postpone, ::bot_door_purchase_priority );
|
||||||
register_bot_action( "objective", "debris", ::bot_debris_purchase, ::bot_debris_action_order, ::bot_should_purchase_debris, ::bot_debris_purchase_on_completion, ::bot_debris_purchase_should_cancel, ::bot_debris_purchase_on_cancel, ::bot_debris_purchase_should_postpone, ::bot_debris_purchase_on_postpone, ::bot_debris_purchase_priority );
|
register_bot_action( "objective", "debris", ::bot_debris_purchase, ::bot_debris_process_order, ::bot_should_purchase_debris, ::bot_debris_purchase_on_completion, ::bot_debris_purchase_should_cancel, ::bot_debris_purchase_on_cancel, ::bot_debris_purchase_should_postpone, ::bot_debris_purchase_on_postpone, ::bot_debris_purchase_priority );
|
||||||
register_bot_action( "objective", "trap", ::bot_trap_purchase, ::bot_trap_action_order, ::bot_should_purchase_trap, ::bot_trap_purchase_on_completion, ::bot_trap_purchase_should_cancel, ::bot_trap_purchase_on_cancel, ::bot_trap_purchase_should_postpone, ::bot_trap_purchase_on_postpone, ::bot_trap_purchase_priority );
|
register_bot_action( "objective", "trap", ::bot_trap_purchase, ::bot_trap_process_order, ::bot_should_purchase_trap, ::bot_trap_purchase_on_completion, ::bot_trap_purchase_should_cancel, ::bot_trap_purchase_on_cancel, ::bot_trap_purchase_should_postpone, ::bot_trap_purchase_on_postpone, ::bot_trap_purchase_priority );
|
||||||
register_bot_action( "objective", "packapunch", ::bot_packapunch_purchase, ::bot_packapunch_action_order, ::bot_should_purchase_packapunch, ::bot_packapunch_purchase_on_completion, ::bot_packapunch_purchase_should_cancel, ::bot_packapunch_purchase_on_cancel, ::bot_packapunch_purchase_should_postpone, ::bot_packapunch_purchase_on_postpone, ::bot_packapunch_purchase_priority );
|
register_bot_action( "objective", "packapunch", ::bot_packapunch_purchase, ::bot_packapunch_process_order, ::bot_should_purchase_packapunch, ::bot_packapunch_purchase_on_completion, ::bot_packapunch_purchase_should_cancel, ::bot_packapunch_purchase_on_cancel, ::bot_packapunch_purchase_should_postpone, ::bot_packapunch_purchase_on_postpone, ::bot_packapunch_purchase_priority );
|
||||||
register_bot_action( "objective", "revive", ::bot_revive_player, ::bot_revive_action_order, ::bot_should_revive_player, ::bot_revive_player_on_completion, ::bot_revive_player_should_cancel, ::bot_revive_player_on_cancel, ::bot_revive_player_should_postpone, ::bot_revive_player_on_postpone, ::bot_revive_player_priority );
|
register_bot_action( "objective", "revive", ::bot_revive_player, ::bot_revive_process_order, ::bot_should_revive_player, ::bot_revive_player_on_completion, ::bot_revive_player_should_cancel, ::bot_revive_player_on_cancel, ::bot_revive_player_should_postpone, ::bot_revive_player_on_postpone, ::bot_revive_player_priority );
|
||||||
register_bot_action( "objective", "grabbuildable", ::bot_grab_buildable, ::bot_grabbuildable_action_order, ::bot_should_grab_buildable, ::bot_grab_buildable_on_completion, ::bot_grab_buildable_should_cancel, ::bot_grabbuild_buildable_on_cancel, ::bot_grab_buildable_should_postpone, ::bot_grab_buildable_on_postpone, ::bot_grab_buildable_priority );
|
register_bot_action( "objective", "grabbuildable", ::bot_grab_buildable, ::bot_grabbuildable_process_order, ::bot_should_grab_buildable, ::bot_grab_buildable_on_completion, ::bot_grab_buildable_should_cancel, ::bot_grabbuild_buildable_on_cancel, ::bot_grab_buildable_should_postpone, ::bot_grab_buildable_on_postpone, ::bot_grab_buildable_priority );
|
||||||
register_bot_action( "objective", "buildbuildable", ::bot_build_buildable, ::bot_buildbuildable_action_order, ::bot_should_build_buildable, ::bot_build_buildable_on_completion, ::bot_build_buildable_should_cancel, ::bot_build_buildable_on_cancel, ::bot_build_buildable_should_postpone, ::bot_build_buildable_on_postpone, ::bot_build_buildable_priority );
|
register_bot_action( "objective", "buildbuildable", ::bot_build_buildable, ::bot_buildbuildable_process_order, ::bot_should_build_buildable, ::bot_build_buildable_on_completion, ::bot_build_buildable_should_cancel, ::bot_build_buildable_on_cancel, ::bot_build_buildable_should_postpone, ::bot_build_buildable_on_postpone, ::bot_build_buildable_priority );
|
||||||
register_bot_action( "objective", "part", ::bot_grab_part, ::bot_part_action_order, ::bot_should_grab_part, ::bot_part_on_completion, ::bot_part_should_cancel, ::bot_part_on_cancel, ::bot_part_should_postpone, ::bot_part_on_postpone, ::bot_part_priority );
|
register_bot_action( "objective", "part", ::bot_grab_part, ::bot_part_process_order, ::bot_should_grab_part, ::bot_part_on_completion, ::bot_part_should_cancel, ::bot_part_on_cancel, ::bot_part_should_postpone, ::bot_part_on_postpone, ::bot_part_priority );
|
||||||
register_bot_action( "objective", "powerup", ::bot_grab_powerup, ::bot_powerup_action_order, ::bot_should_grab_powerup, ::bot_powerup_on_completion, ::bot_powerup_should_cancel, ::bot_powerup_on_cancel, ::bot_powerup_should_postpone, ::bot_powerup_on_postpone, ::bot_powerup_priority );
|
register_bot_action( "objective", "powerup", ::bot_grab_powerup, ::bot_powerup_process_order, ::bot_should_grab_powerup, ::bot_powerup_on_completion, ::bot_powerup_should_cancel, ::bot_powerup_on_cancel, ::bot_powerup_should_postpone, ::bot_powerup_on_postpone, ::bot_powerup_priority );
|
||||||
|
|
||||||
//Combat thread actions
|
//Combat thread actions
|
||||||
//These all need definitions
|
//These all need definitions
|
||||||
register_bot_action( "combat", "aimatsinglenormalzombie", ::bot_aimatsinglenormalzombie, ::bot_aimatsinglenormalzombie_action_order ::bot_should_aimatsinglenormalzombie, ::bot_aimatsinglenormalzombie_on_completion, ::bot_aimatsinglenormalzombie_should_cancel, ::bot_aimatsinglenormalzombie_on_cancel, ::bot_aimatsinglenormalzombie_should_postpone, ::bot_aimatsinglenormalzombie_on_postpone, ::bot_aimatsinglenormalzombie_priority );
|
register_bot_action( "combat", "aimatsinglenormalzombie", ::bot_aimatsinglenormalzombie, ::bot_aimatsinglenormalzombie_process_order ::bot_should_aimatsinglenormalzombie, ::bot_aimatsinglenormalzombie_on_completion, ::bot_aimatsinglenormalzombie_should_cancel, ::bot_aimatsinglenormalzombie_on_cancel, ::bot_aimatsinglenormalzombie_should_postpone, ::bot_aimatsinglenormalzombie_on_postpone, ::bot_aimatsinglenormalzombie_priority );
|
||||||
register_bot_action( "combat", "shootsinglenormalzombie", ::bot_shootsinglenormalzombie, ::bot_shootsinglenormalzombie_action_order ::bot_should_shootsinglenormalzombie, ::bot_shootsinglenormalzombie_on_completion, ::bot_shootsinglenormalzombie_should_cancel, ::bot_shootsinglenormalzombie_on_cancel, ::bot_shootsinglenormalzombie_should_postpone, ::bot_shootsinglenormalzombie_on_postpone, ::bot_shootsinglenormalzombie_priority );
|
register_bot_action( "combat", "shootsinglenormalzombie", ::bot_shootsinglenormalzombie, ::bot_shootsinglenormalzombie_process_order ::bot_should_shootsinglenormalzombie, ::bot_shootsinglenormalzombie_on_completion, ::bot_shootsinglenormalzombie_should_cancel, ::bot_shootsinglenormalzombie_on_cancel, ::bot_shootsinglenormalzombie_should_postpone, ::bot_shootsinglenormalzombie_on_postpone, ::bot_shootsinglenormalzombie_priority );
|
||||||
register_bot_action( "combat", "aimatmultiplenormalzombies", ::bot_aimatmultiplenormalzombies, ::bot_aimatmultiplenormalzombies_action_order ::bot_should_aimatmultiplenormalzombies, ::bot_aimatmultiplenormalzombies_on_completion, ::bot_aimatmultiplenormalzombies_should_cancel, ::bot_aimatmultiplenormalzombies_on_cancel, ::bot_aimatmultiplenormalzombies_should_postpone, ::bot_aimatmultiplenormalzombies_on_postpone, ::bot_aimatmultiplenormalzombies_priority );
|
register_bot_action( "combat", "aimatmultiplenormalzombies", ::bot_aimatmultiplenormalzombies, ::bot_aimatmultiplenormalzombies_process_order ::bot_should_aimatmultiplenormalzombies, ::bot_aimatmultiplenormalzombies_on_completion, ::bot_aimatmultiplenormalzombies_should_cancel, ::bot_aimatmultiplenormalzombies_on_cancel, ::bot_aimatmultiplenormalzombies_should_postpone, ::bot_aimatmultiplenormalzombies_on_postpone, ::bot_aimatmultiplenormalzombies_priority );
|
||||||
register_bot_action( "combat", "shootmultiplenormalzombies", ::bot_shootmultiplenormalzombies, ::bot_shootmultiplenormalzombies_action_order ::bot_should_shootmultiplenormalzombies, ::bot_shootmultiplenormalzombie_on_completion, ::bot_shootmultiplenormalzombie_should_cancel, ::bot_shootmultiplenormalzombie_on_cancel, ::bot_shootmultiplenormalzombie_should_postpone, ::bot_shootmultiplenormalzombie_on_postpone, ::bot_shootmultiplenormalzombie_priority );
|
register_bot_action( "combat", "shootmultiplenormalzombies", ::bot_shootmultiplenormalzombies, ::bot_shootmultiplenormalzombies_process_order ::bot_should_shootmultiplenormalzombies, ::bot_shootmultiplenormalzombie_on_completion, ::bot_shootmultiplenormalzombie_should_cancel, ::bot_shootmultiplenormalzombie_on_cancel, ::bot_shootmultiplenormalzombie_should_postpone, ::bot_shootmultiplenormalzombie_on_postpone, ::bot_shootmultiplenormalzombie_priority );
|
||||||
register_bot_action( "combat", "meleesinglenormalzombie", ::bot_meleesinglenormalzombie, ::bot_meleesinglenormalzombie_action_order ::bot_should_meleesinglenormalzombie, ::bot_meleesinglenormalzombie_on_completion, ::bot_meleesinglenormalzombie_should_cancel, ::bot_meleesinglenormalzombie_on_cancel, ::bot_meleesinglenormalzombie_should_postpone, ::bot_meleesinglenormalzombie_on_postpone, ::bot_meleesinglenormalzombie_priority );
|
register_bot_action( "combat", "meleesinglenormalzombie", ::bot_meleesinglenormalzombie, ::bot_meleesinglenormalzombie_process_order ::bot_should_meleesinglenormalzombie, ::bot_meleesinglenormalzombie_on_completion, ::bot_meleesinglenormalzombie_should_cancel, ::bot_meleesinglenormalzombie_on_cancel, ::bot_meleesinglenormalzombie_should_postpone, ::bot_meleesinglenormalzombie_on_postpone, ::bot_meleesinglenormalzombie_priority );
|
||||||
register_bot_action( "combat", "shootsingledogzombie", ::bot_shootsingledogzombie, ::bot_shootsingledogzombie_action_order ::bot_should_shootsingledogzombie, ::bot_shootsingledogzombie_on_completion, ::bot_shootsingledogzombie_should_cancel, ::bot_shootsingledogzombie_on_cancel, ::bot_shootsingledogzombie_should_postpone, ::bot_shootsingledogzombie_on_postpone, ::bot_shootsingledogzombie_priority );
|
register_bot_action( "combat", "shootsingledogzombie", ::bot_shootsingledogzombie, ::bot_shootsingledogzombie_process_order ::bot_should_shootsingledogzombie, ::bot_shootsingledogzombie_on_completion, ::bot_shootsingledogzombie_should_cancel, ::bot_shootsingledogzombie_on_cancel, ::bot_shootsingledogzombie_should_postpone, ::bot_shootsingledogzombie_on_postpone, ::bot_shootsingledogzombie_priority );
|
||||||
register_bot_action( "combat", "shootmultipledogzombies", ::bot_shootmultipledogzombies, ::bot_shootmultipledogzombies_action_order ::bot_should_shootmultipledogzombies, ::bot_shootmultipledogzombies_on_completion, ::bot_shootmultipledogzombies_should_cancel, ::bot_shootmultipledogzombies_on_cancel, ::bot_shootmultipledogzombies_should_postpone, ::bot_shootmultipledogzombies_on_postpone, ::bot_shootmultipledogzombies_priority );
|
register_bot_action( "combat", "shootmultipledogzombies", ::bot_shootmultipledogzombies, ::bot_shootmultipledogzombies_process_order ::bot_should_shootmultipledogzombies, ::bot_shootmultipledogzombies_on_completion, ::bot_shootmultipledogzombies_should_cancel, ::bot_shootmultipledogzombies_on_cancel, ::bot_shootmultipledogzombies_should_postpone, ::bot_shootmultipledogzombies_on_postpone, ::bot_shootmultipledogzombies_priority );
|
||||||
register_bot_action( "combat", "meleesingledogzombie", ::bot_meleesingledogzombie, ::bot_meleesingledogzombie_action_order ::bot_should_meleesingledogzombie, ::bot_meleesingledogzombie_on_completion, ::bot_meleesingledogzombie_should_cancel, ::bot_meleesingledogzombie_on_cancel, ::bot_meleesingledogzombie_should_postpone, ::bot_meleesingledogzombie_on_postpone, ::bot_meleesingledogzombie_priority );
|
register_bot_action( "combat", "meleesingledogzombie", ::bot_meleesingledogzombie, ::bot_meleesingledogzombie_process_order ::bot_should_meleesingledogzombie, ::bot_meleesingledogzombie_on_completion, ::bot_meleesingledogzombie_should_cancel, ::bot_meleesingledogzombie_on_cancel, ::bot_meleesingledogzombie_should_postpone, ::bot_meleesingledogzombie_on_postpone, ::bot_meleesingledogzombie_priority );
|
||||||
|
|
||||||
//Movement thread actions
|
//Movement thread actions
|
||||||
//These all need definitions
|
//These all need definitions
|
||||||
register_bot_action( "movement", "movetoobjective", ::bot_movetoobjective, ::bot_movetoobjective_action_order ::bot_should_movetoobjective, ::bot_movetoobjective_on_completion, ::bot_movetoobjective_should_cancel, ::bot_movetoobjective_on_cancel, ::bot_movetoobjective_should_postpone, ::bot_movetoobjective_on_postpone, ::bot_movetoobjective_priority );
|
register_bot_action( "movement", "movetoobjective", ::bot_movetoobjective, ::bot_movetoobjective_process_order ::bot_should_movetoobjective, ::bot_movetoobjective_on_completion, ::bot_movetoobjective_should_cancel, ::bot_movetoobjective_on_cancel, ::bot_movetoobjective_should_postpone, ::bot_movetoobjective_on_postpone, ::bot_movetoobjective_priority );
|
||||||
register_bot_action( "movement", "train", ::bot_train, ::bot_train_action_order ::bot_should_train, ::bot_train_on_completion, ::bot_train_should_cancel, ::bot_train_on_cancel, ::bot_train_should_postpone, ::bot_train_on_postpone, ::bot_train_priority );
|
register_bot_action( "movement", "train", ::bot_train, ::bot_train_process_order ::bot_should_train, ::bot_train_on_completion, ::bot_train_should_cancel, ::bot_train_on_cancel, ::bot_train_should_postpone, ::bot_train_on_postpone, ::bot_train_priority );
|
||||||
register_bot_action( "movement", "camp", ::bot_camp, ::bot_camp_action_order ::bot_should_camp, ::bot_camp_on_completion, ::bot_camp_should_cancel, ::bot_camp_on_cancel, ::bot_camp_should_postpone, ::bot_camp_on_postpone, ::bot_camp_priority );
|
register_bot_action( "movement", "camp", ::bot_camp, ::bot_camp_process_order ::bot_should_camp, ::bot_camp_on_completion, ::bot_camp_should_cancel, ::bot_camp_on_cancel, ::bot_camp_should_postpone, ::bot_camp_on_postpone, ::bot_camp_priority );
|
||||||
register_bot_action( "movement", "flee", ::bot_flee, ::bot_flee_action_order ::bot_should_flee, ::bot_flee_on_completion, ::bot_flee_should_cancel, ::bot_flee_on_cancel, ::bot_flee_should_postpone, ::bot_flee_on_postpone, ::bot_flee_priority );
|
register_bot_action( "movement", "flee", ::bot_flee, ::bot_flee_process_order ::bot_should_flee, ::bot_flee_on_completion, ::bot_flee_should_cancel, ::bot_flee_on_cancel, ::bot_flee_should_postpone, ::bot_flee_on_postpone, ::bot_flee_priority );
|
||||||
|
|
||||||
level.bot_weapon_quality_poor = 0;
|
level.bot_weapon_quality_poor = 0;
|
||||||
level.bot_weapon_quality_fair = 1;
|
level.bot_weapon_quality_fair = 1;
|
||||||
|
361
scripts/sp/bots/actions/combat.gsc
Normal file
361
scripts/sp/bots/actions/combat.gsc
Normal file
@ -0,0 +1,361 @@
|
|||||||
|
|
||||||
|
|
||||||
|
bot_aimatsinglenormalzombie()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_aimatsinglenormalzombie_process_order()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_should_aimatsinglenormalzombie()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_aimatsinglenormalzombie_on_completion()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_aimatsinglenormalzombie_should_cancel()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_aimatsinglenormalzombie_on_cancel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_aimatsinglenormalzombie_should_postpone()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_aimatsinglenormalzombie_on_postpone()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_aimatsinglenormalzombie_priority()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootsinglenormalzombie()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootsinglenormalzombie_process_order()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_should_shootsinglenormalzombie()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootsinglenormalzombie_on_completion()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootsinglenormalzombie_should_cancel()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootsinglenormalzombie_on_cancel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootsinglenormalzombie_should_postpone()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootsinglenormalzombie_on_postpone()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootsinglenormalzombie_priority()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_aimatmultiplenormalzombies()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_aimatmultiplenormalzombies_process_order()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_should_aimatmultiplenormalzombies()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_aimatmultiplenormalzombies_on_completion()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_aimatmultiplenormalzombies_should_cancel()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_aimatmultiplenormalzombies_on_cancel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_aimatmultiplenormalzombies_should_postpone()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_aimatmultiplenormalzombies_on_postpone()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_aimatmultiplenormalzombies_priority()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootmultiplenormalzombies()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootmultiplenormalzombies_process_order()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_should_shootmultiplenormalzombies()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootmultiplenormalzombie_on_completion()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootmultiplenormalzombie_should_cancel()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootmultiplenormalzombie_on_cancel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootmultiplenormalzombie_should_postpone()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootmultiplenormalzombie_on_postpone()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootmultiplenormalzombie_priority()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_meleesinglenormalzombie()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_meleesinglenormalzombie_process_order()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_should_meleesinglenormalzombie()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_meleesinglenormalzombie_on_completion()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_meleesinglenormalzombie_should_cancel()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_meleesinglenormalzombie_on_cancel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_meleesinglenormalzombie_should_postpone()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_meleesinglenormalzombie_on_postpone()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_meleesinglenormalzombie_priority()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootsingledogzombie()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootsingledogzombie_process_order()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_should_shootsingledogzombie()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootsingledogzombie_on_completion()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootsingledogzombie_should_cancel()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootsingledogzombie_on_cancel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootsingledogzombie_should_postpone()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootsingledogzombie_on_postpone()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootsingledogzombie_priority()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootmultipledogzombies()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootmultipledogzombies_process_order()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_should_shootmultipledogzombies()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootmultipledogzombies_on_completion()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootmultipledogzombies_should_cancel()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootmultipledogzombies_on_cancel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootmultipledogzombies_should_postpone()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootmultipledogzombies_on_postpone()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_shootmultipledogzombies_priority()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_meleesingledogzombie()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_meleesingledogzombie_process_order()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_should_meleesingledogzombie()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_meleesingledogzombie_on_completion()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_meleesingledogzombie_should_cancel()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_meleesingledogzombie_on_cancel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_meleesingledogzombie_should_postpone()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_meleesingledogzombie_on_postpone()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_meleesingledogzombie_priority()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
179
scripts/sp/bots/actions/movement.gsc
Normal file
179
scripts/sp/bots/actions/movement.gsc
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
bot_movetoobjective()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_movetoobjective_process_order()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_should_movetoobjective()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_movetoobjective_on_completion()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_movetoobjective_should_cancel()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_movetoobjective_on_cancel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_movetoobjective_should_postpone()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_movetoobjective_on_postpone()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_movetoobjective_priority()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_train()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_train_process_order()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_should_train()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_train_on_completion()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_train_should_cancel()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_train_on_cancel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_train_should_postpone()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_train_on_postpone()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_train_priority()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_camp()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_camp_process_order()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_should_camp()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_camp_on_completion()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_camp_should_cancel()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_camp_on_cancel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_camp_should_postpone()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_camp_on_postpone()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_camp_priority()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_flee()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_flee_process_order()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_should_flee()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_flee_on_completion()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_flee_should_cancel()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_flee_on_cancel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_flee_should_postpone()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_flee_on_postpone()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bot_flee_priority()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
@ -1,52 +1,9 @@
|
|||||||
/*
|
|
||||||
Bot actions are in two parts
|
|
||||||
*/
|
|
||||||
#include common_scripts\utility;
|
|
||||||
#include maps\mp\_utility;
|
|
||||||
#include maps\mp\zombies\_zm_utility;
|
|
||||||
#include scripts\zm\bots\bot_utility;
|
|
||||||
|
|
||||||
register_bot_action( group, action_name, action_func, should_do_func, action_process_order_func, action_completion_func, should_cancel_func, on_cancel_func, should_postpone_func, on_postpone_func, priority_func )
|
|
||||||
{
|
|
||||||
if ( !isDefined( level.zbots_actions ) )
|
|
||||||
{
|
|
||||||
level.zbots_actions = [];
|
|
||||||
}
|
|
||||||
if ( !isDefined( level.zbots_actions[ action_name ] ) )
|
|
||||||
{
|
|
||||||
level.zbots_actions[ action_name ] = [];
|
|
||||||
}
|
|
||||||
level.zbots_actions[ action_name ] = spawnStruct();
|
|
||||||
level.zbots_actions[ action_name ].group = group;
|
|
||||||
level.zbots_actions[ action_name ].action = action_func;
|
|
||||||
level.zbots_actions[ action_name ].should_do_func = should_do_func;
|
|
||||||
level.zbots_actions[ action_name ].action_process_order_func = action_process_order_func;
|
|
||||||
level.zbots_actions[ action_name ].on_completion_func = action_completion_func;
|
|
||||||
level.zbots_actions[ action_name ].should_cancel_func = should_cancel_func;
|
|
||||||
level.zbots_actions[ action_name ].on_cancel_func = on_cancel_func;
|
|
||||||
level.zbots_actions[ action_name ].should_postpone_func = should_postpone_func;
|
|
||||||
level.zbots_actions[ action_name ].on_postpone_func = on_postpone_func;
|
|
||||||
level.zbots_actions[ action_name ].priority_func = priority_func;
|
|
||||||
}
|
|
||||||
|
|
||||||
register_bot_action_queue_action( action_name )
|
|
||||||
{
|
|
||||||
if ( !isDefined( self.actions_in_queue ) )
|
|
||||||
{
|
|
||||||
self.actions_in_queue = [];
|
|
||||||
}
|
|
||||||
self.actions_in_queue[ action_name ] = spawnStruct();
|
|
||||||
self.actions_in_queue[ action_name ].postponed = false;
|
|
||||||
self.actions_in_queue[ action_name ].canceled = false;
|
|
||||||
self.actions_in_queue[ action_name ].queued = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bot_magicbox_purchase()
|
bot_magicbox_purchase()
|
||||||
{
|
{
|
||||||
self.target_pos = self.available_chests[ 0 ].origin;
|
self.target_pos = self.available_chests[ 0 ].origin;
|
||||||
}
|
}
|
||||||
|
|
||||||
bot_magicbox_action_order()
|
bot_magicbox_process_order()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -137,7 +94,7 @@ bot_wallbuy_purchase()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bot_wallbuy_action_order()
|
bot_wallbuy_process_order()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -182,7 +139,7 @@ bot_wallbuy_ammo_purchase()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bot_wallbuyammo_action_order()
|
bot_wallbuyammo_process_order()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -227,7 +184,7 @@ bot_perk_purchase()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bot_perk_action_order()
|
bot_perk_process_order()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -272,7 +229,7 @@ bot_door_purchase()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bot_door_action_order()
|
bot_door_process_order()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -317,7 +274,7 @@ bot_debris_purchase()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bot_debris_action_order()
|
bot_debris_process_order()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -362,7 +319,7 @@ bot_trap_purchase()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bot_trap_action_order()
|
bot_trap_process_order()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -407,7 +364,7 @@ bot_packapunch_purchase()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bot_packapunch_action_order()
|
bot_packapunch_process_order()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -452,7 +409,7 @@ bot_revive_player()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bot_revive_action_order()
|
bot_revive_process_order()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -497,7 +454,7 @@ bot_grab_buildable()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bot_grabbuildable_action_order()
|
bot_grabbuildable_process_order()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -542,7 +499,7 @@ bot_build_buildable()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bot_buildbuildable_action_order()
|
bot_buildbuildable_process_order()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -587,7 +544,7 @@ bot_grab_part()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bot_part_action_order()
|
bot_part_process_order()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -640,7 +597,7 @@ bot_grab_powerup()
|
|||||||
level.zbots_powerups_targeted_for_grab[ level.zbots_powerups_targeted_for_grab.size ] = self.available_powerups[ 0 ];
|
level.zbots_powerups_targeted_for_grab[ level.zbots_powerups_targeted_for_grab.size ] = self.available_powerups[ 0 ];
|
||||||
}
|
}
|
||||||
|
|
||||||
bot_powerup_action_order()
|
bot_powerup_process_order()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
42
scripts/sp/bots/bot_actions_common.gsc
Normal file
42
scripts/sp/bots/bot_actions_common.gsc
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
Bot actions are in two parts
|
||||||
|
*/
|
||||||
|
#include common_scripts\utility;
|
||||||
|
#include maps\_utility;
|
||||||
|
#include maps\_zombiemode_utility;
|
||||||
|
|
||||||
|
register_bot_action( group, action_name, action_func, should_do_func, action_process_order_func, action_completion_func, should_cancel_func, on_cancel_func, should_postpone_func, on_postpone_func, priority_func )
|
||||||
|
{
|
||||||
|
if ( !isDefined( level.zbots_actions ) )
|
||||||
|
{
|
||||||
|
level.zbots_actions = [];
|
||||||
|
}
|
||||||
|
if ( !isDefined( level.zbots_actions[ action_name ] ) )
|
||||||
|
{
|
||||||
|
level.zbots_actions[ action_name ] = [];
|
||||||
|
}
|
||||||
|
level.zbots_actions[ action_name ] = spawnStruct();
|
||||||
|
level.zbots_actions[ action_name ].group = group;
|
||||||
|
level.zbots_actions[ action_name ].action = action_func;
|
||||||
|
level.zbots_actions[ action_name ].should_do_func = should_do_func;
|
||||||
|
level.zbots_actions[ action_name ].action_process_order_func = action_process_order_func;
|
||||||
|
level.zbots_actions[ action_name ].on_completion_func = action_completion_func;
|
||||||
|
level.zbots_actions[ action_name ].should_cancel_func = should_cancel_func;
|
||||||
|
level.zbots_actions[ action_name ].on_cancel_func = on_cancel_func;
|
||||||
|
level.zbots_actions[ action_name ].should_postpone_func = should_postpone_func;
|
||||||
|
level.zbots_actions[ action_name ].on_postpone_func = on_postpone_func;
|
||||||
|
level.zbots_actions[ action_name ].priority_func = priority_func;
|
||||||
|
}
|
||||||
|
|
||||||
|
register_bot_action_queue_action( action_name )
|
||||||
|
{
|
||||||
|
if ( !isDefined( self.actions_in_queue ) )
|
||||||
|
{
|
||||||
|
self.actions_in_queue = [];
|
||||||
|
}
|
||||||
|
self.actions_in_queue[ action_name ] = spawnStruct();
|
||||||
|
self.actions_in_queue[ action_name ].postponed = false;
|
||||||
|
self.actions_in_queue[ action_name ].canceled = false;
|
||||||
|
self.actions_in_queue[ action_name ].queued = false;
|
||||||
|
self.actions_in_queue[ action_name ].completed = false;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user