Jump to content

Recommended Posts

Posted

The Kill event has been inconsistently firing for me since the patch that changed up Event functionality.

What I see now is the following. In a simple mission with scripting to show each Hit, Kill, and Unit Lost event I get something like the following:

 

nullimage.jpeg

 

Hit and Lost show up for all four targets. However, Kill is only showing up some of the time. Prior to the patch I would always get the Kill event (when a unit is killed by a weapon). Now its inconsistently firing.

The script code is as follows:

EventHandlerHit = EVENTHANDLER:New()
EventHandlerHit:HandleEvent(EVENTS.Hit)
function EventHandlerHit:OnEventHit(EventData)
    MESSAGE:New( EventData.TgtUnitName .. " was hit." , 300):ToAll()
end

EventHandlerKill = EVENTHANDLER:New() 
EventHandlerKill:HandleEvent(EVENTS.Kill) 
function EventHandlerKill:OnEventKill(EventData) 
    MESSAGE:New( EventData.TgtUnitName .. " was killed." , 300):ToAll() 
end

EventHandlerLost = EVENTHANDLER:New() 
EventHandlerLost:HandleEvent(EVENTS.UnitLost) 
function EventHandlerLost:OnEventUnitLost(EventData) 
    MESSAGE:New( EventData.IniUnitName .. " was lost." , 300):ToAll() 
end

 

As a side note. I've conducted this particular test several times. The Kill event never shows up for the Flankers. However, it sometimes shows up for the Fencers (though not always). This has happened often enough that I think there is a correlation between the event not firing and the type of aircraft involved.

 

Mission file is also attached.

LuaEventTesting2.miz

Posted

UPDATE: After yesterday's patch the Kill event is going out every time. However, I see that it is being triggered once upon Kill from a weapon and again when the wreckage impacts the surface (like a crash). On the MOOSE discord I was told that this is a known issue. But it would be nice to have confirmation from ED that this is indeed the case. Thanks.

 

null

image.jpeg

  • Recently Browsing   0 members

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