Hi again guys, this should be a fairly simple query but i keep overlooking my mistake and can not for the life of me find it in my own code.
What i am trying to do is rotate an existing camera. I have included the script as shown below but will breifly explain what the script does:
1) The script initiates, builds the camera and as you can see by the code drops straight down from 300 to 100 ft when looking at the ground.
2) The script gets stuck in a loop and the camera sits there awaiting input.
3) At the same time a dialog is waiting on the screen, which gives the user the option to press rotate which should feed a public variable into the script which activates the options contained within the loop.
4) I have tried changing the xaxis in the camSetRelPos statement within the loop however the camera just rotates once and will not continue.
5) My next step was to try initiating a variable such as rotatecoord = 0 at the start of the script, and then using a rotatecoord = rotatecoord +1 in the loop. However the camera still seems to rotate only the once and no matter whether i set the xaxis to 1 or 10 still only rotates to the same angle.
Camerascript.sqs
_camera = "camera" camcreate [_pos select 0,_pos select 1,_pos select 2]
_camera cameraeffect ["Internal","back"]
_camera camsettarget _pos
_camera camsetrelpos [0,-1,300]
_camera camcommit 0
@camCommitted _camera
~1
_camera camsettarget _pos
_camera camsetrelpos [0,-1,200]
_camera camcommit 0
@camCommitted _camera
~1
_camera camsettarget _pos
_camera camsetrelpos [0,-1,100]
_camera camcommit 0
@camCommitted _camera
#cameraloop
? (rotate == 1) : _camera camsettarget [(getpos _camera select 0), (getpos _camera select 1)];
? (rotate == 1) : _camera camSetRelPos [0, -1, (getpos _camera select 2)]
? (rotate == 1) : _camera camcommit 0
? (rotate == 1) : rotate= 0;
? (endcam == 0) : goto "cameraloop"
Any ideas? As this one has got me stumped for the time being till i find my own mistake. Thanks in advance.