How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work?
3 posters
Operation Flashpoint Dragon Rising OFDR Forums :: OPERATION FLASHPOINT: DRAGON RISING :: OFDR EDITING :: EDITING Q+A
Page 1 of 1
How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work?
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
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
Guest- Guest
Re: How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work?
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.
Re: How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work?
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
cheers
Guest- Guest
Re: How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work?
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 ) 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...
---------------------------------------------------------------------------------------------------
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 ) 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...
Guest- Guest
Re: How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work?
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.
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.
(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
Re: How does the command setAiInaccuracy (OFF, NORMAL, FORCED) work?
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.
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- Admin
- Location : WV/PA
Points : 285
Reputation : 22
Join date : 2012-12-19
Similar topics
» Orders & Command Guide
» VAC -- Voice activated command Mod usable with DR.
» [Request]Minimod Hold Command
» Statements and how they work.
» Why doesn't this work?
» VAC -- Voice activated command Mod usable with DR.
» [Request]Minimod Hold Command
» Statements and how they work.
» Why doesn't this work?
Operation Flashpoint Dragon Rising OFDR Forums :: OPERATION FLASHPOINT: DRAGON RISING :: OFDR EDITING :: EDITING Q+A
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|