Re: May I make a suggestion?
I had a quick look at base.rte/Actors/AI/...
There is a file called HumanAI.lua which, after looking inside, seems to handle when to reload.
For example at row 145:
Code:
function self:CreateSuppressBehavior()
if self:EquipFirearm(true) then
self.NextBehavior = coroutine.create(HumanBehaviors.ShootArea)
self.NextBehaviorName = "ShootArea"
else
if self.FirearmIsEmpty then
self:ReloadFirearm()
end
return
end
one could add before or after "self:ReloadFirearm()" something like this and see what happens:
Code:
local z = math.random();
if z > 0.70 then
<whatever is called to switch weapons>
I guess you'd have to add it everywhere where you find the ReloadFirearm()-call.
But I never modded CC or even programmed in lua. This is just guesswork based on some programming knowledge...
Edit:
Now I somehow want to try it...
What is called to let the AI switch weapons?