knowsAbout: Difference between revisions
Jump to navigation
Jump to search
m (example added) |
Fred Gandt (talk | contribs) m (<pre> to <code> + re-added required </dl> tag + a couple of spelling errors + cleaned table layout) |
||
Line 18: | Line 18: | ||
|p2= target: [[Object]] |= Parameter 2 | |p2= target: [[Object]] |= Parameter 2 | ||
| [[Number]] (from 0 to 4) |= Return value | | [[Number]] (from <tt>0</tt> to <tt>4</tt>) |= Return value | ||
|mp= Although the command works only properly if <tt>unit</tt> is local, <tt>target</tt> can be located on any computer of the network. |= | |mp= Although the command works only properly if <tt>unit</tt> is local, <tt>target</tt> can be located on any computer of the network. |= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= < | |x1= <code>_kv = _soldierOne [[knowsAbout]] _jeepOne;</code> |= Example 1 | ||
|x2= < | |x2= <code>_kv = ([[side]] [[player]]) [[knowsAbout]] _target;</code> |= Example 2 | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 36: | Line 36: | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<dd class="notedate">Posted on August 4, 2006 - 10:55 | <dd class="notedate">Posted on August 4, 2006 - 10:55 | ||
<dt class="note">'''[[User:Hardrock|hardrock]]'''<dd class="note">''Notes from before the conversion:'' | <dt class="note">'''[[User:Hardrock|hardrock]]''' | ||
<dd class="note">''Notes from before the conversion:'' | |||
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 '''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. | 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. | ||
Line 45: | Line 46: | ||
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. | 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. | 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 | Bushes between the unit and the target seem to have little effect on this value, and trees definitely have no affect. You may be in a forest, and can't see the unit, but he can see you. | ||
MP Note knowsAbout returns a viable result only if left-hand parameter unit is [[local]]. | MP Note knowsAbout returns a viable result only if left-hand parameter unit is [[local]]. | ||
Line 55: | Line 56: | ||
<dd class="note">If the distance between the all of unit's group and the target exceeds the viewdistance setting, knowsAbout instantly drops to 0. This is not changed by fog or daylight. | <dd class="note">If the distance between the all of unit's group and the target exceeds the viewdistance setting, knowsAbout instantly drops to 0. This is not changed by fog or daylight. | ||
<dd class = "note">Note that in OFP unit see all the targets that his group members see. The data is processed between teammembers freely. | |||
<dt class="note">'''[[User:Bdfy|Bdfy]]''' | <dt class="note">'''[[User:Bdfy|Bdfy]]''' | ||
<dd class = "note">''the magic 'knowsAbout' number is 0.105.'' It's not that simple.Maybe true for infantry but not all vehicles. "Reveal" command sets knowsAbout to 1, but planes still won't fire at soldiers on the ground. There's only one known way to pass through this - designate target with another fake infantry unit near the target. As soon as this fake unit see the target knowsAbout lifts up to 2.5-4 and even single enemy soldiers are attacked rom the air (of course if plane has suitable munition :)) | <dd class = "note">''the magic 'knowsAbout' number is 0.105.'' It's not that simple.Maybe true for infantry but not all vehicles. "Reveal" command sets knowsAbout to 1, but planes still won't fire at soldiers on the ground. There's only one known way to pass through this - designate target with another fake infantry unit near the target. As soon as this fake unit see the target knowsAbout lifts up to 2.5-4 and even single enemy soldiers are attacked rom the air (of course if plane has suitable munition :)) | ||
Line 77: | Line 78: | ||
<dt class="note">'''[[User:helling3r|helling3r]]''' | <dt class="note">'''[[User:helling3r|helling3r]]''' | ||
<dd class="note">Arma-II OA (1.62.101.480 @ACE), tests with infantry: | <dd class="note">Arma-II OA (1.62.101.480 @ACE), tests with infantry: | ||
<dd class="note">It is still true, that the command returns values between 0 (lowest) and 4 (most). | <dd class="note">It is still true, that the command returns values between 0 (lowest) and 4 (most). Freshly Spotted units will have at least 1.5, slowly decreasing when the target disappeared. | ||
The following Table shows my test results on a clear day at Takistan using the Vector. Please note that the returned values vary considerably depending on weather and time. Moonlight however seems to not have any considerable effect. | The following Table shows my test results on a clear day at Takistan using the Vector. Please note that the returned values vary considerably depending on weather and time. Moonlight however seems to not have any considerable effect. | ||
{| class=" | {| | ||
| style="vertical-align:top;" | | |||
{| class="bikitable" | |||
|+ style="white-space:nowrap;" | 12:00, sunlight, clear sky | |||
!Distance | !Distance | ||
!knowsAbout | !knowsAbout | ||
Line 116: | Line 114: | ||
|- | |- | ||
|365 || 4 | |365 || 4 | ||
|} | |} | ||
| | | style="vertical-align:top;" | | ||
{| class=" | {| class="bikitable" | ||
|+ style="white-space:nowrap;" | 21:00, bright half moon, clear sky | |||
!Distance | !Distance | ||
!knowsAbout | !knowsAbout | ||
Line 132: | Line 130: | ||
|- | |- | ||
|61 || 3.9 | |61 || 3.9 | ||
|} | |} | ||
| style="vertical-align:top;" | | |||
| | {| class="bikitable" | ||
|+ style="white-space:nowrap;" | 23:00, pitch black, clear sky, NVG on | |||
{| class=" | |||
!Distance | !Distance | ||
!knowsAbout | !knowsAbout | ||
Line 151: | Line 146: | ||
|- | |- | ||
|278 || 2.4 | |278 || 2.4 | ||
|} | |} | ||
|} | |} | ||
<dd class="notedate">Posted on May 31, 2014 - 16:51 (UTC)</dd> | <dd class="notedate">Posted on May 31, 2014 - 16:51 (UTC)</dd> | ||
<dt class="note">'''[[User:Delta99 wiki|Delta99 wiki]]'''</dt> | <dt class="note">'''[[User:Delta99 wiki|Delta99 wiki]]'''</dt> | ||
<dd class="note"> | <dd class="note">Can also use SIDE in place of UNIT. For example: | ||
Can also use SIDE in place of UNIT. For example: | |||
<code>EAST knowsAbout player;</code> | <code>EAST knowsAbout player;</code> | ||
</dl> | |||
<!-- Note Section END --> | <!-- Note Section END --> | ||
Line 176: | Line 167: | ||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]] | ||
Revision as of 09:56, 1 June 2014
Description
- Description:
- Check if (and by how much) unit knows about target. If unit is vehicle, vehicle commander is considered.
- Multiplayer:
- Although the command works only properly if unit is local, target can be located on any computer of the network.
- Groups:
- Uncategorised
Syntax
- Syntax:
- Number = unit knowsAbout target
- Parameters:
- unit: Object, Group or Side
- target: Object
- Return Value:
- Number (from 0 to 4)
Examples
- Example 1:
_kv = _soldierOne knowsAbout _jeepOne;
- Example 2:
_kv = (side player) knowsAbout _target;
Additional Information
- See also:
- nearTargetsreveal
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
- Posted on August 4, 2006 - 10:55
- hardrock
- Notes from before the conversion: 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 definitely have no affect. You may be in a forest, and can't see the unit, but he can see you. MP Note knowsAbout returns a viable result only if left-hand parameter unit is local.
- Posted on January 15, 2007
- Ceeeb
- In OFP v1.96, KnowsAbout return values range from 0 to 4.
- All units in a group have equal knowsAbout for any given target. All units in a group always return knowsAbout 4 about each other. This suggests groups share a single knowledge base.
- Without any contact with the target, the knowsAbout value decays at a linear rate so that it halves over 120 seconds. After this time is up knowsAbout drops instantly to 0.
- If the distance between the all of unit's group and the target exceeds the viewdistance setting, knowsAbout instantly drops to 0. This is not changed by fog or daylight.
- Note that in OFP unit see all the targets that his group members see. The data is processed between teammembers freely.
- Bdfy
- the magic 'knowsAbout' number is 0.105. It's not that simple.Maybe true for infantry but not all vehicles. "Reveal" command sets knowsAbout to 1, but planes still won't fire at soldiers on the ground. There's only one known way to pass through this - designate target with another fake infantry unit near the target. As soon as this fake unit see the target knowsAbout lifts up to 2.5-4 and even single enemy soldiers are attacked rom the air (of course if plane has suitable munition :))
- Posted on July 05, 2009
- MaestrO.fr
- In ArmA (other not tested), KnowsAbout value will stay at its highest value during approximately 2-3 min and then reinitialized.
- Posted on January 14, 2012
- kju
- Notes are for OA 1.60:
- The KnowsAbout value drops immediately back to zero, if the distance between both units is larger than the local viewDistance value.
- After 110 seconds without (visible?) contact, the KnowsAbout value drops to zero again. While it seemed to take longer the higher the KnowsAbout value is (at least for a value of 4 it took almost six minutes at one point), I was unable to reproduce/confirm that. It is 110 seconds no matter how high the KnowsAbout value it seems.
- Posted on June 13, 2012
- kju
- By Suma (source):
- All friendly units within a view distance to each unit [are revealed (to the player? or each friendly?)] on the mission start. The code is half broken, as it does not make the units known, it only sets the "accuracy" value for them. Note: This is not affecting enemy units at all.
- Posted on March 27, 2013
- helling3r
- Arma-II OA (1.62.101.480 @ACE), tests with infantry:
- It is still true, that the command returns values between 0 (lowest) and 4 (most). Freshly Spotted units will have at least 1.5, slowly decreasing when the target disappeared.
The following Table shows my test results on a clear day at Takistan using the Vector. Please note that the returned values vary considerably depending on weather and time. Moonlight however seems to not have any considerable effect.
12:00, sunlight, clear sky Distance knowsAbout 1530 1.5 1370 1.5 1250 1.5 1135 1.5 1055 1.52 1022 1.64 990 1.74 833 2.5 720 3.37 600 3.81 505 3.86 400 3.92 380 4 365 4 21:00, bright half moon, clear sky Distance knowsAbout 285 1.5 120 1.5 88 1.89 75 2.3 61 3.9 23:00, pitch black, clear sky, NVG on Distance knowsAbout 600 1.5 487 1.5 390 1.5 289 2.22 278 2.4 - Posted on May 31, 2014 - 16:51 (UTC)
- Delta99 wiki
- Can also use SIDE in place of UNIT. For example:
EAST knowsAbout player;
Bottom Section
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.46
- Scripting Commands ArmA
- Scripting Commands ArmA2
- Command Group: Object Information
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters