Home   Help Search Login Register  

Author Topic: Slow Falling, long lasting flare script  (Read 1870 times)

0 Members and 1 Guest are viewing this topic.

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Slow Falling, long lasting flare script
« on: 03 Dec 2005, 23:09:17 »
This script makes flares shoot further, fall slower and burn longer.  If the flare is launched during the day, a smoke shell is created to track the flare path (since the flares do not show during the day).

The script uses my getAlt function which is also new.  The getAlt function will provide the sea level altitude of an object, the above ground altitude (both with getPos select 2 and by finding the distance to the ground), the sea level altitude of the terrain at the objects 2D postition and whether the object is over water or not.

I employed the use of the this function because flares and smoke have some strange altitude behaviour.  When they are setPos or createVehicle, the z parameter must be referenced to sea level, but when you do a getPos on them the z parrameter is referenced to the above ground level.  The getAlt function therefore simplifies the scripting involved with creating and positioning the flares/smoke.
« Last Edit: 04 Dec 2005, 06:18:01 by Raptorsaurus »

Offline Blanco

  • Former Staff
  • ****
Re:Slow Falling, long lasting flare script
« Reply #1 on: 09 Dec 2005, 00:59:54 »
Works great, no problems found. :)


Search or search or search before you ask.

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:Slow Falling, long lasting flare script
« Reply #2 on: 09 Dec 2005, 07:32:40 »
OK, great, I will upload it to the editor depot!