OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Putin on 07 Oct 2002, 14:48:32

Title: Some small camera-questions
Post by: Putin on 07 Oct 2002, 14:48:32
Hi there :)

I just have some easy camera questions.

1) How do I make a camera zoom in ?
2)How can I make a camera be 5m infront, and 0.5m from the ground (0,5,0.5) and look at the unit a1 and after this unit walkes/drives the camera stayes 5m infront and 0.5 from the ground.Like the camera is fixed on a vehicle, like a jet ?

Thank you very much.
Title: Re:Some small camera-questions
Post by: seanver on 07 Oct 2002, 21:40:06
1) _camera setfov x.x

Where x.x put a number. 0.7 is the normal zoom. It will zoom in with lower numbers, like 0.2

Remember to put _camera camcommit x (where x the seconds that the camera will take to zoom in)

2) _camera camsetpos unit
_camera camsetrelpos [0,0,1.2]
_camera camsettarget a1

Anyway I don't know if the camsetrelpos works well or not, I haven't used it for months. I normally use the "camera.sqs" thing:

http://www.ofpec.com/yabbse/index.php?board=9;action=display;threadid=419 (http://www.ofpec.com/yabbse/index.php?board=9;action=display;threadid=419)
Title: Re:Some small camera-questions
Post by: KTottE on 07 Oct 2002, 21:42:24
1) CameraName CamSetFOV ###

### = a number between 0.001 and infinite.

0.700 is normal, 0.100 is zoomed in, 1.000 is zoomed out (looks buggered, don't use it)

2) Try looping the camera, or using the cam-follow script from the Ed Depot. Do a search for "follow vehicle" or something, and it should turn up. Otherwise, give me a shout and I'll help you find it.
I really suggest looking at that script.

Cheers mate.

Edit
Dang I type too slow.
Title: Re:Some small camera-questions
Post by: Putin on 07 Oct 2002, 22:16:44
Thank you very much .

By now I also figured out how to use loops but how can i deactivate them and make the script go on? ???

And what is the command in a script to make the screen look like a scope?

Thanks
Title: Re:Some small camera-questions
Post by: seanver on 07 Oct 2002, 22:19:27
Quote
can i deactivate them and make the script go on?

Put in the loop
? (go1) : "goto continue"

At the beginning of the script put go1=false. And put in the script #continue after the loop. Now, when you want the script to continue, put in a trigger, waypoint,etc, go1=true
Title: Re:Some small camera-questions
Post by: Putin on 08 Oct 2002, 14:07:29
Thanks i'll try that.
Title: Re:Some small camera-questions
Post by: lilmat on 08 Oct 2002, 17:12:49
Hey if you can wait a little while with the scope thing.
I am be able to help you. ;D
Title: Re:Some small camera-questions
Post by: LCD on 08 Oct 2002, 17:29:11
just write da next code  :)

Code: [Select]
camname cameraeffect ["terminate", "back"]
camdestroy camname
unitname switchCamera "gunner"
unitname dotarget unitname1 <---- will make da scope target
~1
unitname dofire unitname1 <---- will make da rifle fire
//continue da dotarget do fire til u dont need it, wen u dont needit type
camname  = "camera" camcreate [0,0,0] <----- 2 create a new camera nd continue wid da camscript
camname  cameraeffect ["internal", "back"]

btw in case u r usin da switchcamera command wen a unit is not in vehicle da unit dat uses da witchcamera command must b da player, so in dsi case it have 2 b da unit player dat will use da sniper rifle

LCD OUT
Title: Re:Some small camera-questions
Post by: Putin on 09 Oct 2002, 16:11:05
Thanks

I'll try that.