disableRemoteSensors: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\{\{GameCategory\|(arma[0123])\|New[ _]Scripting[ _]Commands[ _]List\}\}" to "{{GameCategory|$1|New Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| arma3 |Game name=
| arma3 |Game name=
Line 11: Line 10:


|gr1= Multiplayer |GROUP1=
|gr1= Multiplayer |GROUP1=
____________________________________________________________________________________________


| This command will halt raycasting calculations (on the local machine only) for all groups which don't contain ''any'' local entities. Units, that are not in a group with at least one local member, will not check visibility of other units. This will cause, that remote units will not have updated knowsAbout and it will save some CPU time. If a group contains a single local entity then calculations will still be performed for the entire group.
| This command will halt raycasting calculations (on the local machine only) for all groups which don't contain ''any'' local entities. Units, that are not in a group with at least one local member, will not check visibility of other units. This will cause, that remote units will not have updated knowsAbout and it will save some CPU time. If a group contains a single local entity then calculations will still be performed for the entire group.
<br><br>
<br><br>
These raycasts are used to determine what other entities an entity can see, and they take a lot of CPU time. This is of course a bit of a trick, because rather than a true optimization, it disables part of the simulation. However, there are certainly types of scenarios where these raycasts are not needed. An example is a fully Player-versus-Player scenario, where the visibility between every combination of player entity is not needed. So why not disable this by default? There are cases where you do require these raycasts, for example in stealth scenarios. Without them, commands like [[knowsAbout]], [[nearTargets]] and [[targetKnowledge]] will only function for local units! The commands themselves are local, can be used on servers and clients, and the state is reset when the scenario ends. So, carefully consider whether your scenario can benefit from this method. |DESCRIPTION=
These raycasts are used to determine what other entities an entity can see, and they take a lot of CPU time. This is of course a bit of a trick, because rather than a true optimization, it disables part of the simulation. However, there are certainly types of scenarios where these raycasts are not needed. An example is a fully Player-versus-Player scenario, where the visibility between every combination of player entity is not needed. So why not disable this by default? There are cases where you do require these raycasts, for example in stealth scenarios. Without them, commands like [[knowsAbout]], [[nearTargets]] and [[targetKnowledge]] will only function for local units! The commands themselves are local, can be used on servers and clients, and the state is reset when the scenario ends. So, carefully consider whether your scenario can benefit from this method. |DESCRIPTION=
____________________________________________________________________________________________


| [[disableRemoteSensors]] state |SYNTAX=
| [[disableRemoteSensors]] state |SYNTAX=
Line 25: Line 22:




____________________________________________________________________________________________


|x1=  <code>[[disableRemoteSensors]] [[true]];</code>|EXAMPLE1=
|x1=  <code>[[disableRemoteSensors]] [[true]];</code>|EXAMPLE1=
____________________________________________________________________________________________


|x2=  |EXAMPLE2=
|x2=  |EXAMPLE2=
____________________________________________________________________________________________


|x3=  |EXAMPLE3=
|x3=  |EXAMPLE3=
____________________________________________________________________________________________


|x4=  |EXAMPLE4=
|x4=  |EXAMPLE4=
____________________________________________________________________________________________


|x5=  |EXAMPLE5=
|x5=  |EXAMPLE5=
____________________________________________________________________________________________


|x6=  |EXAMPLE6=
|x6=  |EXAMPLE6=
____________________________________________________________________________________________


|x7=  |EXAMPLE7=
|x7=  |EXAMPLE7=
____________________________________________________________________________________________


|x8=  |EXAMPLE8=
|x8=  |EXAMPLE8=
____________________________________________________________________________________________


|x9=  |EXAMPLE9=
|x9=  |EXAMPLE9=
____________________________________________________________________________________________


|x10=  |EXAMPLE10=
|x10=  |EXAMPLE10=
____________________________________________________________________________________________


| [[getRemoteSensorsDisabled]] |SEEALSO=
| [[getRemoteSensorsDisabled]] |SEEALSO=

Revision as of 00:42, 17 January 2021

Hover & click on the images for description

Description

Description:
This command will halt raycasting calculations (on the local machine only) for all groups which don't contain any local entities. Units, that are not in a group with at least one local member, will not check visibility of other units. This will cause, that remote units will not have updated knowsAbout and it will save some CPU time. If a group contains a single local entity then calculations will still be performed for the entire group.

These raycasts are used to determine what other entities an entity can see, and they take a lot of CPU time. This is of course a bit of a trick, because rather than a true optimization, it disables part of the simulation. However, there are certainly types of scenarios where these raycasts are not needed. An example is a fully Player-versus-Player scenario, where the visibility between every combination of player entity is not needed. So why not disable this by default? There are cases where you do require these raycasts, for example in stealth scenarios. Without them, commands like knowsAbout, nearTargets and targetKnowledge will only function for local units! The commands themselves are local, can be used on servers and clients, and the state is reset when the scenario ends. So, carefully consider whether your scenario can benefit from this method.
Groups:
Multiplayer

Syntax

Syntax:
disableRemoteSensors state
Parameters:
state: Boolean - true to disable
Return Value:
Nothing

Examples

Example 1:
disableRemoteSensors true;

Additional Information

See also:
getRemoteSensorsDisabled

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

Bottom Section