setDynamicSimulationDistance: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
m (Adjusted formatting for category parameters for hemtt)
 
(51 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command
{{RV|type=command


| arma3
|game1= arma3
 
|version1= 1.68
|1.68


|gr1= Dynamic Simulation
|gr1= Dynamic Simulation


| Sets activation distance of [[Arma_3_Dynamic_Simulation]] for given category
|descr= Sets activation distance of [[Arma 3: Dynamic Simulation]] for given category.


| category '''setDynamicSimulationDistance''' distance
|s1= category [[setDynamicSimulationDistance]] distance


|p1= category: [[String]] - one of:
|p1= category: [[String]] - can be one of:
* <tt>"Group"</tt> - Infantry units. Set to a reasonable distance, player should not see disabled infantry units. Default: 500m
* {{hl|"Group"}} - infantry units. Set to a reasonable distance, player should not see disabled infantry units. Default value 500m
* <tt>"Vehicle"</tt> - Vehicles with crew. Set to a reasonable distance, player should not see disabled vehicles. Default: 350m
* {{hl|"Vehicle"}} - vehicles with crew. Set to a reasonable distance, player should not see disabled vehicles. Default value 350m
* <tt>"EmptyVehicle"</tt> - All vehicles without crew. Separated from Props as Empty Vehicles have often more complex damage states and selective destruction. Their activation distance should by larger that the one used for Props. Default: 250m
* {{hl|"EmptyVehicle"}} - all vehicles without crew. Separated from Props as Empty Vehicles have often more complex damage states and selective destruction. Their activation distance should be larger than the one used for Props. Default value 250m
* <tt>"Prop"</tt> - Static objects. Anything from a small tin can to a building. Default: 50m
* {{hl|"Prop"}} - static objects. Anything from a small tin can to a building. Default value 50m
|p2=  distance: [[Number]]


| [[Nothing]]
|p2= distance: [[Number]]


|r1= [[Nothing]]


|x1= <code>"Group" [[setDynamicSimulationDistance]] 1000;</code>
|x1= <sqf>"Group" setDynamicSimulationDistance 1000;</sqf>


|seealso= [[Arma 3: Dynamic Simulation]] [[dynamicSimulationDistance]] [[setDynamicSimulationDistanceCoef]] [[dynamicSimulationDistanceCoef]]
}}


| [[enableDynamicSimulationSystem]], [[dynamicSimulationSystemEnabled]], [[enableDynamicSimulation]], [[dynamicSimulationEnabled]], [[dynamicSimulationDistance]], [[setDynamicSimulationDistanceCoef]], [[dynamicSimulationDistanceCoef]], [[triggerDynamicSimulation]], [[canTriggerDynamicSimulation]], [[enableSimulation]], [[simulationEnabled]], [[enableSimulationGlobal]], [[Arma_3_Dynamic_Simulation]]
{{Note
|user= Demellion
|timestamp= 201703191952
|text= Desired distances for "Group" and "Vehicle" must be based on [[viewDistance]] and [[fog]] to exclude any rendering problems with frequently moving objects. Example:
<sqf>"Group" setDynamicSimulationDistance ((viewDistance * 0.8) - (viewDistance * fog)); // 80% of maximum rendering and fog distance</sqf>


|
But that might impair objects simulation if you are using long-scope optics, so there's an even better solution using [[cameraView]] with it:
}}
<sqf>
0 spawn {
while { true } do
{
if (cameraView isEqualTo "GUNNER") then
{
"Group" setDynamicSimulationDistance (viewDistance - (viewDistance * fog));
// Scoped
}
else
{
"Group" setDynamicSimulationDistance ((viewDistance * 0.8) - (viewDistance * fog));
// Not scoped
};


<h3 style='display:none'>Notes</h3>
uiSleep 0.25;
<dl class='command_description'>
<!-- Note Section BEGIN -->
<dl class="command_description">
<dd class="notedate">Posted on March 19, 2017 - 20:52 (UTC)</dd>
<dt class="note">[[User:Demellion|Demellion]]</dt>
<dd class="note">
Desired distances for "Group" and "Vehicle" must be based on [[viewDistance]] and [[fog]] to exclude any rendering problems with frequently moving objects. Example:
<code>"Group" [[setDynamicSimulationDistance]] (([[viewDistance]] * 0.8) - ([[viewDistance]] * fog))
// 80% of maximum rendering and fog distance</code>
But that might impair objects simulations if you are using long-scope optics, so there's a even better solution using [[cameraView]] with it:
<code>[] [[spawn]] {
[[while]] {[[true]]} [[do]] {
[[if]] ([[cameraView]] [[isEqualTo]] "GUNNER") [[then]] {
            "Group" [[setDynamicSimulationDistance]] ([[viewDistance]] - ([[viewDistance]] * [[fog]]));
                    // Scoped
} [[else]] {
    "Group" [[setDynamicSimulationDistance]] (([[viewDistance]] * 0.8) - ([[viewDistance]] * [[fog]]));
                    // Not scoped
};
[[uiSleep]] 0.25;  
};
};
};
};
</code>
</sqf>
</dd>
}}
</dl>
<!-- Note Section END -->
</dl>
 
<h3 style='display:none'>Bottom Section</h3>
{{GameCategory|arma3|New Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
<!-- CONTINUE Notes -->
<!-- DISCONTINUE Notes -->

Latest revision as of 12:30, 7 April 2024

Hover & click on the images for description

Description

Description:
Sets activation distance of Arma 3: Dynamic Simulation for given category.
Groups:
Dynamic Simulation

Syntax

Syntax:
category setDynamicSimulationDistance distance
Parameters:
category: String - can be one of:
  • "Group" - infantry units. Set to a reasonable distance, player should not see disabled infantry units. Default value 500m
  • "Vehicle" - vehicles with crew. Set to a reasonable distance, player should not see disabled vehicles. Default value 350m
  • "EmptyVehicle" - all vehicles without crew. Separated from Props as Empty Vehicles have often more complex damage states and selective destruction. Their activation distance should be larger than the one used for Props. Default value 250m
  • "Prop" - static objects. Anything from a small tin can to a building. Default value 50m
distance: Number
Return Value:
Nothing

Examples

Example 1:
"Group" setDynamicSimulationDistance 1000;

Additional Information

See also:
Arma 3: Dynamic Simulation dynamicSimulationDistance setDynamicSimulationDistanceCoef dynamicSimulationDistanceCoef

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
Demellion - c
Posted on Mar 19, 2017 - 19:52 (UTC)
Desired distances for "Group" and "Vehicle" must be based on viewDistance and fog to exclude any rendering problems with frequently moving objects. Example:
"Group" setDynamicSimulationDistance ((viewDistance * 0.8) - (viewDistance * fog)); // 80% of maximum rendering and fog distance
But that might impair objects simulation if you are using long-scope optics, so there's an even better solution using cameraView with it:
0 spawn { while { true } do { if (cameraView isEqualTo "GUNNER") then { "Group" setDynamicSimulationDistance (viewDistance - (viewDistance * fog)); // Scoped } else { "Group" setDynamicSimulationDistance ((viewDistance * 0.8) - (viewDistance * fog)); // Not scoped }; uiSleep 0.25; }; };