Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

Custom Bot Target AI Script (How?)

Share questions, scripts and tutorials related to the ScriptAPI in SFD.
Forum rules
By using the forum you agree to the following rules.
Post Reply
User avatar
Proxmin-O
Fighter
Fighter
Posts: 21
Joined: Fri Jul 27, 2018 5:07 am
SFD Account: Proxmin
Started SFD: August 2016

Custom Bot Target AI Script (How?)

Post by Proxmin-O » Thu Mar 18, 2021 11:04 am

I can't figure it out how to put SetTargetAI and GetTargetAI script ( Medic Cabinet and Ammo stash for example) in my map, im making a remastered Tf2 Map (and others) that i made last year.

Thing that i want to make it work.

-When Bot ran out of Ammo and or needs some Health, it goes where the Activate or Button Triggers with specific Custom ID.

(I already made a script that when entering in AreaTrigger, it presses the button without losing its behaviour, it works with all types of bot behaviours as well).

Thank you for responses if any. :D
0 x
"Spriting at it's finest"

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1884
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 34

Post by Gurt » Thu Mar 18, 2021 6:27 pm

SetTargetAI SetTargetAIEnabled on objects allows bots to > attack < that target.
SetForcedBotTarget on a player will force it to attack the specified target.

If you want the bot to move to a specific spot you must do something similar like we did in the Joker bossfight where the boss runs to a doorway.

It's a lot of micro management to get a bot to do exactly like you want. Once they reach your desired spot you can force them to "press" a certain button using player commands.
1 x
Gurt

User avatar
Proxmin-O
Fighter
Fighter
Posts: 21
Joined: Fri Jul 27, 2018 5:07 am
SFD Account: Proxmin
Started SFD: August 2016

Post by Proxmin-O » Fri Mar 19, 2021 5:41 am

seems i overthinking alot heeheheh, thank you again :)
0 x
"Spriting at it's finest"

Post Reply