

deathgun
-
Posts
4 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by deathgun
-
-
it lead to an error when i kill a S-300 LN. It's not a static objects.
-
I tried to use the kill event, but I found that it couldn't find the event.target. According to https://wiki.hoggitworld.com/view/DCS_event_kill, the event table should have the following members when id=29:Event = {id = 29,time = Time,initiator = Unit,weapon = Weapon,target = Unit,weapon_name = string,}However, when I executed a test script in the mission using doscriptfile:env.setErrorMessageBoxEnabled(true)local e = {}function e:onEvent(event)if event.id == 29 then -- killMessageToAll("type: " .. tostring(type(event)), 10, "DEBUG")MessageToAll("id: " .. tostring(event.id), 10, "DEBUG")MessageToAll("Time: " .. tostring(event.time), 10, "DEBUG")MessageToAll("Initiator: " .. tostring(event.initiator), 10, "DEBUG")MessageToAll("Weapon: " .. tostring(event.weapon), 10, "DEBUG")MessageToAll("Target: " .. tostring(event.target), 10, "DEBUG")MessageToAll("weapon_name: " .. tostring(event.weapon_name), 10, "DEBUG")endendworld.addEventHandler(e)The result is as the following image.How can i use 'kill' event correctly?
-
I put a FARP in Normandy2.0 and it's in blue coalition. It remained neutral after entering the game, even though I placed a blue MBT on it.
When it's placed within range of the airport, it changes back into the blue coalition.
I tested FARP on other maps and it all worked.
has the table of 'kill' event in function onEvent(event) correct elements?
in Scripting Tips, Tricks & Issues
Posted
Yep... I kill one S-300 Launcher in a M1A2.
Now I'm use EVENTHANDLER in M.O.O.S.E framework to handle 'kill' event instead of the DCS one. It works great and i can get the killer when the 'kill' event is triggered