Hi, I am having some trouble with these scuds scripts...
; args: [vehicle, type, si]
_v = _this select 0
~1
? !(local _v) || !(alive _v) : exit
_v addaction ["Launch Scud","scud.sqs"]
This part works fine... the action shows up on the scud.
_unit = this select 0
onmapsingleclick {[_unit,_pos] exec "scudlaunch.sqs"}
exit
When I click "Launch Scud" ingame I get an error message for this script, am I doing anything wrong? I am trying to have it so the scud has the action, when the player clicks the action he can go to the map and target an area, the scud launches and this script makes an explosion.
_scud = _this select 0
_pos = _this select 1
launchcount = launchcount + 1
?launchcount > maxlaunch:exit
_x = _pos select 0
_y = _pos select 1
_z = _pos select 2
~2
_scud action ["SCUD Launch"]
~15
_scud action ["SCUD Start"]
~5
_shell = "TimeBomb" CamCreate [_x, _y, _z]
_shell = "TimeBomb" CamCreate [_x+20, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+20, _z]
_shell = "TimeBomb" CamCreate [_x+20, _y+20, _z]
_shell = "TimeBomb" CamCreate [_x+30, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+30, _z]
_shell = "TimeBomb" CamCreate [_x+30, _y+30, _z]
_shell = "TimeBomb" CamCreate [_x+40, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+40, _z]
_shell = "TimeBomb" CamCreate [_x+40, _y+40, _z]
_shell = "TimeBomb" CamCreate [_x+50, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+50, _z]
_shell = "TimeBomb" CamCreate [_x+50, _y+50, _z]
_shell = "TimeBomb" CamCreate [_x+60, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+60, _z]
_shell = "TimeBomb" CamCreate [_x+60, _y+60, _z]
_shell = "TimeBomb" CamCreate [_x-60, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-60, _z]
_shell = "TimeBomb" CamCreate [_x-60, _y-60, _z]
_shell = "TimeBomb" CamCreate [_x-50, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-50, _z]
_shell = "TimeBomb" CamCreate [_x-50, _y-50, _z]
_shell = "TimeBomb" CamCreate [_x-40, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-40, _z]
_shell = "TimeBomb" CamCreate [_x-40, _y-40, _z]
_shell = "TimeBomb" CamCreate [_x-30, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-30, _z]
_shell = "TimeBomb" CamCreate [_x-30, _y-30, _z]
_shell = "TimeBomb" CamCreate [_x-20, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-20, _z]
_shell = "TimeBomb" CamCreate [_x-20, _y-20, _z]
_shell = "TimeBomb" CamCreate [_x, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y, _z]
exit
Am I missing something? Any help appreciated.
Edit: This is the error message:
_unit = this select 0|#|': Error select: Type Bool, Expected Array