Home   Help Search Login Register  

Author Topic: Dont lock this! The earlier post Buggered up!  (Read 960 times)

0 Members and 1 Guest are viewing this topic.

zsa_zsa_rasputin

  • Guest
Dont lock this! The earlier post Buggered up!
« on: 24 Sep 2002, 17:03:25 »
MODERATORS: I posted this earlier but for some reason the thread solved ITSELF (I DIDNT) and therefore noone could reply...

The thread was:

 Camera Effects (See Command Reference Manual)
« on: September 17, 2002, 14:26 »  

--------------------------------------------------------------------------------
OK - Why can't you use the various built-in camera effects in a custom cutscene script...?

They work in triggetr, but when I try to implement any other external or internal in any scripts I'm writing Flashpoint just shuts down (No warning or error message - just back to windows  )

Because I specifically want to follow a vehicle in the cutcene I am making, but the various scripts I have seen I find to hard to implement...

All I want is to be able to attach the camera at a constant distance from the moving target and/OR have it static and follow the target with a panning motion...

Anyone tell me how to get those commands working properly AND/OR Give me some help with an easy script for it...?

Ta very much in advance
Dan  

DETAILS:
1> The vehicle I want to follow is called "DeliveryTruck"
BUT
2> I want the camera to FOCUS (Quite close) on a passenger (Cargo) in the truck called "Dan"

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:Dont lock this! The earlier post Buggered up!
« Reply #1 on: 25 Sep 2002, 05:31:11 »
Hey Zha!

I remember answering this same q on the old forum ages ago. And THAT was a simple script. I know what was missing. It didn't stay at the same position in relation to the vehicle.
Well here's a hint:
Quote
_cdir= getdir DeliveryTruck
_cycles = 0
_cam camsettarget DeliveryTruck
_cam camcommit 0
#track
_cycles = _cycles + 1
_cam camsetpos [(getpos DeliveryTruck select 0) + 35 * sin _cdir , (getpos DeliveryTruck select 1) + 35 * cos _cdir,3]
_cam camcommit 0
? _cycles == 400 : goto "moveon"
~0.0001
goto "track"

Now as both x & y are 35 and they are multiplyed with the sin & cos of the heading of the vehicle, the _cam is positioned always at a fixed position in relation to the vehicle.
So implement that to your script, fiddle with the numbers 35 but don't expect this to be easy, please. Then if u wan't to complicate things set it up as follows:
Quote
#moveon
_newfov = 0.7
_rotate = 0
_cdir= getdir DeliveryTruck
_cycles = 0
_cam camsettarget DeliveryTruck
_cam camcommit 0
#track2
_cycles = _cycles + 1
_newfov = _newfov - 0.01
_rotate = _rotate + 0.1
_cam camsetfov _newfov
_cam camsetpos [(getpos DeliveryTruck select 0) +_rotate + 35 * sin _cdir , (getpos DeliveryTruck select 1) + 35 * cos _cdir,3]
_cam camcommit 0
? _cycles == 400 : goto "ending"
~0.0001
goto "track2"

#ending
Now we have a zoom in there (_newfov) and a rotating movement (_rotate)... in which direction, I don't know  ;D Just a hunch.

To focus on some1 in the car  :-\ I wonder how u haven't figured that one out. I haven't tested anything like this out but naturally u can get the driver, commander and gunner of a vehicle like this:
_drv = driver vehicle DeliveryTruck
as "dan" is in cargo I'm out of answers.
« Last Edit: 25 Sep 2002, 05:33:21 by MI_Fred »
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.