How can I edit this script to make it work on any unit?
Something like [unit1,unit2] exec "napdeath2.sqs"
Right now I get an error message.
;======== MIF_napalmfx ===========;
; \--mif_nfx/napdeath2.sqs
;=================================;
; Napalm Death2: make the affected unit burn
_unit = _this select 0
;unit behaviour part, remove if necessary:
;----------------------------------------;
_unit setSpeedMode "FULL"
_lastPos = getPos _unit
_lastDir = getDir _unit
_unit doMove [(_lastPos select 0)-100+(random 100*2),(_lastPos select 1)-100+(random 100*2),0]
;----------------------------------------;
_d = getDammage _unit
#burn
drop ["cl_fire", "", "Billboard", 4, 2, [0,0,1], [1*(sin(_lastDir)),1*(cos(_lastDir)),1], 1, 1.225, 1, 0, [.5, 2.5+(random .5),5], [[1,1,1,0], [1,1,1,0.3], [0.3,0.3,0.3,0.5], [0,0,0,0]], [0,1,0], 0.1, 0.5, "", "", _unit]
_lastPos = getPos _unit
_lastDir = getDir _unit
_unit setDammage _d
~.01
_d = _d + .005
? (getDammage _unit) >= 1 : _i = 0; goto "lowburn"
goto "burn"
#lowburn
drop ["cl_fire", "", "Billboard", 4, 3, [(_lastPos select 0)-1+(random 1*2)*(sin(_lastDir)),(_lastPos select 1)-1+(random 1*2)*(cos(_lastDir)),_lastPos select 2], [0,0,0], 1, 1.125, 1, 1, [2, 1.5,.2], [[1,1,1,0], [1,1,1,0.3], [0.3,0.3,0.3,0.5], [0,0,0,0]], [0,1,0], 0, 0, "", "", ""]
_i = _i + 1
~.1
? (_i >= 400) : exit
goto "lowburn"