knowsAbout: Difference between revisions
Jump to navigation
Jump to search
Multiplayer:
who must be local, while target can be global. Groups:
Uncategorised
Killzone Kid (talk | contribs) (see also, example) |
Lou Montana (talk | contribs) (Fix description, merge syntaxes, comment cleanup) |
||
Line 1: | Line 1: | ||
{{Command|= | {{Command|Comments= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| ofp | | | ofp |Game name= | ||
|1.00| | |1.00|Game version= | ||
|arg= | |arg= local |Arguments in MP= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Checks if a group or a side knows about target. | | Checks if a group or a side knows about target. | ||
* Enemy knowledge is instantly shared among the group units | |||
* Units in the same group always perfectly know about each others | |||
* AI knowledge cannot check beyond current [[viewDistance]] and it resets to zero as soon as the target's distance is over it<br />Note: neither fog nor daylight affect this behaviour | |||
* Losing sight of a target for more than 120 seconds resets its [[knowsAbout]] to zero as well | |||
* '''Magic number''' is the value that must be reached for a unit to shoot at an enemy (used by "Detected by" triggers as well): | |||
:{{{!}}class{{=}}"wikitable" | |||
!Game | |||
{{!}}{{GVI|ofp|1.46}} | |||
{{!}}{{GVI|ofpr|1.96}} | |||
{{!}}{{GVI|arma|1.18}} | |||
{{!}}{{GVI|arma2|1.11}} | |||
{{!}}{{GVI|arma2oa|1.62}} | |||
{{!}}{{GVI|arma3|1.82}} | |||
{{!}}- | |||
!Magic value | |||
{{!}}style{{=}}"text-align: center"{{!}}0.7 | |||
{{!}}style{{=}}"text-align: center"{{!}}0.105 | |||
{{!}}style{{=}}"text-align: center"{{!}}? | |||
{{!}}style{{=}}"text-align: center"{{!}}? | |||
{{!}}style{{=}}"text-align: center"{{!}}? | |||
{{!}}style{{=}}"text-align: center"{{!}}? | |||
{{!}}}|Description= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| who | | who [[knowsAbout]] target |Syntax= | ||
|p1= who: [[Object]] or [[ | |p1= who: [[Object]], [[Group]] or [[Side]] - if a unit, unit's [[group]] is considered; if a vehicle, vehicle commander's [[group]] is used. |Parameter 1= | ||
|p2= target: [[Object]] | | |p2= target: [[Object]] |Parameter 2= | ||
| [[Number]] in the range of 0 | | [[Number]] in the range of 0..4, where 4 is maximum knowledge. |Return value= | ||
| | |mp= ''who'' '''must''' be local, while ''target'' can be global. |MP= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code> | |x1= <code>_knowledge = [[player]] [[knowsAbout]] _target;</code> |Example 1= | ||
|x2= <code>_knowledge = ([[group]] [[player]]) [[knowsAbout]] _target;</code> |Example 2= | |||
| | |x3= <code>_knowledge = ([[side]] [[player]]) [[knowsAbout]] _target;</code> |Example 3= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[nearTargets]], [[reveal]], [[getHideFrom]], [[targetKnowledge]], [[targetsAggregate]], [[targetsQuery]], [[forgetTarget]] | | | [[nearTargets]], [[reveal]], [[getHideFrom]], [[targetKnowledge]], [[targetsAggregate]], [[targetsQuery]], [[forgetTarget]] |See also= | ||
}} | }} | ||
Line 43: | Line 58: | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<!-- 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"> | <dt class="note">[[User:Hardrock|hardrock]] | ||
<dd class="note"> | <dd class="note">{{GVI|ofpr|1.91}} | ||
* 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.<br />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 unit's 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 effect. You may be in a forest and can't see the unit, but he can see you. | |||
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 | |||
Bushes between the unit and the target seem to have little effect on this value, and trees definitely have no | |||
<dd class="notedate">Posted on January | <dd class="notedate">Posted on January 16, 2007 | ||
<dt class="note"> | <dt class="note">[[User:Bdfy|Bdfy]] | ||
<dd class="note"> | <dd class = "note"><tt>the magic [[knowsAbout]] number is 0.105</tt> It's not that simple. Maybe true for infantry but not all vehicles:<br /> | ||
< | [[reveal|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 from the air (of course if plane has suitable munition :)) | |||
<dd class="notedate">Posted on June 13, 2012 | <dd class="notedate">Posted on June 13, 2012 | ||
<dt class="note"> | <dt class="note">[[User:kju|kju]] | ||
<dd class="note"> | <dd class="note">According to '''[[User:Suma|Suma]]''':<br /> | ||
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.<br /> | |||
Note: This is not affecting enemy units at all. | |||
<dd class="notedate">Posted on March 27, 2013 | <dd class="notedate">Posted on March 27, 2013 | ||
<dt class="note"> | <dt class="note">[[User:helling3r|helling3r]] | ||
<dd class="note"> | <dd class="note">{{GVI|arma2oa|1.62}} infantry tests: | ||
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 | The following table shows my test results on a clear day in 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. | ||
{| | {| | ||
| style="vertical-align:top;" | | | style="vertical-align:top;" | | ||
Line 157: | Line 156: | ||
|} | |} | ||
< | <!-- Note Section END --> | ||
</dl> | </dl> | ||
<h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> | ||
[[Category:Scripting Commands| | [[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands OFP 1.46|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands OFP 1.96|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands ArmA | |||
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | ||
Revision as of 21:51, 1 June 2018
Description
- Description:
- Checks if a group or a side knows about target.
- Enemy knowledge is instantly shared among the group units
- Units in the same group always perfectly know about each others
- AI knowledge cannot check beyond current viewDistance and it resets to zero as soon as the target's distance is over it
Note: neither fog nor daylight affect this behaviour - Losing sight of a target for more than 120 seconds resets its knowsAbout to zero as well
- Magic number is the value that must be reached for a unit to shoot at an enemy (used by "Detected by" triggers as well):
Syntax
- Syntax:
- who knowsAbout target
- Parameters:
- who: Object, Group or Side - if a unit, unit's group is considered; if a vehicle, vehicle commander's group is used.
- target: Object
- Return Value:
- Number in the range of 0..4, where 4 is maximum knowledge.
Examples
- Example 1:
_knowledge = player knowsAbout _target;
- Example 2:
_knowledge = (group player) knowsAbout _target;
- Example 3:
_knowledge = (side player) knowsAbout _target;
Additional Information
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
- 1.91
- 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 unit's 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 effect. You may be in a forest and can't see the unit, but he can see you.
- 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.
- Posted on January 16, 2007
- 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 from the air (of course if plane has suitable munition :)) - Posted on June 13, 2012
- kju
- According to Suma:
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
- 1.62 infantry tests:
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 in 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
Bottom Section
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Uncategorised
- Command Group: Object Information
- Scripting Commands OFP 1.46
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.99
- Scripting Commands ArmA
- Scripting Commands ArmA2
- Scripting Commands Take On Helicopters
- Scripting Commands Arma 3