Operation Flashpoint Dragon Rising OFDR Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work?

3 posters

Go down

How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work? Empty How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work?

Post by Guest Mon 17 Dec 2012, 18:29

MOVED THIS HERE FOR YOU!

here's my question:

How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work? Does it make the AI less accurate with their weapons and if so, which way around is it? Does 'OFF' make them completely accurate, 'NORMAL' = well.... normal and 'FORCED' = can't hit a barn door at 10 paces?

Thanks

RC
Anonymous
Guest
Guest


Back to top Go down

How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work? Empty Re: How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work?

Post by TheGeneral Mon 17 Dec 2012, 22:37

RockCop wrote:MOVED THIS HERE FOR YOU!

here's my question:

How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work? Does it make the AI less accurate with their weapons and if so, which way around is it? Does 'OFF' make them completely accurate, 'NORMAL' = well.... normal and 'FORCED' = can't hit a barn door at 10 paces?

Thanks

RC

I'm not sure on this one mate, I haven't used it before.
TheGeneral
TheGeneral
Admin

Points : 780
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work? Empty Re: How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work?

Post by Guest Mon 17 Dec 2012, 23:35

Ditto on that. I've never messed with this one either. I know they address it in the editor help file so I'd give that a quick look for more info. Your assumptions seem like they would be correct though. Sorry I can't be more help with it.

cheers Very Happy
Anonymous
Guest
Guest


Back to top Go down

How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work? Empty Re: How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work?

Post by Guest Tue 18 Dec 2012, 18:14

Here's what it says in the help file:

---------------------------------------------------------------------------------------------------
setAIInaccuracy(EntityName, value)

Turn the AI inaccuracy code on or off for a given entity. Defaults to on, the state is saved and restored for saved games. When enabled the min dispersion code and ballistic inaccuracy aim adjustments are used.

EntityName: The unit to set the flag on.
Value: true or false, enable or disable AI inaccuracy
----------------------------------------------------------------------------------------------------

Notice it says the value is true or false. This doesn't really make sense and on SAR's wiki, which contains the unlisted commands (and which I no longer have access to Crying or Very sad ) it says the values are OFF, NORMAL and FORcED. This makes more sense.

I'll try to do some experimenting and let you know what happens...

Anonymous
Guest
Guest


Back to top Go down

How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work? Empty Re: How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work?

Post by tjdagger Wed 19 Dec 2012, 03:34

OK, so this is what I did.
(I'm using EdX BTW)
I placed a player and an enemy solider with an echelon on the map facing each other.

Code:
function onMissionStart()
   hit = 0
end

function numpad3()
   if OFP:isInvulnerable("echeloni22") then
      OFP:setInvulnerable("echeloni22",false)
      OFP:displaySystemMessage("NOT Invulnerable")
   else OFP:setInvulnerable("echeloni22",true)
      OFP:displaySystemMessage("Invulnerable")
   end
end

function numpad4()
--   OFP:setArmy("echeloni22",2)
   OFP:setAIInaccuracy("ip17pllmgi1","OFF")
   OFP:displaySystemMessage("AI accuracy OFF")
end

function numpad5()
--   OFP:setArmy("echeloni22",2)
   OFP:setAIInaccuracy("ip17pllmgi1","NORMAL")
   OFP:displaySystemMessage("AI accuracy NORMAL")
end

function numpad6()
--   OFP:setArmy("echeloni22",2)
   OFP:setAIInaccuracy("ip17pllmgi1","FORCED")
   OFP:displaySystemMessage("AI accuracy FORCED")
end

function onHit(victim, attacker)
   if victim == "tjdagger" then   
      hit = hit + 1
      OFP:displaySystemMessage("hit = "..hit)
   end
end

using this code I was able to make myself invulnerable (pressing3) and by pressing 4,5 or 6 I could switch the AI accuracy settings as desired.

CONCLUSIONS from observation...
OFF = very accurate most consistent hits, possibly Highest config settings
NORMAL = AI accuracy config settings based on current multiplier effects
FORCED = Lowest minimum config settings without any multipliers effect

AI accuracy multipliers include things like unit Stance (crouching, standing, prone), Time of Day etc.

A potential use may be, to use onIdentified to adjust AI accuracy.
Consider this...
Spawn an enemy inside a building... set his AI accuracy to FORCED. Upon Identifying an enemy his AI accuracy is set to NORMAL 3 sec after the fact.
Logic...
A player could sneak up to a building and kick the door in, doing a rush attack with a 3 sec window where the enemy are too taken by surprise to zip around and drop you as they tend to do.

These setting would appear to lend themselves to act as an adjustable, unit/group specific "Hardcore", "softcore", "Normal" setting. The same entity set could be spawned but with a different associated "difficulty" each time.
i.e the super accurate special forces guys may come after ya now. Where as those last lot of new recruits couldn't hit the side of a barn.

tjdagger
Admin

Location : Silverdale, Queensland, Australia
Points : 107
Reputation : 7
Join date : 2012-12-17
Age : 48

Back to top Go down

How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work? Empty Re: How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work?

Post by John J. Stevens Wed 19 Dec 2012, 19:59

Good to here about the testing you did.

I have used INACCURACY() to add to the chaos faction of warfare. I have never been a strong believer that in the heat of battle everyone is a crack shot but then again I have never been shot OR in the heat of battle.

Personally, I think the INACCURACY() feature adds a nice level of dramatic effect to a mission without the commitment/modification to the AICONFIG or initialization features of the UAI.

It is probably the closest we can get to to throttling the accuracy realtime in mission, until we figure something else out.
John J. Stevens
John J. Stevens
Admin

Location : WV/PA
Points : 285
Reputation : 22
Join date : 2012-12-19

Back to top Go down

How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work? Empty Re: How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work?

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum