knowsAbout: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Added MP Note : unit parameter must be local)
mNo edit summary
Line 4: Line 4:
[[Category:Scripting Commands ArmA|KNOWSABOUT]]
[[Category:Scripting Commands ArmA|KNOWSABOUT]]


{{Command|= Comments
____________________________________________________________________________________________


<h2 style="color:#000066">'''''unit'' knowsAbout ''target'''''</h2>
| ofp |= Game name


|1.00|= Game version
____________________________________________________________________________________________


'''Operand types:'''
| Check if (and by how much) unit knows about target. If unit is vehicle, vehicle commander is considered. |= Description
____________________________________________________________________________________________


'''unit:''' [[Object or Group]]
| unit '''knowsAbout''' target |= Syntax


'''target:''' [[Object]]
|p1= unit: [[Object or Group]] |= Parameter 1


'''Type of returned value:'''
|p2= target: [[Object]] |= Parameter 2


[[Number]]
| [[Number]] |= Return value
____________________________________________________________________________________________
 
|x1= <pre>_kv = soldierOne knowsAbout jeepOne</pre> |= Example 1
____________________________________________________________________________________________


'''Description:'''
|  |= See also


Check if (and by how much) '''unit''' knows about '''target'''.
}}


If unit is vehicle, vehicle commander is considered.
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
</dl>


'''Example:'''
<h3 style="display:none">Bottom Section</h3>
Old Notes (temporary):


_kv = soldierOne '''knowsAbout''' jeepOne
With Resistance (1.91): No matter what class of unit the target is and no matter what the skill/class of the enemy AI, the magic 'knowsAbout' number is 0.105.  
 
With CWC (1.46): No matter what class of unit the target is and no matter what the skill/class of the enemy AI, the magic 'knowsAbout' number is 0.7.  
 
What this means is, the AI will not fire on an enemy soldier until his 'knowsAbout' level of that enemy has reached the 'magic number' or higher.  
'''Comments:'''
This suggests that the knowsabout level must reach the magic threshold before a unit knows if another unit is an enemy or a friendly unit.  
 
Triggers and knowsabout level: "Detected by xxx" triggers also follow the above rules. For a detected trigger to be set off, the knowsAbout level must reach the magic number.  
 
Also... As soon as An AI unit gets hit with a bullet his knowsAbout level for the unit that shot him will instantly jump to 1.5, even if the shooter is 1000m away. Vice versa is also true. If An AI soldier's knowsAbout level for an enemy is 0.7 and the soldier fires and hits the enemy, his knowsAbout level about the enemy will instantly jump to 1.5. Some editors have found, whilst using this command over the years, that the following characteristics have cropped up:  
'''With Resistance (1.91):'''
AI enemies have a very limited amount of peripheral vision, it's not nearly as good as a human player's. A target must be in front of the unit for him to be noticed, so if you sprint right behind an enemy, this value doesn't increase.  
 
