Hi,
When I get the aircraft to drop a bomb, how would I go about creating a camera to target it? I could do the camera business ok, just need a variable of what to target.
This is what I have so far
init.sqs_unit = plane1
_unit addeventhandler ["FIRED",{_this exec "cam.sqs"}]
exit
cam.sqshint format ["%1\n%2\n%3\n%4",(_this select 0),(_this select 1),(_this select 2),(_this select 3)]
_cam = "camera" camcreate getpos (_this select 3)
_cam cameraeffect ["internal", "back"]
_i = 0
#loop
_cam camPrepareTarget (_this select 0)
_cam camPrepareRelPos [5,5,2]
_cam camPrepareFOV 1.1
_cam camCommitPrepared 0
~0.01
_i = _i + 1
?_i > 300 : goto "end"
goto "loop"
#end
_cam cameraeffect ["terminate", "back"]
camdestroy _cam
exit
The hint displays 4 lines, the top line is the vehicle, and the bottom 3 is the same.
The cam.sqs I have there targets the plane ok, but if I change the (_this select 0) to any of the others (that I have used in my hint box), I get an error.
Does anyone know how I can get it so the camera targets the bomb thats dropped?
Thanks in advance.