yyccccc
Jun 9 2009, 06:53
Code Sample
_projectile = nearestobject [_this select 0,_this select 4];
setacctime 0.5;
_camera = "camera" camCreate (getpos _projectile);
_camera cameraeffect ["internal", "back"];
while{alive _projectile && alive _camera}do
{
_camera camSetTarget _projectile;
_camera camSetRelPos [0,-13,1.2];
_camera camCommit 0;
sleep 0.001;
};
if(alive _camera)then{sleep 1};
_camera cameraeffect ["terminate", "back"];
camdestroy _camera;
setacctime 1;
Edit: Also remember this in the unit's init line:
Code Sample
this addeventhandler ["fired",{_this execVM "cam.sqf"}]
question 1 : sometimes the camera appearing at the sea, what is the matter?
question 2 : when I play as a M1A1 gunner how can I stop friendlyAi from using the camera follow script?
_projectile = nearestobject [_this select 0,_this select 4];
setacctime 0.5;
_camera = "camera" camCreate (getpos _projectile);
_camera cameraeffect ["internal", "back"];
while{alive _projectile && alive _camera}do
{
_camera camSetTarget _projectile;
_camera camSetRelPos [0,-13,1.2];
_camera camCommit 0;
sleep 0.001;
};
if(alive _camera)then{sleep 1};
_camera cameraeffect ["terminate", "back"];
camdestroy _camera;
setacctime 1;
Edit: Also remember this in the unit's init line:
Code Sample
this addeventhandler ["fired",{_this execVM "cam.sqf"}]
question 1 : sometimes the camera appearing at the sea, what is the matter?
question 2 : when I play as a M1A1 gunner how can I stop friendlyAi from using the camera follow script?