OK, now that I took the time to post my brain fianly clicked to a point. I'm getting some stuff to work very well now (I don't know why, but I'm not gonna push my luck here.) Any way I've combined a script with in a script and it works ! The bad news is I cannot end it .
Here is the Primary script
;First we need to create the camera. You got that right.
_camera = "camera" camcreate [7405.37,6594.13,1.22]
_camera cameraeffect ["internal", "back"]
;scene 1
_camera camSetTarget Strike
_camera camSetrelpos [2,1,1]
_camera camcommit 0
@camcommitted _camera
~2
;Scene 2
_camera camSetTarget chopper
_camera camSetrelpos [5,5,1]
_camera camcommit 0
@camcommitted _camera
~5
;titlecut [" ","BLACK In",500]
;Scene 3
_camera camSetTarget gook
_camera camSetrelpos [1,1,1]
_camera camcommit 0
@camcommitted _camera
~5
;Vehile Follow Script. Can be used with any moving unit or Vehicle.
[chopper,chopper,[-30,15,-10],false] exec "vehiclecam.sqs"
_camera cameraeffect ["terminate", "back"]
camdestroy _camera
EndIntro=true
exit
And here is the Vehicle follow script.
; concept by Turok_GMT, modified by snYpir
; syntax:
; [<name of vehicle>, <name of unit to target>,
; <[xoffset,yoffset,zoffset]><relative to vehicle?>] exec "vehiclecam.sqs"
; example:
; [heli, dilbert,[0,0,-10],false] exec "vehiclecam.sqs"
; get camera vehicle and target
_unit = _this select 0
_target = _this select 1
; u can change the positional offsets for the camera (these are relative to the vehicle)
; x offset
_camoffsetX = (_this select 2) select 0
; y offset
_camoffsetY = (_this select 2) select 1
; z offset
_camoffsetZ = (_this select 2) select 2
; do u want your offsets to be relative to the vehicle?
_camrelative = _this select 3
; clear the variable that will stop this script
vehiclecamstop = false
; create a camera
_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
; now create a loop to continuously update the cam's pos
; so it appears to be attached to the vehicle
#loop
_newpos = getpos _unit
; set posn not relative to vehicle?
? NOT(_camrelative) : _cam camsetpos [(_newpos select 0) + _camoffsetX, (_newpos select 1) + _camoffsetY, (_newpos select 2) + _camoffsetZ]; goto "commit"
; set posn relative to vehicle
_cam camsettarget _unit
_cam camsetrelpos [_camoffsetX,_camoffsetY,_camoffsetZ]
#commit
_cam camcommit 0
; aim camera at target
_cam camsettarget _target
_cam camcommit 0
; insert a small update time to avoid anychance of any nasty
; infinity loop errors
~0.01
; perform an if test to see if _stop has been set to true
; of not, do another lap of the loop
? NOT(vehiclecamstop) : goto "loop"
; the loop ends here when vehiclecamstop gets set to true by either
; a trigger or a waypoint's "on activation" field
; once loop had ended, kill the camera and return control to
; player
endcut = true
I can't get the Vehicle cam script to end with the "vehiclecamstop = true"
in a trigger or way point's activation and init fields. What do I do to end the script?
Thanks for any help! Strike.