Jump to content

Prevent "KIA" message when deactivating friendly unit/group


oldmanflan

Recommended Posts

Scenario:

Group of enemy armor pops up on the map, automatically spawning a JTAC drone to lase the targets from above. I've got my trigger setup such that as soon as I've destroyed all the enemy units, the JTAC drone gets deactivated. However, when that happens, a pop-up message appears that the drone was "KIA". 

Is there a way to adjust the trigger or use a new flag to simply remove the friendly JTAC unit from existence without actually "killing" it and setting off the "KIA" mesage?


Edited by oldmanflan
Link to comment
Share on other sites

Group deactivate is more or less the same as killing the group. What you can do is when you deactivate the group also set flag X to true and then on the message trigger you have for saying the drone was KIA add an extra condition that flag X is false. 

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

2 hours ago, Grimes said:

Group deactivate is more or less the same as killing the group. What you can do is when you deactivate the group also set flag X to true and then on the message trigger you have for saying the drone was KIA add an extra condition that flag X is false. 

 Thanks for the quick response. I've read, then re-read what you suggested and I'm not sure I follow. I've attached a sample of a "mission complete" trigger I'm using, for reference:

This trigger:
1) Sends a "Mission Complete!" message when 90% of the enemy group is dead
2) Deactivates enemy group (labeled: Waypoint-1)
3) Deactivates JTAC drone (labeled: WPT-1)
4) Spawns another random mission (Flag "1")

Based on this, I'm not sure how I'd implement the Flag 1 is "True" and "False" conditions properly. Do I need a completely seperate trigger(s) for that? 

Sorry for being dense, I'm just now getting into this more complicated mission building. Any additional insight you can provide is greatly appreciated.

Thanks for your help!

 

DCS_9eItqRbRQk.png


Edited by oldmanflan
Link to comment
Share on other sites

In the actions for that trigger you can set a flag to on.

 

Then where-ever you have the other trigger setup to say the drone is dead add the condition "flag X is false" . 

 

So basically if the JTAC is killed before the target is destroyed it will display the KIA message because the group was killed and that flag is false. But if you destroy the target then it sets the flag to true and the condition of (drone is dead and flag is false) won't occur and the message won't display. 

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

8 hours ago, Grimes said:

In the actions for that trigger you can set a flag to on.

 

Then where-ever you have the other trigger setup to say the drone is dead add the condition "flag X is false" . 

 

So basically if the JTAC is killed before the target is destroyed it will display the KIA message because the group was killed and that flag is false. But if you destroy the target then it sets the flag to true and the condition of (drone is dead and flag is false) won't occur and the message won't display. 


Jesus, I don't know why I'm having so much trouble understanding this. I've created a new trigger so that the enemy group deactivation and the drone deactivation are in two separate triggers. 

The first screenshot is of the enemy group deactivation trigger. It deactivates the enemy group (Waypoint-1) and sets Flag 8 to "On".

The second trigger deactivates the drone (WPT-1) and spawns a new random mission from a pool of 40. In this trigger, I added the condition that Flag 8 is "False". 

However, in testing, when the enemy group deactivates, the drone continues flying and does not deactivate. 

I'm sure I'm overlooking something silly. But I simply cannot figure it out.

Enemy Group Deactivate.png

Drone Deactivate.png


Edited by oldmanflan
Link to comment
Share on other sites

After some tinkering, I got the drone to deactivate using a signal flare condition.

Trigger 1) Enemy group deactivates, sends a "Mission Complete" message, sets off a signal flare, and sets Flag 8 to "On"
Trigger 2) Friendly drone deactivates and vanishes with no KIA message and a new random mission gets spawned.

That said, I still don't understand why turning on a random flag (which isn't associated with the drone) prevents the KIA message from popping up. I tried the same configuration without the "Flag 8: On" variable, as well as having the "Flag 8: False" condition in the Drone deactivate trigger. In both cases, the KIA message pops up. And including the "Flag 8: False" condition in the drone deactivate trigger prevents the drone from deactivating at all. 

Nonetheless, the configuration I have now works (screenshots attached. But this one's a real head scratcher for me. 

  

Enemy Group Deactivate - New.png

Drone Deactivate - New.png


Edited by oldmanflan
Link to comment
Share on other sites

  • oldmanflan changed the title to Prevent "KIA" message when deactivating friendly unit/group

I was wrong. None of the above is working and the more I read your post the less sense it makes to me. 

First trigger deactivates the enemy group, activates a green signal flare, and sets Flag (8) to ON


Second trigger deactivates the JTAC if:
1) The signal flare is activated
&
2) Flag (8) is FALSE

 

With this configuration the JTAC never deactivates because Flag (8) was is not FALSE. 

Did you mean that I should have Flag (8) TRUE in the JTAC deactivate trigger? If so, that makes sense and I'm testing it now. 

Link to comment
Share on other sites

If I don't mistake, Grimes gave you procedure to avoid displaying "KIA" if Jtac is not killed but "despawned" by trigger (with "flag" set to true), but assuming this message was displayed by one of your own trigger.
Knowing that you use the autolase script, this "flag"-check procedure must be used inside the script itself. (you have to be able to modify the script for that purpose)

Link to comment
Share on other sites

18 hours ago, toutenglisse said:

If I don't mistake, Grimes gave you procedure to avoid displaying "KIA" if Jtac is not killed but "despawned" by trigger (with "flag" set to true), but assuming this message was displayed by one of your own trigger.
Knowing that you use the autolase script, this "flag"-check procedure must be used inside the script itself. (you have to be able to modify the script for that purpose)


Yep! I managed to add confusion on top of confusion. 

@Grimes - I appreciate the help. Thank you. 

I ended up figuring it out, last night. The issue was definitely with the Autolase lua script. I edited the line that said "KIA!" and changed it to "RTB!". When I initially did this, it didn't seem to work. It was still giving me the "KIA!" message, leading me to go back to the drawing board and start messing with a signal flare condition and then even a "time since flag" condition. 

But, in the end I discovered that I had to duplicate the autolase script and upload the new one, in order for ME to recognize the change. After doing that, the problem is solved. 


Edited by oldmanflan
Link to comment
Share on other sites

  • Recently Browsing   0 members

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