Jump to content

Play a File When a Target is destroyed. Need a Hint


H-var

Recommended Posts

Guys, I've been trying to set up this thing in my mission and I have managed to get it work, but it works only first time (it does not work after unit respawned), and sometimes it does not work at all.

I need it to play a file when a target is destroyed, even after it had respawned and then destroyed again. Do you know how to do it properly?

I think that it could be because of the ON CRASH trigger that I use, which probably works only once, and after the unit respawned, the trigger does not work anymore?

I'm using slmod. Maybe it can help?

 

Thank you. :smilewink:

The solution: use 3 SWITCHED ACTION + FLAGs

The problem was: ON CRASH + UNIT IN ZONE.


Edited by H-var

2. The DCS MOVIE information!

4. REAL UFO FOOTAGE

I don't trust anything that bleeds for five days, and doesn't die

 

government: gives me money because of coronavirus

me: spends all money on the missing DCS modules

government: ... you dumbo! We won't give you money anymore

me: It's ok. I don't need anything else - I now have the entire DCS collection

my cat: looking at the empty bowl for a while and goes back to sleep

me: it's hard times, Mig, suck it up!

 

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Use a switched condition. Just flip the flag off right under where you play the sound.

 

like paganus told, why you did not using flags?:

 

type:

 

  • 2continuous action or 3switched condition

conditions:

 

  • flag is true (#)

actions:

 

  • group snd or sound to (soundfile)

 

  • flag off (#)

Link to comment
Share on other sites

Hmm.. looks like you have all the actions in the trigger? The way it is setup now it will do all of the actions you have once the condition is met.

 

So yes it will play to all groups because you have defined an action to play a sound for every group that will fire in sequence once the trigger condition is true.

I7920/12GBDDR3/ASUS P6T DELUXE V2/MSI GTX 960 GAMING 4G /WIN 10 Ultimate/TM HOTAS WARTHOG

Link to comment
Share on other sites

try this here:

first - set a flag for the dead unit (flag number is depending on the number of flags in your mission)

second - if flag is true => sound

you need the flag off for a end of playin the soundfile

 

type:

 

  • 1 once

conditions:

 

  • unit or group dead

actions:

 

  • flag on (1234)

 

type:

 

  • 2continuous action or 3switched condition

conditions:

 

  • flag is true (1234)

actions:

 

  • group snd or sound to (soundfile)

 

  • flag off (1234)

Link to comment
Share on other sites

try this here:

first - set a flag for the dead unit (flag number is depending on the number of flags in your mission)

second - if flag is true => sound

you need the flag off for a end of playin the soundfile

 

 

did you check both in once? i did not meant try this and/or that

=> both (first AND second) must be in one mission

Link to comment
Share on other sites

Sorry, Eagle, I don't use it because I don't know how to write scripts, BUT! Check this out: http://forums.eagle.ru/attachment.php?attachmentid=82648&d=1369789738

It has some fancy scripting examples, which are very detailed.

 

I know the manual and i wrote my own scripts after this for my missions...

thatswhy i asked you to help with your script...but you have not yet begun with some...sorry WoAyumi.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...