OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: rhysduk on 08 Oct 2003, 19:19:29

Title: not alive : Ahhhhhhh !!!
Post 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
Title: Re:not alive : Ahhhhhhh !!!
Post by: Knut Erik on 08 Oct 2003, 19:21:09
You'll need one condicion for each tank  ;)

not alive tank1 AND not alive tank2 AND not alive tank3 AND not alive tank 4
Title: Re:not alive : Ahhhhhhh !!!
Post by: dmakatra on 08 Oct 2003, 19:21:53
cond field: !(alive tank1) and !(alive tank2) and !(alive tank3) and !(alive tank4)
on act field: [] exec "script.sqs"

:beat: *Gets Shot* :beat:
Title: Re:not alive : Ahhhhhhh !!!
Post by: LCD on 08 Oct 2003, 19:23:25
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
Title: Re:not alive : Ahhhhhhh !!!
Post by: max_killer_payne on 08 Oct 2003, 20:06:33
or more simply

Condition: not alive tank and tank2 and tank3 and tank4
On Activation: [] exec "myscript.sqs"
Title: Re:not alive : Ahhhhhhh !!!
Post by: rhysduk on 08 Oct 2003, 20:12:55
Wow thanks guys.... so many suggestions..

i shall try them all out and let you know ASAP :D

Rhys
Title: Re:not alive : Ahhhhhhh !!!
Post by: LCD on 08 Oct 2003, 21:17:39
@ maxy - stop lookin @ em pics n look wat u write

Quote
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
Title: Re:not alive : Ahhhhhhh !!!
Post by: rhysduk on 08 Oct 2003, 23:23:32
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
Title: Re:not alive : Ahhhhhhh !!!
Post by: Tomb on 09 Oct 2003, 13:05:05

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  :-*


Title: Re:not alive : Ahhhhhhh !!!
Post by: LCD on 09 Oct 2003, 15:28:18
im alwayz right :P ;D (xeptwen im wrong ::))

@ rhy - tomb talks bout is dis line ;)

Quote
P.S 4 tanks its beter use - not canmove or not canfire - cuz dey somtimes cant move n fire but dont die

LCD OUT
Title: Re:not alive : Ahhhhhhh !!!
Post by: max_killer_payne on 09 Oct 2003, 18:44:23
LCD check the babes topic i updated it again  ;D  :o
Title: Re:not alive : Ahhhhhhh !!!
Post by: rhysduk on 09 Oct 2003, 18:45:06
Thanks guys... Much appreciated ;D

Topic locked...

Title: Re:not alive : Ahhhhhhh !!!
Post by: Knut Erik on 09 Oct 2003, 19:22:30
Glad you're problem is solved.. Now all you have to do is to click the "solve topic" button  ;)
Title: Re:not alive : Ahhhhhhh !!!
Post by: rhysduk on 09 Oct 2003, 23:18:09
LOL YEha thats the bit i forgot about  ::)  ;D

Thanks again guys !

Rhys