OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Trajectory7 on 05 Nov 2002, 18:15:33
-
I need a hand with the competion of a script that creates a flare to mark a LZ. Heres what i got:
-------------------------------------------------------
_markerd = _this select 0 game logic
_thing = _this select 1 flare
_xl = getpos _markerd select 0
_yl = getpos _markerd select 1
_Zl = getpos _markerd select 2
bang = _thing camcreate [_xl, _yl, _zl]
exit
---------------------------------------------------------
I know it creates _thing as if i make _thing = "heat120" it works fine.
Also if i put _zl + 10 in the second to last line i see the flare fall, it just never goes off!.
I aim to have a script that creates (Continuously) a flare by a heli-pad so it's visable at night.
Ideas?
-
I am using the artillery script, which I modified a for any kind of ammo. I am using "FlareYellow" set to something like 100 ft for battlefield illumination at night. Works just fine for me.
But my flares extinguish when they hit the ground...
However, I do not know why you have to assign _tempObj to objNull. This was already in the artillery script...
_tempObj = _AmmoType camCreate [_xl,_yl,_zl]
~0.01
_tempObj = objNull
For a continued flare-burn, check how long a single flare burns, wait for that amount of time, and then loop the last 3 lines.
-
thanks i'll give it a try.
:cheers:
-
:help:
Thanks again lancer512
that does make my flare light up however if i set its x coordinate at 0 it doesn't go off/ goes off below terrain. and second it doesn't really give the effect i want; it needs to appear to be at groundlevel and continuously burn there.
:help:
-
(correction refering to z coordinate in last post)
-
um...before you say "what an idiot he keeps replying to his own post!" i just want you to know that the stream of posts by my keyboard represent the endless remblings flowing though my mind over this matter whilst waiting for anymore input and here i am again.
NEW IDEA: CHANGE THE COLOUR OF A FIRE
i finally found a ruway lightup script and it seems that fires were placed as a solution to my problem. However i think it looks pretty naff up close, but a comprimise would be a white "flame" and smoke.
thoughts?
-
Well, the other thing you can do is nail the flare in place:
#startcamcreating
_hack = _time + 17
_bang = "Flare" Camcreate [ _xl, _yl, 500]
~2
goto "loop"
#camcreatestuff
_hack = _time + 2
_bang = "Flare" Camcreate [ _xl, _yl, 500]
#OldLoop
_oldbang setpos [_xl, _yl, 2]
~.01
?_time < _hack:goto "OldLoop"
_hack = _time + 15
#Loop
_bang setpos [_xl, _yl, 2]
~.01
?_time < _hack:goto "Loop"
_oldbang = _bang
goto "OldLoop"
-
You might want to try the attached addon - The runway markers should be in the empty objects category. Set the glowing using inflame true. There not very bright, but better than using a fire.
Cheers
-
thanks Dinger and Bremmer. I din't fully understand your scripts (especially bremmers) however you provided the inspiration for the script i just created to solve my problem.
It creates a flashing becon at a desired location at ground level, perfect for helipads and runway lights as well as other markers etc...
It works great!
...anyway...cheers guys. :thumbsup: :wave: