OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: punisher on 22 Apr 2003, 17:25:41

Title: Detecting if a object is destroyed
Post by: punisher on 22 Apr 2003, 17:25:41
hi
i my mission i have a BMP.When it is destroyed i want a message coming up saying "they are hostile!"

well i know how to do the message but i need to know te first bit.
Title: Re:Detecting if a object is destroyed
Post by: Iwesshome on 22 Apr 2003, 17:41:03
I wonder if you could put this in a trigger? Saw this from Macguba and added to it... hope it works  ;D

1. Name the BMP = loon1.    
2. Create a trigger.

East
Not Present
Condition: true
On activation: ?!(alive loon1): exit
Your saying
 
The beating's... The beating's.... I need more Macguba
Title: Re:Detecting if a object is destroyed
Post by: Artak on 22 Apr 2003, 18:02:13
Umm.. no.

You should put in a trigger with no radius at all and type in it's condition field

not alive loon1

assuming you've named the bmp as loon1
and in it's activation field

titletext ["They are hostile!",Plain]

What this does is it detects if the bmp is alive and when it's not it activates a line of text.
Title: Re:Detecting if a object is destroyed
Post by: Iwesshome on 22 Apr 2003, 18:04:35
Oh well... I tried :beat:
Title: Re:Detecting if a object is destroyed
Post by: punisher on 22 Apr 2003, 18:27:29
i tryed your thing but it just says

"error type any,expected string" when i have destroyed the tank. ???

Title: Re:Detecting if a object is destroyed
Post by: Tomb on 22 Apr 2003, 18:47:42

...i have a BMP.

When it is destroyed i want a message coming up...




=====================

:afro: Remember ONE important thing, d00d  :o iiiiiiiiiiiiiit's the creeeeeeeeeewwww!  :D 8) ;D

 :D see! We have this BMP, and inside we have these 3 morons trying to steer the croc'  ;D
And if ya hit the croc with a LAW - well, sure it blows up but it takes a few sec's for the game engine to actually REALIZE that 3 AI-morons are nolonger part of the game!  :-X

Sö, if ya don't mind, i'd recommend that YOU set the trigger to WAIT at least 10 seconds AFTER the blow(up)job ( :thumbsup: ) is all done; this way, you have a fairly good chance of seeing that text popping up on the dayum screen!  :D

Set the trigger to 10   10   10  (the three countdown fields in the trigger window).

...or wuz it "timeout"  ??? ;D

in short: yer bug might be that the game simply donesn't get enough time to detect wether or not the crew is wasted.
Sometimes yanno, one or two crew members rush out of an exploding vehicle.  :-\ :)

Ya COULD try to add some kind of detection of the crew's health?!

i.e.  :

NOT(alive BMP1d) AND !(alive BMP1c) && !(alive BMP1g) AND !(alive BMP1)

...or alike  :P :-* ;D

and remember the delay of the trigger!!

==================================

PS.   About the text: just let some member of your own group say the words.
         NAME the guy who's supposed to speak ""BOB", and then put this in the trigger:

Bob sidechat "Hey! They're hostile."

...or as macguba put it: just a hint  :-* ;D (waddup mac!!)  8)
Title: Re:Detecting if a object is destroyed
Post by: macguba on 22 Apr 2003, 18:49:20
@ IW (http://www.spielerboard.net/images/smilies/lool.gif)

@ punisher - what Artak said should work, you've probably just got a typo somewhere.     You could try

hint "They are hostile!"

instead of the titletext.

Sometimes it's better not to use alive, and instead put this

(not canMove loon1) and (not canFire loon1)

This means you don't get that annoying bmp-looks-dead-but-isn't-so-the-objective-won't-complete problem.
Title: Re:Detecting if a object is destroyed
Post by: Iwesshome on 22 Apr 2003, 19:30:03
(http://66.227.101.70/contrib/edoom/spacecraft.gif)

I see the light now... No, thats not the light (http://66.227.101.70/ups/dvx_rune/offtheair2.gif)


Thanks for clearing that up.... my head hurts now
Title: Re:Detecting if a object is destroyed
Post by: LCD on 22 Apr 2003, 19:48:41
(http://www.spielerboard.net/images/smilies/lool.gif)

macs (i gave it 2 him ;)) smilies r lots more funny :P

but dat 1 is prety kool

IW = (http://66.227.101.70/contrib/edoom/spacecraft.gif)

LCD OUT
Title: Re:Detecting if a object is destroyed
Post by: Iwesshome on 22 Apr 2003, 19:55:47
Ok... Ok... Before we get to far off topic (Feel like I am getting my Ar$$ kicked)  ::)