Awesomenauts Wiki
Advertisement

Click here to return to the AI Editor main page.

Operators[ | ]

These operators are listed in the "Other" branch of the behavior blocks tree.

In order to attach blocks that you want to be required for the operator to return "yes" so that it may continue, press space twice. This will make it dotted. Then, attach it to a condition block.

And[ | ]

When ALL the conditions attached under it are true, then the next block in the code will execute. However, if the conditions aren't fulfilled, it will go down the else line.


Ss (2014-06-05 at 09.37.16)

Or[ | ]

When any one or more of the conditions attached under it are true, then the next block in the code will execute. However, if the conditions aren't fulfilled, it will go down the else line.

Ss (2014-06-05 at 09.41.56)

Sequence[ | ]

When you attach things to a sequence blocks normally, the following blocks will work in a sequence, one at a time. So, a timer set to .20 seconds and a aimStickAtTarget set for .10 seconds, the whole sequence would last a total of .30 secs. "Is Blocking", when set to yes, will prevent any other code from executing while the sequence is running.

Example: The following sequence would last a total of 4.1 seconds.

Ss (2014-06-05 at 09.57.06)

Actions[ | ]

Actions behave much like functions in programming, in that they actually 'do' or modify something within the game.

adjustCounter[ | ]

Creates or modifies a counter with id as identifier and changes the value.

Arguments

  • id (The name of the id that the value will bet set to or changed)
  • value (The name of the counter or the modification value depending on the adjust method)
  • adjust method
    • add
    • divide
    • multiply
    • set (default)

Arithemetic

adjustCounter supports some binary arithmetic operators, which can use numbers or counters as arguments. Below is a list of supported operators.

  • + (addition)
  • - (subtraction)
  • * (multiplication)
  • / (division)
  • ^ (exponentiation)

adjustCharacterValue[ | ]

Sets or changes the character's health or solar. Uses the same adjust methods as adjustCounter.

Arguments

  • property
    • gold
    • goldWithoutXp
    • health (default)
    • health percentage
  • value
  • adjust method
    • add
    • divide
    • multiply
    • set (default)

adjustMissionCounter[ | ]

Adjusts a counter variable used for achievment tracking. This is used primarily for unlocking achievements, and can be ignored.

Arguments

  • id
  • value
  • adjust method
    • add
    • divide
    • multiply
    • set (default)

aimStickAtTarget[ | ]

This will point the bot's aiming towards the current target.

Arguments

  • duration seconds (smaller values, such as 0.01, are less accurate; 0.1 and above can be used for maximum accuracy)
  • only aim when needed (default: no)
  • use rotation speed limits (default: no)
  • min rotation speed per second in degrees
  • max rotation speed per second in degrees
  • use min rotation speed when angle to target under
  • use max rotation speed when angle to target over

buyUpgrade[ | ]

Buys the specified upgrade.

Arguments

  • upgrade name

completeMission[ | ]

Unlocks an achievement. This is used primarily for unlocking achievements, and can be ignored.

Arguments

  • delay
    • INSTANT (default)

enableUpgrade[ | ]

This is a condition that requires the user to have the specified upgrade.

Arguments

  • condition (default: yes)
  • upgrade name

emitMessageInArea[ | ]

Emits a message invisible to players that bots can receive with receivedMessage.

Arguments

  • id
  • receive groups
    • PLAYERS
    • CREEPS
  • teams
    • OWN_TEAM
    • ENEMY_TEAM
    • NEUTRAL_TEAM
    • TARGET
  • xOffset
  • yOffset
  • width
  • height
  • horizontal alignment to character
  • vertical alignment to character
  • debugAreaColour
  • ignore invisibility
    • no
    • yes (default)
  • check line of sight
    • no (default)
    • yes

emitTargetInArea[ | ]

If the AI has a target, it will be emitted in a specified area.

Arguments

  • receive groups
    • PLAYERS
    • CREEPS
  • teams
    • OWN_TEAM
    • ENEMY_TEAM
    • NEUTRAL_TEAM
  • xOffset
  • yOffset
  • width
  • height
  • horizontal alignment to character
  • vertical alignment to character
  • debugAreaColour

