-- created by Hardcard local Event_Handler = {} function Event_Handler:onEvent(Event) if Event.id == 8 and Event.initiator ~= nil then -- If it's a DEAD Event and the initiator is reachable local InitiatorObject = Event.initiator local InitiatorName = InitiatorObject:getName() local InitiatorCategory = InitiatorObject:getCategory() if InitiatorName == "Batumi" and InitiatorCategory == 4 then -- If the name and type of the object that has been destroyed match those of the specified runway trigger.action.setUserFlag("1", 1) -- sets the desired flag to a value of 1 end end end world.addEventHandler(Event_Handler) --lista the eventos: --world.event = { --S_EVENT_INVALID = 0, --S_EVENT_SHOT = 1, --S_EVENT_HIT = 2, --S_EVENT_TAKEOFF = 3, --S_EVENT_LAND = 4, --S_EVENT_CRASH = 5, --S_EVENT_EJECTION = 6, --S_EVENT_REFUELING = 7, --S_EVENT_DEAD = 8, --S_EVENT_PILOT_DEAD = 9, --S_EVENT_BASE_CAPTURED = 10, --S_EVENT_MISSION_START = 11, --S_EVENT_MISSION_END = 12, --S_EVENT_TOOK_CONTROL = 13, --S_EVENT_REFUELING_STOP = 14, --S_EVENT_BIRTH = 15, --S_EVENT_HUMAN_FAILURE = 16, --S_EVENT_ENGINE_STARTUP = 17, --S_EVENT_ENGINE_SHUTDOWN = 18, --S_EVENT_PLAYER_ENTER_UNIT = 19, --S_EVENT_PLAYER_LEAVE_UNIT = 20, --S_EVENT_PLAYER_COMMENT = 21, --S_EVENT_SHOOTING_START = 22, --S_EVENT_SHOOTING_END = 23, --S_EVENT_MARK_ADDED = 24, --S_EVENT_MARK_CHANGE = 25, --S_EVENT_MARK_REMOVED =26, --S_EVENT_MAX = 27 --}