disableRemoteSensors: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Some wiki formatting)
 
(35 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 1.52


|1.52|= Game version
|eff= local


|arg=  |= Multiplayer Arguments
|gr1= Multiplayer


|eff= |= Multiplayer Effects
|descr= 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>
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.


|
|s1= [[disableRemoteSensors]] state
Disable raycasts for remote entities in a group that doesn't have any local entities.
<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
____________________________________________________________________________________________


| [[disableRemoteSensors]] state |= Syntax
|p1= state: [[Boolean]] - [[true]] to disable


|p1= state: [[Bool]]|= Parameter 1
|r1= [[Nothing]]


| [[Nothing]] |= Return Value
|x1= <sqf>disableRemoteSensors true;</sqf>
 
 
____________________________________________________________________________________________
 
|x1= <code>[[disableRemoteSensors]] false;</code>|= Example 1
____________________________________________________________________________________________
 
|x2=  |= Example 2
____________________________________________________________________________________________
 
|x3=  |= Example 3
____________________________________________________________________________________________
 
|x4=  |= Example 4
____________________________________________________________________________________________
 
|x5=  |= Example 5
____________________________________________________________________________________________
 
|x6=  |= Example 6
____________________________________________________________________________________________
 
|x7=  |= Example 7
____________________________________________________________________________________________
 
|x8=  |= Example 8
____________________________________________________________________________________________
 
|x9=  |= Example 9
____________________________________________________________________________________________
 
|x10=  |= Example 10
____________________________________________________________________________________________
 
|mp= - |= Multiplayer Behaviour
 
| [[getRemoteSensorsDisabled]] |= See Also


|seealso= [[getRemoteSensorsDisabled]]
}}
}}
<dl class="command_description">
<!-- BEGIN Note Section -->
<!-- END Note Section -->
</dl>
<h3 style="display:none">Bottom Section</h3>
<!-- Appropriate categories go here -->
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 20:00, 13 May 2022

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