Page 1 of 1

Controll how AI uses weapons

Posted: Fri Dec 14, 2018 11:10 am
by Benoz
Sorry for the question because I know it was already asked. I searched almost 30 min but I couldn't find the post.
How do you controll how often the AI uses a specific weapon?

I gave my sniper an invisibility weapon as an award weapon and now every AI sniper is running around switching between the sniper and the invisibility weapon non stop.
I just want him to go with the sniper and never/only now and then use the other weapon.

Thanks in advance. Post can be deleted after solving.

Re: Controll how AI uses weapons

Posted: Fri Dec 14, 2018 4:51 pm
by Robobermann
These define when the AI are allowed to use a specific weapon. When set to zero, they will not use the weapon under those conditions:

Code: Select all

AITargetPerson			= "0"
AITargetAnimal			= "0"
AITargetDroid			= "0"
AITargetVehicle			= "0"
AITargetBuilding		= "0"

Re: Controll how AI uses weapons

Posted: Fri Dec 14, 2018 6:57 pm
by Benoz
I asume this goes to the weapons ODF?
Can you control it with a precentage of e.g. AITargetPerson = 0.3 or is it absolute?

Re: Controll how AI uses weapons

Posted: Sat Dec 15, 2018 7:55 am
by giftheck
It'll be an absolute 0/1 entry.

Re: Controll how AI uses weapons

Posted: Sat Dec 15, 2018 5:15 pm
by AQT
You can also set the ranges of the weapon to 0, like the stock trishot:

Code: Select all

MinRange        = "0"
OptimalRange        = "0"
MaxRange        = "0"
That's why the Super Battle Droids never use it, but humans players can.

Re: Controll how AI uses weapons

Posted: Mon Dec 17, 2018 5:04 am
by Benoz
Thanks for the information AQT, but it seems this trick only works when the weapon is not in the WeaponChannel = 1.
I want the stealth ability to be a secondary weapon. With that the sniper just chills back and spams the invisibility weapon over and over.