BR55Sevas Posted November 28, 2015 Posted November 28, 2015 (edited) How to handle world.event.S_EVENT_MISSION_END? I want send "STOPPED" word exactly when mission stops. I add this code to my file-scripts if ( world.event.S_EVENT_MISSION_END == true ) then socket.try(StatUDP:send(string.format("STOPPED"))) end File-scripts calls 1 time per second. But when mission stops, nothing in my UDP-connection. UDP-connection tested and works. Is there are way to catch this event with "interrupt" style? Edited November 28, 2015 by BR=55=Sevas МиГ-29 Fly by wire СДУ Su-27SM second display panel https://www.youtube.com/embed/videoseries?list=PL_2GGwNpWNp_fKXfRtDhIk8s5Jf4a9XHS http://berkuts.ru Пилотажный сервер с роботом | Aerobatic server with PhantomControl
Grimes Posted November 29, 2015 Posted November 29, 2015 I'm not sure your if statement works with event handlers. I've always used something like the following... function eventHandler(event) if event.id == world.event.S_EVENT_SHOT then end end The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
BR55Sevas Posted November 30, 2015 Author Posted November 30, 2015 Thanks, Grimes! But with function also no works. I suppose this event impossible to handle. All scripts calls 1 time per second, but mission can stop anytime between second. I didnt find any interrupt style call of events. So, I have to back to export.lua МиГ-29 Fly by wire СДУ Su-27SM second display panel https://www.youtube.com/embed/videoseries?list=PL_2GGwNpWNp_fKXfRtDhIk8s5Jf4a9XHS http://berkuts.ru Пилотажный сервер с роботом | Aerobatic server with PhantomControl
Recommended Posts