OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: armybikos on 05 Jun 2003, 21:20:30

Title: Smoke Generator by Kegety
Post by: armybikos on 05 Jun 2003, 21:20:30
I would like to get the Lynx smoke generator vehicle to lay down a smoke screen accross the battlefield. I cant figure out the line in the init field to get it to lay a constant smoke trail. I used

lynx fire "kegsmokegenerator"

but it only fires once and wont follow the waypoints
any help or suggestions are appreciated.
Title: Re:Smoke Generator by Kegety
Post by: Kaliyuga on 05 Jun 2003, 21:42:42
you could always try a simple script  like this:


smokin.sqs  

#loop
lynx fire "kegsmokegenerator"
~.1
goto:loop
end

of course this will make him fire in an endless loop until he's out of ammo...

you could always start with less ammo or remove the rest of the ammo via a trigger when you wanted to stop it

(http://home.earthlink.net/~kaliyuga420/SouthPark/towelie_icon.gif) and don't forget to bring a towel
Title: Re:Smoke Generator by Kegety
Post by: armybikos on 05 Jun 2003, 23:39:59
thanks for the script idea i tried it but it only will fire once, I tried messing with your original script but I cant seem to make it work. Got any other ideas?
Title: Re:Smoke Generator by Kegety
Post by: LCD on 06 Jun 2003, 00:01:50
yeah u cud fix Kalis script ::)

da code shud b

Code: [Select]
#loop
lynx fire "kegsmokegenerator"
~.1
goto "loop"

LCD OUT
Title: Re:Smoke Generator by Kegety
Post by: armybikos on 06 Jun 2003, 00:05:13
Thanks man that worked great
Title: Re:Smoke Generator by Kegety
Post by: LCD on 06 Jun 2003, 00:10:45
kool

now solve da prob (use da solve bottom ;D)

LCD OUT
Title: Re:Smoke Generator by Kegety
Post by: Babalon on 06 Jun 2003, 00:24:13
Well, it depends how much ammo that machine has to make it work for ever.  If you need it to work until the end of time on that mission, its a simple addition ot that loop the LCD gave you to fix the problem.

And if you dont want the machine ot work forever, then its a small addition to LCD's mini-script he gave you.

IE: Want the sucker to run for 5 minutes.

First, transform 5 minutes into second.   So 300 seconds.  Change the _duration variable from 300 to whatever you want.

Quote
_duration = 300

_loops = 0.1 / _duration

_i = 0

#loop
~0.1
lynx fire "kegsmokegenerator"
_i = _i + 1
?( _i < _loops) : goto "loop"

exit