Author Topic: [Event] onBotTarget, onBotLoseTarget, onBotNewTarget  (Read 4899 times)

Simple input events:

onBotTarget - This is called when the loop of the bot gets called, it's usually called every 3 seconds unless a custom bot has a different tick rate.
onBotLoseTarget - Called when the bot loses their last target, this is also called when the bot finds a new target
onBotNewTarget - Called when the bot finds a new target
None of these get called if the bot is dead.

Event_onBotTarget
Tags: Bot, target, onBotTarget, onBotSight

how does bot targeting work

it's definitely not line-of-sight

When hLoop is called, it tracks the target and see if it's in the bot's FOV, the parent is called first to see if we got a new target, or we lost the target.


man like this is a seriously useful addon but im struggling to think of specific situations where i'd use it


man like this is a seriously useful addon but im struggling to think of specific situations where i'd use it

OnBotTarget - Bot - playsound [EnemySpotted.wav]

OnBotTarget - Bot - playsound [EnemySpotted.wav]
I forgot to mention that there's a bit of arguments for the input events

Self - The brick
Bot - The bot
Target_Player - The target, if it's a player
Target_Bot - The target, if it's a bot
Target_Client - The target's client, if it has one
Client - The brick's client
Minigame - The brick's minigame

When I was testing this I did something like
[X] ["0"] ["onBotNewTarget"] ["Target_Client"] ["CenterPrint"] ["I SEE YOU %1<br><bitmap:add-ons/face_default/asciiTerror>"]
« Last Edit: April 05, 2016, 07:40:13 PM by Kyuande »

OnBotTarget - Bot - playsound [EnemySpotted.wav]
haha that's perfect actually

also, the brick's client?

Could you add namedbrick as a target? If you already have Self then you may as well. Would be helpful for stuff like locking rooms if you get detected by a bot or setting off alarms.

Sweet addon! We need more events that add to the bot functionality.

also, the brick's client?
It's whoever owns the brick

Could you add namedbrick as a target? If you already have Self then you may as well. Would be helpful for stuff like locking rooms if you get detected by a bot or setting off alarms.

Sweet addon! We need more events that add to the bot functionality.
Named brick should already be included because that's on every input event, it's default. Thank you.

It's whoever owns the brick
Named brick should already be included because that's on every input event, it's default. Thank you.
oh gotcha

how does bot targeting work

it's definitely not line-of-sight
search radius event kinda

Can we slow down a bot's turn speed? Just so we can sneak past them easier
OT: love this, i can't wait to see a B.O.S.S style gamemode with bots.

Can we slow down a bot's turn speed? Just so we can sneak past them easier
I can make this a separate add-on