Debriefing > Questions, Help, & How To's
Change Bots Target Priorities
markpeterjameslegg:
This question is really aimed at KM, as he is probably the only one that can answer me, though correct me if I'm wrong of course. I was wondering if there is any console command to make myself the only target for bots in deathmatch, so essentially all bots against me. This would be really fun, it would be like when you let the KF7 rip in Facility and all the guards would come running.
TriDefiance:
As KM stated before, he will be adding more features to the AI system. A command that let's all the bots go after you is currently not in 4.2, put I'm pretty sure he'll but it eventually. As for now, just play free for all! :)
killermonkey:
You will need to edit the bot's script, which is not hard at all.
Open up "gesource/scripts/python/Ai/bot_deathmatch.py"
Scroll down to line 55, you'll see a function called "IsValidEnemy( self, enemy ):"
Change the contents of that function to:
--- Code: ---
def IsValidEnemy( self, enemy ):
myteam = self.GetTeamNumber()
if myteam != Glb.TEAM_NONE and enemy.GetTeamNumber() == self.GetTeamNumber():
return False
if enemy.IsNPC():
return False
return True
--- End code ---
The problem with this, however, is the bots will still target other NPC's as enemies through the "Seek Enemy" routine. But we can fix that too.
Open up "gesource/scripts/python/Ai/Tasks/CommonTasks.py"
Go to line 15, add this right below the part that says "for contact in contacts:"
--- Code: ---
if contact["ent_handle"].Get().IsNPC():
continue
--- End code ---
Remember in Python, indentation MATTERS.
markpeterjameslegg:
Thanks a lot KM, really nice of you to do that. Can't wait to try this, I reckon it'll be great fun. :)
killermonkey:
I made a small typo in the second part. It should be contact["ent_handle"], not c["ent_handle"]
Navigation
[0] Message Index
[#] Next page
Go to full version