Home   Help Search Login Register  

Author Topic: Follow that chopper!! (Cam script)  (Read 1680 times)

0 Members and 1 Guest are viewing this topic.

B-2-0

  • Guest
Follow that chopper!! (Cam script)
« 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:

jojojoni

  • Guest
Re:Follow that chopper!! (Cam script)
« Reply #1 on: 22 Apr 2003, 15:36:54 »
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"

jojojoni

  • Guest
Re:Follow that chopper!! (Cam script)
« Reply #2 on: 22 Apr 2003, 15:40:39 »
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.

B-2-0

  • Guest
Re:Follow that chopper!! (Cam script)
« Reply #3 on: 22 Apr 2003, 15:41:55 »
Now that's what i call service!! ;D

Thanx a lot mate!! :cheers: :thumbsup:

B-2-0

  • Guest
Re:Follow that chopper!! (Cam script)
« Reply #4 on: 22 Apr 2003, 17:59:58 »
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?? ???

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Follow that chopper!! (Cam script)
« Reply #5 on: 22 Apr 2003, 18:04:06 »
i think u shud put @ da start of da script

vehiclecamstop = false

but im not sure ;)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

B-2-0

  • Guest
Re:Follow that chopper!! (Cam script)
« Reply #6 on: 22 Apr 2003, 18:11:49 »
B4 or after the #loop line??

B-2-0

  • Guest
Re:Follow that chopper!! (Cam script)
« Reply #7 on: 22 Apr 2003, 18:16:13 »
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

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Follow that chopper!! (Cam script)
« Reply #8 on: 22 Apr 2003, 18:21:24 »
k - i can c 2 probs in here

1)
Quote
_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
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

B-2-0

  • Guest
Re:Follow that chopper!! (Cam script)
« Reply #9 on: 22 Apr 2003, 18:30:40 »
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"

jojojoni

  • Guest
Re:Follow that chopper!! (Cam script)
« Reply #10 on: 22 Apr 2003, 18:34:42 »
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!!!
« Last Edit: 22 Apr 2003, 18:39:13 by jojojoni »

B-2-0

  • Guest
Re:Follow that chopper!! (Cam script)
« Reply #11 on: 22 Apr 2003, 19:17:25 »
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

jojojoni

  • Guest
Re:Follow that chopper!! (Cam script)
« Reply #12 on: 22 Apr 2003, 19:55:45 »
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.
« Last Edit: 22 Apr 2003, 20:05:38 by jojojoni »

B-2-0

  • Guest
Re:Follow that chopper!! (Cam script)
« Reply #13 on: 22 Apr 2003, 20:33:38 »
 ;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! :-\

jojojoni

  • Guest
Re:Follow that chopper!! (Cam script)
« Reply #14 on: 23 Apr 2003, 18:06:57 »
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.