executeBehaviorTree[ | ]

Executes the behavior blocks inside of an external file. This is typically used to call GeneralAI and other functions. If you are calling a file that you created (for example: a modified version of GeneralAI), that file must be in the BehavioursCustom folder.

Arguments

  • fileName

generateLoadout[ | ]

Generates a loadout for a specific character.

Arguments

  • isTutorial
    • no (default)
    • yes
  • className (default:"cowboy")

lockPlayerInput[ | ]

Prevents (or allows if shouldLock is set to no) the player from making inputs with the controller.

Arguments

  • shouldLock
    • no (default)
    • yes

NOTICE: If lockPlayerInput is enabled, button presses can still be checked by isButtonDown.

lockPlayerInputSpecificButtons[ | ]

Prevents (or allows) one or more inputs from being used by the player.

Arguments

  • shouldLock
    • no (default)
    • yes
  • buttons to (un)lock
    • ABT_BACK
    • ABT_START
    • ABT_CONFIRM
    • ABT_CANCEL
    • ABT_SHOULDER_LEFT
    • ABT_SHOULDER_RIGHT
    • ABT_TRIGGER_LEFT
    • ABT_TRIGGER_RIGHT
    • ABT_UP
    • ABT_DOWN
    • ABT_LEFT
    • ABT_RIGHT
    • ABT_FACE_TOP
    • ABT_FACE_BOTTOM
    • ABT_FACE_LEFT
    • ABT_FACE_RIGHT
    • ABT_UP_2
    • ABT_DOWN_2
    • ABT_LEFT_2
    • ABT_RIGHT_2
    • ABT_DOWNJUMP
    • ABT_TOGGLE_JUMP_SKILL
    • ABT_GAME_COMMAND_UP
    • ABT_GAME_COMMAND_RIGHT
    • ABT_GAME_COMMAND_DOWN
    • ABT_GAME_COMMAND_LEFT
    • ABT_OPEN_PAUSE_MENU
    • ABT_CLOSE_PAUSE_MENU
    • ABT_OPEN_SHOP
    • ABT_CLOSE_SHOP
    • ABT_TOGGLE_SCOREBOARD
    • ABT_OPEN_CHAT
    • ABT_SHOW_PROFILE
    • ABT_MUTE_PLAYER

NOTICE: Buttons locked by lockPlayerInputSpecificButtons cannot be checked by isButtonDown.

missionGetScore[ | ]

Can store the number of a player's kills, deaths or creep kills in a counter variable. This is used primarily for unlocking achievements, and can be ignored.

Arguments

  • class
  • team
    • ENEMY_TEAM
    • NEUTRAL_TEAM
    • ONE_TEAM
    • OWN_TEAM (default)
    • ZERO_TEAM
  • type
    • CREEPKILLS
    • DEATHS
    • KILLS (default)
  • store in

log[ | ]

Adds a message to the log. This message can be seen when using the F4 debugger. Useful for figuring out which parts of the AI are executing. Can include bool and counter variables.

Arguments

  • text
  • counter
  • bool

pauseGame[ | ]

playAnimation[ | ]

Play an animation.

