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.

Make certain IObjects hostile to bots

Give us your input on how we may improve the ScriptAPI in the game in future versions.
Forum rules
By using the forum you agree to the following rules.
Post Reply
Posts: 89
Joined: Thu Feb 07, 2019 4:36 am

Make certain IObjects hostile to bots

Post by NearHuscarl » Wed Feb 26, 2020 12:52 pm

Currently bots only attack other players and streetsweepers that are not in the same teams, all other objects are neutral. I am making an auto turret that will be belonged to a certain team, bots will not attack it because it's just a combination of other objects that normally deems no threat to them. So it would be nice to have some sort of APIs to make the bots aware that they are a threat like the streetsweepers. Something like:

Code: Select all

IObject doorComponent = // Create game object
doorComponent.BelongsTo = Owner.Team1;

// Indicate that this is just a passive object that belongs to other teams.
// Bots don't have to actively hunt down it, should not waste ammo on it,
// but will destroy it when it's convenient to them
doorComponent.ThreatLevel = ThreatLevel.Low;

IObject turretComponent = // Create game object
turretComponent.BelongsTo = Owner.Team1;

// Indicate that this is an object that may deal damages to other players.
// Bots will actively hunt down it and treat it like other players and streetsweepers
turretComponent.ThreatLevel = ThreatLevel.High;

public enum Owner
3 x

User avatar
Posts: 10
Joined: Sun Jan 08, 2017 10:31 am
SFD Account: xdhoomy12x
Started SFD: 1.3.3
Location: ksa

Post by xdhoomy12x » Mon Jun 15, 2020 10:31 am

i have a similar problem i made a custom map that has a ladder so humans can hide from zombies but bot humans dont know they need to shoot the padlock to unlock the ladder
1 x

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

Post by Gurt » Fri Jun 19, 2020 9:17 pm

The path grid only allows for bots to understand how to press buttons. So if you make your ladder extendable using buttons it could be a work-around. This is how bots can call for elevators when the elevator is not around.
Otherwise I have plans to make some sort of hostile tile for bots in some way.
0 x

Post Reply