Panavia02 Posted January 12, 2016 Posted January 12, 2016 (edited) Hello Pilots I wanted to implement a script command into the mission. For doing so I open the scripting text in missioneditor and put in the command " But when I test the mission and open the radiomenue it only works once. How do i make it work constantly? What do I do wrong? function get_wind(unit1) local BRA = nil local wind = nil if Unit.getByName(unit1) then local pos1 = Unit.getByName(unit1):getPosition().p if pos1 ~= nil then wind = atmosphere.getWind(pos1) local dir = math.atan2(wind.z, wind.x) * 180 / math.pi if dir < 0 then dir = 360 + dir end BRA = dir end end BRA = string.format("Wind: %d, y: %d,", BRA, wind.y) return BRA <------------------- Do I need to change this code? end trigger.action.outText(get_wind('Tim'), 2) Edited January 12, 2016 by Panavia02
Recommended Posts