OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: B-2-0 on 22 Apr 2003, 14:46:26
-
I am starting my map off with my team of 12 being flown in by 2 littlebirds and i have my idea for how my intro will go....but i can't figure out how to get the camera to follow my choppers.....i have searched the tutes but they all just show u how to get the cam to move to a stationary object....can anyone help me pls? :)
P.S. If someone would be kind enough to paste me a script that i could play with and adjust to my specifications that would be amazing!! 8)
Thanx in advance :thumbsup:
-
Here it is ;):
#loop
; set posn relative to vehicle
_cam camsettarget chop
_cam camsetrelpos [choose the position of the camera]
#commit
_cam camcommit 0
; aim camera at target
_cam camsettarget chop (you can choose another target, so it will be more dynamic)
_cam camcommit 0
~0.01
? NOT(vehiclecamstop) : goto "loop"
-
I forgot one thing: At any trigger (on activation field) or script write this:
vehiclecamstop = true
, so when that trigger/script is actived the vehiclecam stops and the intro continues with the next scene.
-
Now that's what i call service!! ;D
Thanx a lot mate!! :cheers: :thumbsup:
-
That script doesn't seem to work dude....I've created the script and it's in the right place and all.....i ironed out all my errors but it just isn't activating, i can just see my chopper from the back as tho i am flying it....i tried putting the exec command in the chopper's init field and i also tried it with a trigger but no joy.....i am not getting any error messages either....u know what i am doing wrong?? ???
-
i think u shud put @ da start of da script
vehiclecamstop = false
but im not sure ;)
LCD OUT
-
B4 or after the #loop line??
-
Hmm...doesn't work either way.
Here is the script...
vehiclecamstop = false
#loop
_cam camsettarget Bird1
_cam camsetrelpos [front]
#commit
_cam camcommit 0
_cam camsettarget Bird2
_cam camcommit 0
~0.01
? NOT(vehiclecamstop) : goto "loop"
Bird1 and Bird2 are the choppers
-
k - i can c 2 probs in here
1)_cam camsetrelpos [front]
u need 2 use [X,Z,Y] - wich r relative positions - play w/ nums 2 find wat u want
2) u cant follow 2 chopers dat way - putin name of da 1st 1 nd after dat of da oder wont help u :-\
LCD OUT
-
Still not working mate...here's the script now...
vehiclecamstop = false
#loop
_cam camsettarget Bird1
_cam camsetrelpos [4, 4, 1.5]
#commit
_cam camcommit 0
_cam camsettarget Bird1
_cam camcommit 0
~0.01
? NOT(vehiclecamstop) : goto "loop"
-
In the script you must have created a camera named _cam ;). Have you done it?
And you can follow both helos with this script. If you put first bird1 and then bird2 the trajectory of the cam will follow bird1 pointing at bird2. If you can keep bird1 on the cam's field of view youÂ've done it: the cam is following both helos :) :D!!!
-
Abso-bloody-lutely marvelous!!! ;D
I now have the makings for my intro....here is the finished script...
-----------------------------------------------------------------------------------------------
vehiclecamstop = false
#loop
_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "front"]
_cam camsettarget Bird1
_cam camsetrelpos [6, 10, 1.5]
#commit
_cam camcommit 0
_cam camsettarget Bird2
_cam camcommit 0
~0.01
? NOT(vehiclecamstop) : goto "loop"
----------------------------------------------------------------------------------------------
Thanx loads u guys...very much apprieciated :thumbsup:
I am assuming i can create a vehicle stopcam trigger half way down the chopper run and then create another script and trigger to maybe view at another angle?? I would have to black out and black in briefly tho to make it flow..... or could i just put the vehiclecamstop command in the activation field and the new exec command in the deactivation field of a small trigger i wonder...??
Man....this time last week i was looking at the editor and checking out the tutes thinking...."How the hell do u do that!"....then i looked at a tute map and nearly gave up on the idea but with a weeks perseverance (and lots of help from the various ppl who have compiled tutes and forums of course ;))i now have an 80% complete map!!
Don't u just love OFP!!! ;D
-
Hey, if you want to change the angle you can do that in the same script!
You only have to copy everything from
>vehiclecamstop = false
#loop
...
to
>...
~0.01
? NOT(vehiclecamstop) : goto "loop"
Paste it at the end of the script and change three things:
1-Where it says "#loop" change it and write "#loop1".
2-Where it says "? NOT(vehiclecamstop) : goto "LOOP"" change it and write "? NOT(vehiclecamstop) : goto "LOOP1"".
3-Where it says "#commit" delete it ( :o IÂ've noticed you can delete it, it isnÂ't useful in anyway!!!).
And of course change all the values you want to, in order to change the angle (or whatever you want to change).
Another thing: I would place the following lines
_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "front"]
before the line "#loop", just to avoid errors when continuing the script ;).
Remember to destroy the camera at the very end of the script.
See u :D.
-
;D Dude u just can't stop giving!!! Ok....i got all that down but one thing is still anoying me....i have added the line....
titlecut ["ETA 1 minute", "black out",2]
Now it blacks out and shows the text but it just stays black....is this because i am using the loop and how do i get it to black back in again.....a trigger that deactivates the script and then activates the same script but with the line....
titlecut ["Hi again", "black in",2]
...doesn't work! :-\
-
I think you should put all the "additional stuff "(IÂ'm refering about camcreates, text lines and so on) before the "#loop" line. As I said before ;), itÂ's a good way to avoid errors.