Home   Help Search Login Register  

Author Topic: Flyby - Driveby camscript  (Read 1676 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
Flyby - Driveby camscript
« on: 03 Dec 2004, 05:39:47 »
Required
Basic knowledge of camscripting

What this script is :
This script creates a camera in front of a vehicle and follows it until it passes the camera. Once the vehicle moves away from the camera it starts to zoom in.
You don't need triggers, gamelogics,markers or whatever..., just the FB_DB.sqs and your own camscript.
It's a bit like the flyby-view in a flightsimulator.
It could save you a lot of time, because you don't have to place gamelogics along the vehicles route, this script creates them automatically, actually it creates two gamelogics, one for the vehicles position, the second one for the cameraposition.

Usage

You 'll have to run this in your camerascript  :
First create your camera :

Code: [Select]
_camera = "camera" camcreate [0,0,0]
_camera cameraeffect ["internal","back"]

Run the script via these parameters :

- camera id
- Vehicle to follow

Example

Code: [Select]
[_camera, truck] exec "FB_DB.sqs"
To exit the script :

Quote
flybycam = false
@flycamdone == 1


The first bolean is needed to exit the loops, the second variable is needed to prevent two camera's are running at the same time. (it also waits until the zooming has ended)

Known Issues :

- Random positions are nice but they have a downside, especially on groundlevel. Don't use the script in dense areas because you don't want a camera in a house so it's view is blocked. Also avoid hilly landscapes when you use it on LandVehicles.
- Not optimised for ships or troops.

Credits to Pablom123 for his mileagecalculator (I've use some parts from it)

Try the demo, no addons needed.
Suggestions are welcome.

-Blanco-

 
« Last Edit: 03 Dec 2004, 05:50:09 by Blanco »
Search or search or search before you ask.

Offline .pablo.

  • Former Staff
  • ****
  • When in doubt, empty the magazine.
Re:Flyby - Driveby camscript
« Reply #1 on: 09 Dec 2004, 01:56:27 »
i'll have to put that self-placing gamelogic trick in my mileagecalculator

thanks for accrediting me  :)

as for the demo, it all worked perfectly, so i can't think of any way you could improve upon it  :P