0.52

From Unvanquished
Jump to: navigation, search

List of v0.52 Behavior Tree Actions

activateUpgrade

Use upgrade if possible. Parameter is the upgrade to use.

Example:

 action activateUpgrade( UP_MEDKIT )

aimAtGoal

{ "aimAtGoal",         BotActionAimAtGoal,         0, 0 }, 

alternateStrafe

{ "alternateStrafe",   BotActionAlternateStrafe,   0, 0 }, 

buy

{ "buy",               BotActionBuy,               1, 4 }, 

changeGoal

Parameters:

  • vec3_t: position designed as new goal (mandatory)

In code: BotActionChangeGoal

classDodge

{ "classDodge",        BotActionClassDodge,        0, 0 }, 

deactivateUpgrade

{ "deactivateUpgrade", BotActionDeactivateUpgrade, 1, 1 }, 

equip

{ "equip",             BotActionBuy,               0, 0 }, 

evolve

{ "evolve",            BotActionEvolve,            0, 0 }, 

evolveTo

{ "evolveTo",          BotActionEvolveTo,          1, 1 }, 

fight

{ "fight",             BotActionFight,             0, 0 }, 

fireWeapon

{ "fireWeapon",        BotActionFireWeapon,        0, 0 }, 

flee

{ "flee",              BotActionFlee,              0, 0 }, 

heal

{ "heal",              BotActionHeal,              0, 0 }, 

jump

{ "jump",              BotActionJump,              0, 0 }, 

moveInDir

{ "moveInDir",         BotActionMoveInDir,         1, 2 }, 

moveTo

{ "moveTo",            BotActionMoveTo,            1, 2 }, 

moveToGoal

{ "moveToGoal",        BotActionMoveToGoal,        0, 0 }, 

repair

{ "repair",            BotActionRepair,            0, 0 }, 

resetStuckTime

{ "resetStuckTime",    BotActionResetStuckTime,    0, 0 }, 

roam

{ "roam",              BotActionRoam,              0, 0 }, 

roamInRadius

{ "roamInRadius",      BotActionRoamInRadius,      2, 2 }, 

rush

{ "rush",              BotActionRush,              0, 0 }, 

say

Make the bot say something.

Arg 1: text to say Arg 2: whom to say it to

Arg 2's possible values:

  • SAY_ALL: say text to everyone on server
  • SAY_ALL_ADMIN: say text to admins present on map
  • SAY_TEAM: say text to the team
  • SAY_RAW: logs only, should not be used since bots are clients

Following values may not be handled (unsure):

  • SAY_PRIVMSG
  • SAY_TPRIVMSG
  • SAY_AREA
  • SAY_AREA_TEAM
  • SAY_ADMINS
  • SAY_ADMINS_PUBLIC
  • SAY_ALL_ME
  • SAY_TEAM_ME
  • SAY_DEFAULT

Values extracted from `enum saymode_t`, in `Unvanquished/src/shared/bg_public.h`. Please edit this to add more details, or even more examples.

Example:

 action say( "hello world", SAY_ALL )

strafeDodge

{ "strafeDodge",       BotActionStrafeDodge,       0, 0 }, 

suicide

{ "suicide",           BotActionSuicide,           0, 0 },