Jump to content

Recommended Posts

  • 2 weeks later...
Posted (edited)
On 1/2/2023 at 6:54 AM, Flappie said:

S_EVENT_DEAD works on my end for both static and non-static units. Please attach a track showing your issue.

S_EVENT_DEAD.trk 151.2 kB · 0 downloads

I've just come across the same problem - but only with some static units. 

Attached is an example of one where it works for a non-armoured unit, for a static object (FARP) but not for another static object (COW). This used to work in 2.7 as I used to have script where avoiding killing livestock was part of the mission parameters.

To replicate, please run the mission and observe in game master slot.

 The code I'm testing with is:

local e = {}
  function e:onEvent(event)
  if event.id == world.event.S_EVENT_DEAD then
      trigger.action.outText('Event Dead ocurred', 60)
      if event.initiator:getTypeName() then
           trigger.action.outText('TYPE NAME: '..event.initiator:getTypeName(), 60)
        end  
  end
end
  world.addEventHandler(e)

 

I also used to use the following MOOSE function which no longer works, (as I think it may be linked to the above):

e = EVENTHANDLER:New()
e:HandleEvent(EVENTS.Dead)
function e:OnEventDead(EventData)
    if EventData.IniTypeName == "Cow" then
      DoMissionFailure() -- Trigger mission failed for killing livestock  
    end
end

Attached is a .miz file to demonstrate the problem. Simply run and observe in game master slot. The bus is fine, as is the ammo depot, but the cow no longer triggers when dead.

FWIW I tried S_EVENT_UNIT_LOST  as mentioned elsewhere as a workaround and this hasn't resolved the issue either.

Cheers

-DZ

 

debug-eventdead.miz

Edited by Dangerzone
Posted

Just a bit confused on what to do here, and looking for advise. 

The thread is tagged "can not replicate" due to the OP. I'm not sure if that means this thread is now in the 'ignored' list now for ED?

Is the right procedure to start a new thread with the track file and mission, or to post here as I have done?

  • 1 month later...
Posted

Guys, this saved me in Liberation. It uses "dead" and even "crashed" and the outcome is anything but predictable or correct. Using "lost" solved it. I just have to manually edit dcs_liberation manually

 

Thanks!

  • 9 months later...
Posted

The issue happens with the following units:

  • Animals (namely cows),
  • Static aircraft,
  • Buildings (except those that exist as non-static units: portable TACAN beacon, bunkers, outposts...).

It's reported internally.

 

  • Thanks 2

---

  • Recently Browsing   0 members

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