OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Nobby on 17 Dec 2002, 23:15:24
-
How do you get a unit to spray MG fire instead of aiming?
e.g A unit fires from left to right OVER the "crawling" training object whilst another unit crawls UNDER the MG fire.
I know the doFire command will come up somewhere, and all attempts have come up short. Any help will be muchos appreciated.
Cheers
Nobby.
-
well ive seen a demo missoin for this somewhere...
youve gotta make 2 connected crawling thingys, then make a m2 machine gun a few yards away. in a script, do this
#loop
machinegun dowatch crawlingthingy1
machine fire [browning, browning]
machinegun dowatchcrawlinthingy2
~.01
goto "loop"
or sumthin like that
what it does is makes the machine gun constantly fire ammo, while the machine gun swivels to watch crawling #1, then swivel over to watch crawling #2, so the machine gun sprays fire everywhere over the crawling things.
-
...so, isn't there an easier way to say, just make a Machine Gunner (M60) just spray in a general direction?
O Neil
:gunman:
:gunman:
:gunman: :help:
:gunman:
:gunman:
:gunman:
-
haha well that is the only way i have found to do this...or a similar way to do it...i just use the camera objects (tall grass i believe) and set 2 of them then do this basic thing and it will make the guy spray and pray basically
-
doWatch also works with a position instead of an object (according to ComRef):
unit doWatch [x,y, z]
hence you don't need the target objects:
;spraying around the target position [_x, _y, 0], scattering = +- 5 meters
#loop
machinegun doWatch [_x + (random 10) - 5, _y + (random 10) - 5 , 0]
machinegun fire [browning, browning]
~0.1
goto "loop"
Spinor
-
hmm actually that is a really MUCH better way of doing it thanx...