OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: bored_onion on 24 Aug 2004, 16:00:32
-
?(getdammage gun >=0.9): goto exit
any idea what could be wrong with that?
thanks
-
getdammage is filled with bugs. That is why it is wrong.
:beat: *Gets Shot* :beat:
-
You can have
: goto "exit"
or
: exit
but not
: goto exit
-
Oh and that too...
But the point is still clear. Go beta test LCD's mission. :P
:beat: *Gets Shot* :beat:
-
ok i tried both of macguba's method's
no joy
so i suppose armsty is right...
any substitute commands or anything?
(ive tried !alive)
-
shud b
? not alive gun : goto "exit"
LCD OUT
-
bit of a solution oddessy going on here....
"?not alive gun: goto "exit" didn't work either...
i think that's because its an empty vehicle or something
so any other ideas?
-
u dont neeed da " @ da start
it doesnt matter if da vehicle is empty or not...can u post da whole script ? :P
LCD OUT
-
i didnt actually put them in i was just using " to distinguish it from the rest of the post (ill use code from now on)
the script is by Grendel namely simflak
he said in a thread that you could modify it should you want to as long as you credit him so i am
i just need it to stop when "gun" - empty shilka - dies
here it is:
?!(canfire gun) : exit
gnr dotarget air
~random(3)
#topv
~random(1)+1
_r=random(20)
aa setpos getpos gun
#topb
_dis=aa distance air
_dish=(500-_dis)/100
_disc=_dis*.1
_spd=(speed air)
_spdc=((_spd+_disc)/2)-random(15)
_aloc=getpos air
_ax=_aloc select 0
_ay=_aloc select 1
_adir=getdir air
_cx=_ax+(_spdc*(sin(_adir)))
_cy=_ay+(_spdc*(cos(_adir)))
ccip setpos [_cx,_cy]
_deg=[aa,ccip] call DirToObj
aa setdir _deg
;Grendel's Tracer Sim v.9
_ph= [air] call getASLheight
_gh= [aa] call getASLheight
?(_gh>_ph):goto "gh>ph"
_hdif=(_ph-_gh)
goto "getp"
#gh>ph
_hdif=(_gh-_ph)*-1
_atn=5
_hfac=(_hdif/4)-random(5)
goto "fire"
#getp
_atn=15
_hfac=(_hdif/4)+random(5)+_dish*3
#fire
_r=_r-1
gun_1 say "AK74single"
drop ["cl_fire", "", "Billboard", 1,30, [0,2,2], [0,200,_hfac+_atn], 0, 5, 1, 0, [.5],[[1,1,0,1],[1,1,0,1]],[0],0,0,"","",aa]
drop ["cl_basic", "", "Billboard", .2, .2, [0, 2, 2], [0, 0, 0], 0, 1.275, 1, 0, [1,2],[[0,0,0,0],[0,0,0,0]],[0],0,0,"","",aa]
drop ["cl_fire", "", "Billboard", .1, .1, [0, 2, 2], [0, 0, 0], 0, 1.275, 1, 0, [1,2],[[1,1,0,1],[1,1,0,1]],[0],0,0,"","",aa]
drop ["cl_fire", "", "Billboard", random(3), random(3), [0, 1, 2], [0, 0, 0], 0, 1.25, 1, 0, [1,2],[[.2,.2,.2,1],[.2,.2,.2,1]],[0],0,0,"","",aa]
~.15
?!(alive air):goto "done"
?(_r>0)and (alive air):goto "topb"
goto "topv"
#done
exit
youll notice i also tried the canfire command
thanks
-
i think da main prob is dat u didnt put dat code in da loop :P just outside ::)
so it checks only 1 taam if its dead nd den stops :P
LCD OUT
-
silly me....
hohum
thanks everyone