Hello LCD
thanks for pointing me to this thread. I'll downloaded the intro.zip and I gonna have a look at it right now. I'll hope that i'll be able to get it to work since i'm a real noob when it comes down to scripting.
nettrucker out!
Edit: 29/09/07 22.43
Hi everybody
I need some help.
Still got some troubles with positioning the sniper scope towards the target. I would like to position the sniper scope at the position where I actually placed the sniper on the map. And it should seem that you actually would see through the sniper's scope. I would like to make the scope follow the target since it's moving. I'm having some troubles though to understand what values and where to change them. i'm tweaking for 2 days now but I'm unable to achieve what I want.
1.)I need to run the sniper scope script so that it'll be placed on screen meanwhile the intro.sqs is already running
2.) it should be positioned at the snipers pos on map with distance and azimuth ( I mean by that the right angle ) towards the target, it's just a sequence of a couple of seconds that I need it to run, then it should turn to the default view.
3.) how can I make the scope following the target while moving?
4.) Can I run multiple scripts executing them from the main script? (in this case I would have to execute the scope script within the intro.sqs )
5.) MySniper SwitchCamera "gunner" -- seems not to work for a single object, it might work for a vehicle crew though, I haven't tried it.
6.) I have only basic knowledge about camscripting.
7.) Moreover I have serious difficulties to understand the preparecam commands I'm doing something wrong can't get it to work.
8.) I use mostly following commands
_cam camsettarget e1
_cam camsetrelpos [8,-12,1.8]
_cam camSetFOV 0.100
_cam camcommit 0
@camcommitted _cam
~8
I like them especially on moving targets because the angles of the camera are never the same they are always some slight changes and the intro's & outro's are always slightly different. For me it's never boring to watch them. One negative aspect is that you might have bad angles especially in Urban areas or when close to objects.
Thanks for some help and advice.
regards
nettrucker
Edit: 10/01/2007 12.45
Hi everybody
I used this code from johnny boy. After a lot of tweakening the only way it would work is how johnnyboy did it. This is the code for the description.ext
#define CT_OBJECT 80
class RscObject
{
type = CT_OBJECT;
scale = 1.0;
direction[] = {0, 0, 1};
up[] = {0, 1, 0};
};
class RscTitles {
titles[] = {M24};
class M24 {
idd=-1;
movingEnable = false;
duration=100;
name = "binocular";
objects[]= {binocular};
class binocular : RscObject {
model= "optika_sniperw.p3d";
idc= -1;
position[] = {0,0,0.063};
direction[] = {sin 0, sin 180 * cos 0, cos 180 * cos 0};
up[] = {0, cos 180, -sin 180};
};
};
};
Now I ran johnnyboys camscript (modified to my needs) within my intro.sqs
; intro.sqs
;
_e1 = _this select 0
_camera = "camera" camcreate [14590.00,12721.18,1.19]
_camera cameraeffect ["internal", "back"]
;===========================================
;=== Sniper scope on target
;===========================================
_campos = _e1 modelToWorld [0,9,3]
_camera camPrepareTarget (getpos _e1)
_camera camPreparePos _campos
_camera camPrepareFOV 0.174
_camera camCommitPrepared 0
@camCommitted _camera
cutrsc ["M24","PLAIN"]
~4
titleCut ["","BLACK IN",0.5]
~2
camdestroy _camera
;player switchcamera "INTERNAL";
ForceEnd
exit
How can I get the sniper scope to follow the target ( in this case e1 )?
Some help of you scripting aces would be really appreciated.
thanks in advance
nettrucker