Jump to content

Weapon Object is nil during Event ID 28 (S_EVENT_KILL)


Recommended Posts

Posted (edited)

NOTE:  Event ID 28 is (S_EVENT_KILL)

local e = {}
function e:onEvent(event)
        local m = {}
        if event.id == 28 then
            if event.weapon then
                local m = event.weapon:getDesc().displayName
                trigger.action.outText(m, 15, false)
            end
        end
end


When I try to check event.weapon it is always nil. It won't go into that IF branch. This works on my local install but not on a dedicated server. So I think this is a bug on dedicated servers.

Edited by FallenFox
Posted

Edit: It looks like only certain weapon names are nil. I tried this with the HIT event as well. But it seems the AIM 120_C specifically will show as nil when involved in that event. Same goes for the R77, and some (maybe all) Aim-7s as well. Notably, the AIM-9 DOES return with the correct name

  • Recently Browsing   0 members

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