- Joined
- Nov 2, 2004
- Messages
- 1,993
I didn't null any local handles, is this actually needed to prevent leaks?
ConfigPatrolScript()
// - Configure the script and apply settings
// -- Script must be disabled
// -- If already configured, destroy configured objects
//
ApplyPatrolSettings()
// - Apply settings
// -- Does not include players, regions, points, or targets
//
TogglePatrolScript(boolean forceDisable)
// - Enable or disable the script
// -- Script must be configured to enable
// -- Certain triggers remain enabled until no units are patrolling
// --- unless forceDisable == true
//
TogglePatrolAttack(boolean enable)
// - Enable or disable Attack Mode
// -- New patrols attack Target player base instead of patrolling
// -- Disable or enable Patrol Base alerting and Runner pings
//
DestroyPatrolScript(boolean forceDestroy)
// - Permanently destroy the script and its objects and give all Dummy player units to Patrol player
// -- There must be no units patrolling
// --- unless forceDestroy == true
// --- otherwise turn on script autodestruct and disable script
boolean udg_PatrolScriptAutoDestruct // Whether to automatically destroy the script when toggled off
boolean udg_PatrolChangeColor // Whether to change unit color when switching owner between Patrol and Dummy
// Players
player udg_PatrolPlayerTarget
player udg_PatrolPlayerPatrol
player udg_PatrolPlayerDummy // Patrolling units owner
integer udg_PatrolCampSizeMax // Maximum number of units in a camp
integer udg_PatrolBaseGuardSize // Minimum "guards" staying in base
integer udg_PatrolGroupGuardSize // Number of "guards" in a patrol group
integer udg_PatrolGroupSize // Total number of units in a patrol group
integer udg_PatrolGroupAttackGuardSize // Number of "guards" in an attack group
integer udg_PatrolGroupAttackSize // Total number of units in an attack group
real udg_PatrolBaseLeaveQTimeout // Timeout between queueing patrols
real udg_PatrolBaseLeaveTimeout // Timeout when patrol is queued
real udg_PatrolAttackQTimeout // Timeout between queueing attacks
real udg_PatrolAttackTimeout // Timeout when attack is queued
real udg_PatrolBaseOrderDelay // Delay (Sleep) between order to rally and to target
real udg_PatrolBaseCleanDelay // Delay (Sleep) between order to target and removing from temp group
real udg_PatrolCampOrderDelay // Delay (Sleep) between order to rally and to target
real udg_PatrolCampFacingDelay // Delay (Sleep) between order to random point in camp and turning
integer udg_PatrolGuardTypesCount // Number of "guard" types
integer udg_PatrolExcludeTypesCount // Number of excluded types
integer udg_PatrolExcludeClassesCount // Number of excluded classifications
integer array udg_PatrolGuardTypes // "Guard" types
integer array udg_PatrolExcludeTypes // Excluded types
unittype array pubExcludeClasses // Excluded classifications (not a UDG - must be set with Custom script)
// These are automatically assigned to the correct player based on start location
integer udg_PatrolBasesCount // Number of bases (start locs)
rect array udg_PatrolBaseRegions // Regions containing bases (start locs)
location array udg_PatrolBaseRallyPoints // Rally points for bases
integer udg_PatrolCampsCount // Number of camps
rect array udg_PatrolCampRegions // Regions for camps
location array udg_PatrolCampFacingPoints // Point units should face in camps
location array udg_PatrolCampRallyPoints // Rally points for camps
// Targets (camp index) are incremented each time a patrol is sent out
integer array udg_PatrolCampTargets // Next target for each camp - udg_PatrolCampsCount targets base
integer udg_PatrolBaseTarget // Next target for Patrol base
real udg_PatrolEncounterCheckTimeout // Timeout between checks for encounters
// Set either variables to 0 to use unit's current acquisition range
real udg_PatrolEncounterRange // Range at which Patrols can encounter Targets
real udg_PatrolEncounterGroupRange // Range at which to look for nearby patrols
real udg_PatrolRunnersSpeedMultiplier // Multiplier for movement speed of Runners
real udg_PatrolRunnersPingDuration // Duration of Runners ping
real udg_PatrolRunnersFirstPingDuration // Duration of first Runners ping
real udg_PatrolRunnersPingTimeout // Timeout between pings
string udg_PatrolRunnersEffect // Effect (model path) for Runners (overhead) - null (empty string) to disable
// Set to null ("No sound") to disable
sound udg_PatrolRunnersSound // Played when a patrol starts Running
sound udg_PatrolBaseAlertedSound // Played when an alerted patrol reaches base
sound udg_PatrolTargetAttacksSound // Played when Target player attacks Patrol player or enters its base
// This value can be used with the "Game - Value Of Real Variable" event to add additional triggers to the script
// -1: destroyed; 0: off; 1: on; +0.1: attack mode
// +0.01: Patrol running to base; +0.02: Patrol base alerted; +0.03: Patrol player attacked or base entered, by Target player
real udg_PatrolSystemState