Depending on the units skill level, it can take a little time for the unit to notice a target. So if you run right past a unit, this value might not increase.  
No matter what class of unit the target is and no matter what the skill/class of the enemy AI, the magic ''''knowsAbout'''' number is '''0.105'''.
Bushes between the unit and the target seem to have little effect on this value, and trees definately have no affect. You may be in a forest, and can't see the unit, but he can see you.  
 
Once the target goes out of sight of the unit, his knowsAbout value doesn't instantly go back down. Rather, it slowly decreases, taking maybe a couple of minutes to go from 4 to 0. So if a unit spots you, and you then teleport yourself to the other side of the island, his knowsAbout value on you could still be 3 or higher.  
 
MP Note knowsAbout returns a viable result only if left-hand parameter unit is [[local]].
'''With CWC (1.46):'''
 
No matter what class of unit the target is and no matter what the skill/class of the enemy AI, the magic ''''knowsAbout'''' number is '''0.7'''.
 
 
What this means is, the AI will not fire on an enemy soldier until his ''''knowsAbout'''' level of that enemy has reached the ''''''magic number'''''' or higher.
 
 
This suggests that the '''knowsabout''' level must reach the magic threshold before a unit knows if another unit is an enemy or a friendly unit.
 
 
'''Triggers and knowsabout level:'''
 
"'''Detected by xxx'''" triggers also follow the above rules.
 
For a detected trigger to be set off, the '''knowsAbout''' level must reach the magic number.
 
 
'''Also...'''
 
As soon as An AI unit gets hit with a bullet his '''knowsAbout''' level for the unit that shot him will instantly jump to '''1.5''', even if the shooter is 1000m away.
 
Vice versa is also true.
 
If An AI soldier's '''knowsAbout''' level for an enemy is '''0.7''' and the soldier fires and hits the enemy, his '''knowsAbout''' level about the enemy will instantly jump to '''1.5'''.
 
 
 
Some editors have found, whilst using this command over the years, that the following characteristics have cropped up:
 
 
AI enemies have a very limited amount of peripheral vision, it's not nearly as good as a human player's.
 
A target must be in front of the unit for him to be noticed, so if you sprint right behind an enemy, this value doesn't increase.
 
 
Depending on the units skill level, it can take a little time for the unit to notice a target.
 
So if you run right past a unit, this value might not increase.
 
 
Bushes between the unit and the target seem to have little effect on this value, and trees definately have no affect.
 
You may be in a forest, and can't see the unit, but he can see you.
 
 
Once the target goes out of sight of the unit, his '''knowsAbout''' value doesn't instantly go back down.
 
Rather, it slowly decreases, taking maybe a couple of minutes to go from 4 to 0.
 
So if a unit spots you, and you then teleport yourself to the other side of the island, his '''knowsAbout''' value on you could still be 3 or higher.
 
 
'''MP Note'''
 
'''knowsAbout''' returns a viable result only if left-hand parameter ''unit'' is [[local]].

Revision as of 00:49, 2 August 2006


Hover & click on the images for description

Description

Description:
Check if (and by how much) unit knows about target. If unit is vehicle, vehicle commander is considered.
Groups:
Uncategorised

Syntax

Syntax:
unit knowsAbout target
Parameters:
unit: Object or Group
target: Object
Return Value:
Number

Examples

Example 1:
_kv = soldierOne knowsAbout jeepOne

Additional Information

See also:
See also needed

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section

Old Notes (temporary):

With Resistance (1.91): No matter what class of unit the target is and no matter what the skill/class of the enemy AI, the magic 'knowsAbout' number is 0.105. With CWC (1.46): No matter what class of unit the target is and no matter what the skill/class of the enemy AI, the magic 'knowsAbout' number is 0.7. What this means is, the AI will not fire on an enemy soldier until his 'knowsAbout' level of that enemy has reached the 'magic number' or higher. This suggests that the knowsabout level must reach the magic threshold before a unit knows if another unit is an enemy or a friendly unit. Triggers and knowsabout level: "Detected by xxx" triggers also follow the above rules. For a detected trigger to be set off, the knowsAbout level must reach the magic number. Also... As soon as An AI unit gets hit with a bullet his knowsAbout level for the unit that shot him will instantly jump to 1.5, even if the shooter is 1000m away. Vice versa is also true. If An AI soldier's knowsAbout level for an enemy is 0.7 and the soldier fires and hits the enemy, his knowsAbout level about the enemy will instantly jump to 1.5. Some editors have found, whilst using this command over the years, that the following characteristics have cropped up: AI enemies have a very limited amount of peripheral vision, it's not nearly as good as a human player's. A target must be in front of the unit for him to be noticed, so if you sprint right behind an enemy, this value doesn't increase. Depending on the units skill level, it can take a little time for the unit to notice a target. So if you run right past a unit, this value might not increase. Bushes between the unit and the target seem to have little effect on this value, and trees definately have no affect. You may be in a forest, and can't see the unit, but he can see you. Once the target goes out of sight of the unit, his knowsAbout value doesn't instantly go back down. Rather, it slowly decreases, taking maybe a couple of minutes to go from 4 to 0. So if a unit spots you, and you then teleport yourself to the other side of the island, his knowsAbout value on you could still be 3 or higher. MP Note knowsAbout returns a viable result only if left-hand parameter unit is local.