All right. I've tried cleaning up the script some. And, now the aircraft actually travels to the random target. I get two errors this time the CamCreate error and something about the _tgtM.
;Bombing.sqs
_Airplane = _this select 0
_tgt1 = _this select 1
_tgt2 = _this select 2
_tgt3 = _this select 3
_Winchester = 3
#Target
tgtX = (Random 2)
?(tgtX < 1): _Airplane domove getpos _Tgt1;goto "continue"
?(tgtX < 2 && tgtX > 1): _Airplane domove getpos _Tgt2;goto "continue"
_Airplane domove getpos _Tgt3
#continue
~1
_Airplane sidechat "Target in sight. In hot."
goto "Distance"
#Distance
_tgtM getpos setpos tgtX
~0.5
_tX = getpos tgtM select 0
_tY = getpos tgtM select 1
_tZ = getpos Airplane select 2
~9.5
"SHELL120" CamCreate [_tX - 1.5, _tY, _tZ - (random 5)]
"SHELL120" CamCreate [_tX + 1.5, _tY, _tZ - (random 5)]
~0.05
"SHELL120" CamCreate [(_tX - 1.5), _tY + ((random 15) - (random 15)),_tZ - (random 5)]
"SHELL120" CamCreate [(_tX + 1.5), _tY + ((random 15) - (random 15)),_tZ - (random 5)]
~2.5
Airplane sidechat "Shack!"
~0.05
_Winchester = _Winchester - 1
goto "Relocate"
#Relocate
Airplane domove getpos _bPoint
~3
?(Winchester <= 0):Airplane sidechat "Flight is Winchester. I'm is heading home."; exit
goto "Target"
Errors recieved:
1.) _tgtM getpos setpos tgtX: Error expected object
Would it work if I took out the setpos?
2.)"SHELL120" CamCreate [_tX - 1.5, _tY, _tZ - (random 5)]#
That one is an error generic error problem.
And 1 minor question: How do I keep the aircraft saying "Target in sight. In hot." only once and not multiple times?
Thanks!