Class MOVEMENT
Limit the simultaneous movement of Groups within a running Mission.
This module is defined to improve the performance in missions, and to bring additional realism for GROUND vehicles. Performance: If in a DCSRTE there are a lot of moving GROUND units, then in a multi player mission, this WILL create lag if the main DCS execution core of your CPU is fully utilized. So, this class will limit the amount of simultaneous moving GROUND units on defined intervals (currently every minute).
Methods
| MOVEMENT:New (MovePrefixes, MoveMaximum) | Creates the main object which is handling the GROUND forces movement. |
| MOVEMENT:ScheduleStart () | Call this function to start the MOVEMENT scheduling. |
| MOVEMENT:ScheduleStop () | Call this function to stop the MOVEMENT scheduling. |
| MOVEMENT:OnBirth (event) | Captures the birth events when new Units were spawned. |
| MOVEMENT:OnDeadOrCrash (event) | Captures the Dead or Crash events when Units crash or are destroyed. |
| MOVEMENT:_Scheduler () | This function is called automatically by the MOVEMENT scheduler. |
Methods
- MOVEMENT:New (MovePrefixes, MoveMaximum)
-
Creates the main object which is handling the GROUND forces movement.
Parameters:
- MovePrefixes table{string,...} or string is a table of the Prefixes (names) of the GROUND Groups that need to be controlled by the MOVEMENT Object.
- MoveMaximum number is a number that defines the maximum amount of GROUND Units to be moving during one minute.
Returns:
Usage:
-- Limit the amount of simultaneous moving units on the ground to prevent lag. Movement_US_Platoons = MOVEMENT:New( { 'US Tank Platoon Left', 'US Tank Platoon Middle', 'US Tank Platoon Right', 'US CH-47D Troops' }, 15 )
- MOVEMENT:ScheduleStart ()
- Call this function to start the MOVEMENT scheduling.
- MOVEMENT:ScheduleStop ()
- Call this function to stop the MOVEMENT scheduling.
- MOVEMENT:OnBirth (event)
-
Captures the birth events when new Units were spawned.
Parameters:
- event
- MOVEMENT:OnDeadOrCrash (event)
-
Captures the Dead or Crash events when Units crash or are destroyed.
Parameters:
- event
- MOVEMENT:_Scheduler ()
- This function is called automatically by the MOVEMENT scheduler. A new function is scheduled when MoveScheduled is true.