OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Skanderborgvej on 15 Jun 2004, 18:56:35

Title: realistic route
Post by: Skanderborgvej on 15 Jun 2004, 18:56:35
I made a little script, but when I tried it, it doesn't seems to be realisic...  :-\ I mean the missile doesn't follow a realistic route in the air.

Here's the script:

Code: [Select]
;
_plane = _this Select 0
_type = "nameofbomb"
_pos = GetPos _plane

_height = 1
_x = _pos Select 0
_y = _pos Select 1
_z = ( _pos Select 2) - _height
_posplane = [_x, _y, _z]

;
_bomb = _type camCreate _posplane
~0.01

;
_bomb setvelocity [10,0,20]

;
Exit

Feel free to tell me how to make this more realistic  ;) ;D

Thanks  ;)
Title: Re:realistic route
Post by: Dubieman on 16 Jun 2004, 02:55:31
I'm no good with setvelocity, but I've toyed with it and well it won't look realistic. I'm assuming this rocket is not under its own power when flying which is the reason for the script in the first place. Your taking a missile and making it move in a straight line via the coordinates 10,0,20. A real rocket or missile might slowly go down or up or side to side with wind or a guidance system.

Maybe a more complicated script that makes minor adjustaments in flight to make it looks like its moving around a little.  :P

Title: Re:realistic route
Post by: Skanderborgvej on 16 Jun 2004, 21:27:09
hehe, I would........ if I could.....  ;D
Title: Re:realistic route
Post by: Skanderborgvej on 17 Jun 2004, 12:20:00
I've got it....  ;D
I just added a setdir command (the bomb was created backwards, that's why it was so unrealistic)

Thanks anyway  ;)