;mando Missile Control Center activation for AA system
;mando_missilecontrolon_aa.sqs
;Jan 2007 mandoble
;
; Missile control center is activated
; This script is executed by action added to indicated vehicles by mando_mccallow_by_name.sqf or
; mando_mccallow_by_type.sqf
;
; missile's parameters are customized inside this script before executing mando_missilecenter.sqs 
; to activate the MCC

_params = (_this select 3)
_targettypes = _params select 0
_launchpos   = _params select 1
_camerapos   = _params select 2
_fixeddir    = _params select 3
_missileidx  = _params select 4
_backcolor   = _params select 5
_scanstoload = _params select 6


;Launcher parameters
;Launcher radar scan range
_radarrange       = 30000
;Launcher radar scan frequency
_scanfreq         = 1
;Able to detect incomming missiles?
_antimissile      = false



;Missile parameters
_launcher         = vehicle player
_missilebody      = "RKT_Kitchen"
_dir              = 0
_vangle           = 0
?(_params select 7) != -100: _vangle = _params select 7
_speedini         = 10
_speedmax         = 500
_acceleration     = 120
_target           = objNull
_boomrange        = 0
_activerange      = 3000
_modeinit         = 1
_cruisealt        = 300
_boomscript       = mando_missile_path+"warheads\mando_missilehead1a.sqf"
_smokescript      = mando_missile_path+"exhausts\mando_missilesmoke2a.sqf"
_soundrsc         = "mando_missile1"
_sounddur         = 29
_endurance        = 120
_terrainavoidance = true
_updatefreq       = 2
_delayinit        = 1
_controltime      = 4
_detectable       = true
_debug            = true
_launchscript     = ""
_hagility         = 30
_vagility         = 30
_accuracy         = 1
_intercept        = true
_scanarch         = 45
_scanarcv         = 90


_missileparams = [_launcher, _missilebody, _launchpos, _dir, _vangle, _speedini, _speedmax, _acceleration, _target, _boomrange, _activerange, _modeinit, _cruisealt, _boomscript, _smokescript, _soundrsc, _sounddur, _endurance, _terrainavoidance, _updatefreq, _delayinit, _controltime, _detectable, _debug, _launchscript, _hagility, _vagility, _accuracy, _intercept, _scanarch, _scanarcv]


;MCC Sounds
;Sound for MCC activation
_radaronsound   = "mando_radaron"

;Sound for MCC deactivation
_radaroffsound  = "mando_radaroff"

;Sound for locking on a target
_gettargetsound = "mando_target1"

;Sound for radar scans
_scansound      = "mando_radar2"

;Sound 1 to indicate no missiles left
_noammosound1   = "mando_noammo1" 

;Sound 2 to indicate no missiles left
_noammosound2   = "mando_noammo2"

_sounds = [_radaronsound,_radaroffsound,_gettargetsound,_scansound,_noammosound1,_noammosound2]

[_launcher, _camerapos, _targettypes, _radarrange, _scanfreq, _antimissile, _missileparams, _sounds, _fixeddir, _missileidx, _backcolor, _scanstoload]exec mando_missile_path+"mcc\mando_missilecenter.sqs"

exit