Functions (Behaviour) - ShadowBonnieRUS/GMOD-SB_Advanced_Nextbots_Base GitHub Wiki
Here are descriptions for functions used in base in behaviour.lua
file.
✏️🔹 NEXTBOT:BehaveStart
Creating behaviour thread using NEXTBOT:BehaviourCoroutine. Also setups task list and default tasks.
✏️🔹 NEXTBOT:BehaveUpdate
This is where bot updating. Called from engine to process AI logic.
🔹 NEXTBOT:BehaviourCoroutine
Override this function to control bot using coroutine type.
Arguments: 0
Returns: 0
🔹 NEXTBOT:DisableBehaviour
Decides should behaviour be disabled.
Arguments: 0
Returns: 1
- bool | Return true to disable.
🔹 NEXTBOT:BehaviourThink
Override this function to control bot using think type.
Arguments: 0
Returns: 0
🔹 NEXTBOT:BehaviourPlayerControlThink
Override this function to control bot with player.
Arguments: 1
- Player | Player who controls bot
Returns: 0
🔹 NEXTBOT:CapabilitiesAdd
Adds a capability to the bot.
Arguments: 1
- number | Capabilities to add. See CAP_ Enums.
Returns: 0
🔹 NEXTBOT:CapabilitiesClear
Clears all capabilities of bot.
Arguments: 0
Returns: 0
🔹 NEXTBOT:CapabilitiesGet
Returns all capabilities including weapon capabilities.
Arguments: 0
Returns: 1
- number | Capabilities. See CAP_ Enums.
🔹 NEXTBOT:CapabilitiesRemove
Removes capability from bot.
Arguments: 1
- number | Capabilities to remove. See CAP_ Enums
Returns: 0