Arguments

  • animationName (You can find a list of all animation here. Some animations may not work.)
  • location
    • FOLLOW_CHARACTER (The animation will follow the character. You can't change the xPosition or yPosition with this option selected)
    • HUD
    • START_RELATIVE_TO_CHARACTER (The animation will appear at the character position but will stay in place)
    • WORLD
  • dummyToFollow (Centers animation on various attachment positions when used with FOLLOW_CHARACTER. PlayAnimation needs to be in AI defined by extraAIToAddToPlayerCharacters for attaching to players.)
    • GUN
    • VISUALCENTRE
    • SHIFTERHEAD (Only works with Ix)
  • xPosition
  • yPosition
  • scale (If set to 0, the animation will be invisible)
  • depth
  • mirrorX
    • no
    • yes
  • team (This is used to get the color of the animation and has no effect on who can see it)
    • ENEMY_TEAM
    • NEUTRAL_TEAM
    • OWN_TEAM
  • addOverlayPrefix
    • no
    • yes
  • allowRotating
    • no
    • yes
  • textReplace1TextID
    • text (Works with the animations tutorial_textbox, tutorial_objectives, and others)
    • effectvalue (Works with the animation effectvalue_being_damaged and others)
    • GoldCount (Works with the animation UI_GoldCounter)
  • textReplace1Replacement (String to insert in place of textID)
    • [COLOUR:Alert]Replacement text[/COLOUR] (The colour tags are not needed but allow changing text color to various internal IDs)
  • textReplace1ReplacementIsLocalizationID
    • no (This option allows you to insert arbitrary text at the textID location)
    • yes
  • textureReplace1VisualName
    • portrait (Works with the animation tutorial_textbox)
    • texture (Works with the animation m_backgroundimage_texture and others)
  • textureReplace1ReplacementName
    • (mod) TextureName (the mod prefix is only used with custom textures)

playSound[ | ]

Play a sound.

Arguments

  • soundGroup (You can find a list of soundGroup here)
  • forcePlay
    • no
    • yes

pressButton[ | ]

This will "press" the given button. Controls attack and movement

Arguments

  • button
    • BACK
    • DPAD_DOWN (Default: help command)
    • DPAD_LEFT (Default: defend command)
    • DPAD_RIGHT (Default: attack command)
    • DPAD_UP (Default: taunt command)
    • FACE_BOTTOM (Default: jump)
    • FACE_LEFT (Default: auto attack)
    • FACE_RIGHT (Default: "right click" attack)
    • FACE_TOP (Default: "middle click" attack)
    • SHOULDER_LEFT (Default: Fall down)
    • SHOULDER_RIGHT (Default: teleport)
    • TRIGGER_LEFT
    • TRIGGER_RIGHT
  • duration in seconds (If set to 0 the button will be released.)

pressStick[ | ]

This will "press the stick" in a given direction. Controls movement.

Arguments

  • direction
    • UP, DOWN, LEFT, RIGHT
    • BACKWARD (Towards the allied base)
    • FORWARD (Towards the enemy base)
  • Duration (seconds)

randomizeMissionCounter[ | ]

Picks a random number and sets it to a mission counter. This is used primarily for unlocking achievements, and can be ignored.

Arguments

  • id
  • low
  • high

receiveTarget[ | ]

When called, if a target is emitted with emitTargetInArea, and the AI is in the specified area, it will receive the emitted target.

resetMissionVariables[ | ]

Resets all mission counter and mission bool variables. This is used primarily for unlocking achievements, and can be ignored.

removeTarget[ | ]

Removes the AI's current target.

selectDestWaypoint[ | ]

Selects a waypoint by name and sets it as it's destination waypoint.

Arguments

  • name
  • team
    • ENEMY_TEAM (default)
    • OWN_TEAM

selectTarget[ | ]

Selects a target for the AI in the given area.

Arguments

  • groups to select
    • PLAYERS, CREEPS, DESTROYABLE OBSTACLES
  • teams
    • OWN, ENEMY, NEUTRAL
  • class
  • xOffset
  • yOffset
  • width
  • height
  • horizontal alignment to character
  • vertical alignment to character
  • debugAreaColour
  • compare method (compares target with health value)
    • equal, greater, greater or equal, highest, less, less or equal, lowest
  • health value
  • distance check
    • NONE, CLOSEST, FURTHEST
  • check line of sight
    • (from own perspective, e.g. own turrets and teamwalls do not block line of sight, although enemy ones will)
  • ignore invisibility

selectPingWaypoint[ | ]

Sets the Waypoint closest to the ping as the destination Waypoint.

Arguments

  • ping
    • ATTACK (Default; "An ally commands you to attack")
    • BASE_ALMOST_DESTROYED ("Your base is almost destroyed")
    • BASE_UNDER_ATTACK ("Your base is under attack")
    • DEFEND ("An ally commands you to defend")
    • HELP ("An ally requests help")
    • TURRET_ALMOST DESTROYED ("Your turret is almost lost")
    • TURRET_UNDER_ATTACK ("Your turret is under attack")

selectTargetWaypoint[ | ]

Sets the Waypoint closest to the current target as the destination Waypoint

setBool[ | ]

Creates or changes the value of a particular boolean value with a specific ID.

Arguments

  • id (The name of the id being set or modified)
  • value (can be set to a particular value or toggled to it's opposite value)
    • no (default)
    • toggle
    • yes

setMissionBool[ | ]

Sets or modifies a bool variable used for achievment tracking. This is used primarily for unlocking achievements, and can be ignored.

Arguments

  • id (The name of the id being set or modified)
  • value (can be set to a particular value or toggled to it's opposite value)
    • no (default)
    • toggle
    • yes

spawnCharacter[ | ]

Creates an entity and places it in a specified node

Arguments

  • className
  • aiFileName
  • team
    • ENEMY_TEAM
    • NEUTRAL_TEAM
    • ONE_TEAM
    • OWN_TEAM (default)
    • ZERO_TEAM
  • count
  • spawnPositionNodeID
  • spawnPositionNodeOffsetX
  • spawnPositionNodeOffsetY

startCameraSequence[ | ]

Move the camera to each specified named area.

Arguments

  • areaNames (A list of named area separated by a space)
  • transitionTimes (The speed to move from one area to the other separated by a space. It's strongly recommended to set the first transition time to 0 to prevent a strange zoom-in effect)
  • holdTimes (The time the camera need to stay at each named area separated by a space)
  • cameraHeights (The height of the camera at each named area separated by a space)

Example

stopSound[ | ]

triggerSkill[ | ]

Arguments

  • skillSettingsIdentifier
  • triggerDuration

wait[ | ]

Waits for a specified amount of time before continuing to the next block/returning true. Note: this block only does anything when used with a sequence block. Outside of that, wait does nothing.

Arguments

  • time (The duration of the wait in seconds)

writeToTextBox[ | ]

Conditions[ | ]

Conditions can return either "yes" (true) or "no" (false).

areGoldCoinsInArea[ | ]

Checks the amount of solar in the area around the character. If the comparison is true, this condition returns yes.

Arguments

  • compare value
  • compare method
    • equal
    • greater
    • greater or equal (default)
    • less
    • less or equal
  • xOffset
  • yOffset
  • width
  • height
  • horizontal alignment to character
  • vertical alignment to character
  • debugAreaColour
  • check line of site: (default: no)

branch[ | ]

Used to organize the AI, will always return yes.

canPayUpgrade[ | ]

Returns yes if a referenced upgrade can be purchased.

Arguments

  • upgrade name

checkCharacterFlag[ | ]

Checks if whether or not either itself or it's target is under a crowd control effect. Returns yes if the comparison is true.

Arguments

  • property
    • isBlinded
    • isSilenced
    • isSlowed
    • IsStealth
    • isStunned
    • isUnderAnyEffect (default)
  • condition
    • no
    • yes (default)
  • check on
    • self (default)
    • target

checkCharacterValue[ | ]

Checks the health, solar, or AI level of either itself or it's target using a certain method. If the comparison is true, this condition returns yes.

Arguments

  • property
    • AI skill
    • gold
    • health (default)
    • health minus dot
    • health minus dot percentage
    • health percentage
  • value
  • compare method
    • equal (default)
    • greater
    • greater or equal
    • less
    • less or equal
  • check on
    • self (default)
    • target

checkClass[ | ]

Returns true if either this character or it's target is a particular 'naut.

Arguments

  • check on
    • self (default)
    • target
  • class

checkCounter[ | ]

This will check the value of a specified counter. If what you compared to the value of the counter turns out to be true, it will return yes. The value field will accept formulas and other counters as well as static numbers

Arguments

  • ID of counter
  • value
  • compare method (compares the value you input from above to the value of the counter.)
    • equal (default)
    • greater
    • greater or equal
    • less
    • less or equal

checkGameTime[ | ]

Compares the input with the total amount of time passed since the game has started. If the comparison is true, this condition returns yes.

Arguments

  • time in seconds
  • compare method
    • equal (default)
    • greater
    • greater or equal
    • less
    • less or equal

checkMissionCounter[ | ]

This will check the value of a specified mission counter. If what you compared to the value of the counter turns out to be true, it will return yes. This is used primarily for unlocking achievements, and can be ignored.

Arguments

  • ID of counter
  • value
  • compare method (compares the value you input from above to the value of the counter.)
    • equal (default)
    • greater
    • greater or equal
    • less
    • less or equal

checkTurretArea[ | ]

Arguments

  • minimum Count For Success
  • result counter
  • TurretLocations
  • TurretTeams
  • Live Turrets Only
  • surroundingGroups
  • surroundingTeams
  • surroundingClasses
  • count characters out of combat
  • debugAreaColour
  • check line of sight
  • ignore invisibility
  • never detect invisible targets without character collision

compareBools[ | ]

Compares two bools using their ids. If they are equal, this condition returns yes.

Arguments

  • id1 (The first id to compare)
  • id2 (The second id to compare)

compareMissionBools[ | ]

Compares two mission bools using their ids. If they are equal, this condition returns yes. This is used primarily for unlocking achievements, and can be ignored.

Arguments

  • id1 (The first id to compare)
  • id2 (The second id to compare)

doesClassExist[ | ]

Returns yes if a 'naut is being played on a certain team.

Arguments

  • teams
    • OWN_TEAM
    • ENEMY_TEAM
    • NEUTRAL_TEAM
  • class

directionToEnemyBase[ | ]

Returns yes if the user is facing the specified direction towards the enemy base. Example: Leon is on blue team, and facing the red turret. The block specifies that Leon needs to be facing FORWARD, or looking in the direction of his enemy's base, the Red team. The block would return true, because Leon is indeed facing the enemy base. If it helps remember, if you're pushing a lane, you're going FORWARD. Or, even, you have to go FORWARD to attack.

Arguments

  • Direction:
    • Forward (Looking in the direction of the enemy's base)
    • Backward (Looking in the direction of the user's base)

getBoolEquals[ | ]

Compares a bool variable with a bool value. If the comparison is true, this condition returns yes.

Arguments

  • id
  • value (default: no)

getMissionBoolEquals[ | ]

Compares a mission bool variable with a bool value. If the comparison is true, this condition returns yes. This is used primarily for unlocking achievements, and can be ignored.

Arguments

  • id
  • value (default: no)

hasDestWayPoint[ | ]

Returns yes if the AI currently has a waypoint it would like to go to.

hasTarget[ | ]

Returns yes if the user has a set target in mind.

hasUpgrade[ | ]

Returns true if a character has bought an upgrade.

Arguments

  • class
  • team
    • ENEMY_TEAM
    • NEUTRAL_TEAM
    • ONE_TEAM
    • OWN_TEAM (default)
    • ZERO_TEAM
  • upgrade name

NOTICE: For checking self-owned items, use isUpgradeEnabled instead. The hasUpgrade method is best used when checking what upgrades other Awesomenauts have

NOTICE 2: HasUpgrade only checks the host, it can't check other players for upgrades

isAtDestWaypoint[ | ]

This will check to see if the AI has made it to its next waypoint. No arguments.

isButtonDown[ | ]

Checks if a particular button is being pressed. If it is, returns yes/true.

Arguments

  • button
    • BACK
    • DPAD_DOWN (Default: help command)
    • DPAD_LEFT (Default: defend command)
    • DPAD_RIGHT (Default: attack command)
    • DPAD_UP (Default: taunt command)
    • FACE_BOTTOM (default; Jump)
    • FACE_LEFT (Auto attack)
    • FACE_RIGHT (Primary skill)
    • FACE_TOP (Secondary skill)
    • SHOULDER_LEFT
    • SHOULDER_RIGHT
    • TRIGGER_LEFT
    • TRIGGER_RIGHT

isCharacterInArea[ | ]

Returns yes while specified objects are in a given range with the specified conditions. The default position of this range is set around the character but can be offset with xOffset and yOffset. Much like isInArea, but is geared more toward creeps and other players.

Arguments

  • Collision groups
    • Players
    • Creeps
  • class
  • condition
    • AI skill
    • gold
    • health (default)
    • health minus dot(damage over time)
    • health minus dot percentage
    • health percentage
  • comparison
    • equal
    • greater
    • greater or equal
    • less
    • less or equal
    • Character Minimum (minimum amount of total objects/players required to be detected)
  • xOffset
  • yOffset
  • width
  • height
  • horizontal alignment to character
  • vertical alignment to character
  • debugAreaColour
  • check line of site: yes/no
  • ignore invisibility: yes/no

isFromTeam[ | ]

Returns yes if the user is from the specified team.

Arguments

  • Team:
    • enemy
    • neutral
    • one_team(blue team)
    • own_team
    • zero_team(red team)

isInArea[ | ]

Returns yes while specified objects are in a given range. The default position of this range is set around the character but can be offset with xOffset and yOffset.

Arguments

  • condition: yes/no
  • Collision groups
    • Players
    • Creeps
    • Invincible_obstacles
    • Destroyable_obstacles
    • Projectiles
    • Shops
    • Jumppads
  • check green obstacles only: yes/no
  • areaName
  • xOffset
  • yOffset
  • width
  • height
  • horizontal alignment to character
  • vertical alignment to character
  • debugAreaColour
  • check line of site: yes/no
  • ignore invisibility: yes/no

isInNamedArea[ | ]

Returns yes if this character or it's target is in a specific area on the map.

Arguments

  • area name
  • team
    • ENEMY_TEAM
    • OWN_TEAM (default)
  • who
    • self (default)
    • target

isLevelButtonDown[ | ]

Returns yes if specified button is being pressed

  • button

isMissionCompleted[ | ]

isNextWaypointInArea[ | ]

Arguments

  • xOffset
  • yOffset
  • width
  • height
  • horizontal alignment to character
  • vertical alignment to character
  • debugAreaColour

isNextWaypointPosition[ | ]

Checks the AI's target waypoint's position in relation to the AI.

Arguments

  • target postion
    • ABOVE
    • BACK(default)
    • BELOW
    • FRONT
    • HORIZONTAL EQUAL
    • VERTICAL EQUAL

isOnlineMatch[ | ]

Returns yes if this match is being played online. Any match being played outside of practice mode is considered online. It is currently impossible to test a custom bot in a condition in which this logic block returns false.

isOnGround[ | ]

Returns yes when either this character or it's target is on the ground.

Arguments

  • condition (default: yes)
  • check on
    • self (default)
    • target

isOnCreepTurner[ | ]

Returns yes when this character is on a creepTurner and is walking in the right direction.

isPickupAtWaypoint[ | ]

Accepts the following arguments:

  • name: The name of the Waypoint to check (acceptable name: TOPHP, unacceptable: TOPHP_0)
  • team: The team of the Waypoint to check

Returns true when all of the following are fulfilled:

  • The named Waypoint exists
  • The character has an unbroken line of sight to the specified Waypoint
  • There is a Health Pack available at the Waypoint

isPracticeMatch[ | ]

Returns yes if this match is a bot match.

isSkillOnButtonAvailable[ | ]

Returns yes if a certain skill is off of cooldown, and is available to the user.

Arguments

  • button
    • BACK
    • DPAD_DOWN (Default: help command)
    • DPAD_LEFT (Default: defend command)
    • DPAD_RIGHT (Default: attack command)
    • DPAD_UP (Default: taunt command)
    • FACE_BOTTOM (default; Jump)
    • FACE_LEFT (Auto attack)
    • FACE_RIGHT (Primary skill)
    • FACE_TOP (Secondary skill)
    • SHOULDER_LEFT
    • SHOULDER_RIGHT
    • TRIGGER_LEFT
    • TRIGGER_RIGHT

isTargetInArea[ | ]

Returns yes while user's target can be found within a specific range.

Arguments

  • condition: yes/no
  • xOffset
  • yOffset
  • width
  • height
  • horizontal alignment to character
  • vertical alignment to character
  • debugAreaColour
  • check line of site: yes/no
  • ignore invisibility: yes/no

isTargetInSkillRange[ | ]

Arguments

  • condition: yes/no
  • skillSettingsIdentifier
  • rangeFractionToSucceed
  • debugAreaColour
  • check line of sight
  • ignore invisibility
  • never detect invisible targets without character collision

isTargetPosition[ | ]

Checks the AI's target's position in relation to the AI.

Arguments

  • condition:yes/no
  • target postion
    • ABOVE
    • BACK(default)
    • BELOW
    • FRONT
    • HORIZONTAL EQUAL
    • VERTICAL EQUAL

isTargetType[ | ]

Returns yes if the user's target is one specified.

Arguments

  • Target Groups
    • Players
    • Creeps
    • Destroyable Obstacles

isTurretInArea[ | ]

Returns yes while a turret is in a given range. The default position of this range is set around the character but can be offset with xOffset and yOffset.

Arguments

  • teams
    • own
    • enemy
    • neutral
  • health comparison
    • equal
    • greater
    • greater or equal
    • less
    • less or equal
  • health
  • xOffset
  • yOffset
  • width
  • height
  • horizontal alignment to character
  • vertical alignment to character
  • debugAreaColour
  • check line of site: yes/no

isTutorialMatch[ | ]

Returns yes if the tutorial is being played.

isUpgradeEnabled[ | ]

Returns yes when a specified upgrade is owned by the AI. See the upgrade names spreadsheet for a list of upgrade names.

Arguments

  • condition (default: yes)
  • upgrade name

once[ | ]

Returns yes when first called. Returns no every time afterward.

onGameStarted[ | ]

onGoldCollected[ | ]

onGoldSpent[ | ]

onKill[ | ]

onPrestige[ | ]

onWin[ | ]

random[ | ]

This generates a random number every time it is checked, between 1 to whatever the user puts in as the amount, inclusive. If the generated number is 1, returns yes. Example: putting in 4 as the amount would yield a 25% chance for the block to return yes every time it is checked.

Arguments

  • amount

receivedMessage[ | ]

Returns yes if a message has been received from emitMessageInArea.

Arguments

  • id

receivedPing[ | ]

Returns yes when a certain in game message has been broadcasted.

Arguments

  • ping
    • ATTACK (Default; "An ally commands you to attack")
    • BASE_ALMOST_DESTROYED ("Your base is almost destroyed")
    • BASE_UNDER_ATTACK ("Your base is under attack")
    • DEFEND ("An ally commands you to defend")
    • HELP ("An ally requests help")
    • TURRET_ALMOST DESTROYED ("Your turret is almost lost")
    • TURRET_UNDER_ATTACK ("Your turret is under attack")

receivedTarget[ | ]

returns yes if a received target corresponds with a ticked argument

Arguments

  • if of group
    • Players
    • Creeps
    • Destroyable_obstacles

timePassed[ | ]

timer[ | ]

This condition sets a timer that returns no until a certain amount of time. Once that time has passed, it returns yes and the timer resets. If a timer exists in a behavior tree which does not get called every tick, a timer can become "frozen" in place. For this reason, timers should only be used in top level behavior trees and called behavior trees that are executed every tick. Freezing example: A behavior tree is called using executeBehaviorTree every third tick, a timer inside of the called behavior tree would take three times longer to trigger than one at the top level behavior tree or a called behavior tree that loads every tick.

Arguments

  • timeunit
    • hours
    • milliseconds
    • minutes
    • seconds (default)
  • time
  • execute first time
Advertisement