OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: rhysduk on 08 Oct 2003, 19:19:29
-
Hi all i need help with "notalive" syntax ;-
I have 4 tanks, when thye are all dead .. i stress hte word ALL and not just when one of hte four tanks is destroyed... when these four tanks are destroyed i need a script to be activated...
I can do the exec "script.sqs" bit . but it is the not alive part i am having trouble with..
not alive [tank1,tank2,tank3,tank4] doesnt work
-
You'll need one condicion for each tank ;)
not alive tank1 AND not alive tank2 AND not alive tank3 AND not alive tank 4
-
cond field: !(alive tank1) and !(alive tank2) and !(alive tank3) and !(alive tank4)
on act field: [] exec "script.sqs"
:beat: *Gets Shot* :beat:
-
or
"not alive _X" count [tank1,tank2,tank3,tank4] == 4
;D
LCD OUT
P.S 4 tanks its beter use - not canmove or not canfire - cuz dey somtimes cant move n fire but dont die :P :-X
-
or more simply
Condition: not alive tank and tank2 and tank3 and tank4
On Activation: [] exec "myscript.sqs"
-
Wow thanks guys.... so many suggestions..
i shall try them all out and let you know ASAP :D
Rhys
-
@ maxy - stop lookin @ em pics n look wat u write
Condition: not alive tank and tank2 and tank3 and tank4
den it checks only if tank1 is not alive :P
nd dis way tries (nd fails) 2 use complete syntax like armsty n knut did :P ::)
LCD OUT
-
Just to sum up what u said LCD :-
@Knut
I get an Error Message of "Uknown Operator"
@Sir Armsty
Works perfectly ;D Thanks!
@LCD
Works perfectly also ;D Thanks again ;D
@max_killer_payne
i get a message of "Error and: Type Object, Expected Bool"
So i have it working.... Topic will be left open until friday !
Thanks Guys
Rhys
-
LCD is right, and I'd suggest you use his solution.
See, if a tank gets hit on the gunbarrel or one of the tires etc. then it obviously cease to fire/move, and thus it is "dead" but the CREW may still be alive (or at least one crew member), sitting inside smoking weed or whatever... ::)
To use the !(alive ---) would be best if you then used a pre-condition, like:
damage tank1 >0.8: tank1 setDammage 1
then the crap WILL explode once it is seriously hit, and THEN ya can use the !alive crap :-*
-
im alwayz right :P ;D (xeptwen im wrong ::))
@ rhy - tomb talks bout is dis line ;)
P.S 4 tanks its beter use - not canmove or not canfire - cuz dey somtimes cant move n fire but dont die
LCD OUT
-
LCD check the babes topic i updated it again ;D :o
-
Thanks guys... Much appreciated ;D
Topic locked...
-
Glad you're problem is solved.. Now all you have to do is to click the "solve topic" button ;)
-
LOL YEha thats the bit i forgot about ::) ;D
Thanks again guys !
Rhys