Jump to content

wraith70

Members
  • Posts

    173
  • Joined

  • Last visited

Everything posted by wraith70

  1. My bad...I gave you the actual function. The snippet you put in the trigger is: mist.flagFunc.mapobjs_dead_zones{ zones = {'Bridge11'}, flag = 1, req_num = 1 }
  2. Please see the 3 screenshots of how I did it for a bridge. First screenshot - Make sure you load the latest MIST first Second screenshot - Copy the code above Third screenshot - When bridge is destroyed, flag 1 is TRUE, do something like I did. Message to ALL Substitute Bridge11 in the code with the name of your trigger zone.
  3. Thanks Let me know how you make out. Sent from my SM-G930W8 using Tapatalk
  4. I use the mist.flagFunc.mapobjs_dead_zones() function. It works for bridges, haven't tried it on anything else: Just put a trigger zone over the bridge (ie named 'BridgeZone') handler = {} handler.init = function() world.addEventHandler(handler) end handler.onEvent = function (self,event) local vars = {} vars.zones = { 'BridgeZone' } vars.flag = 1 mist.flagFunc.mapobjs_dead_zones(vars) end To use this code, call it like this in ME: DO SCRIPT mist.flagFunc.mapobjs_dead_zones{ zones = {'Bridge11'}, flag = 1, req_num = 1 }
  5. Personally think the voice has too much base, but that's just me. Maybe you want to give Audacity a try? I've attached my instructions/settings. Radio Voice Overs.zip
  6. How do I have them bailing when the mission starts??
  7. These are great suggestions. Ideally, can I start the mission with 2 downed pilots in the water or on land to be eligible for CSAR pickup?
  8. I'm using CSAR script by Ciribob. I understand when an aircraft goes down and a pilot ejects, he is able to be picked up. I would like to know how to make it on mission start, I would already have 3 or 4 downed pilots to rescue without having to make the scenario in ME of shooting them down. Any ideas? TIA wraith
  9. This how I did it to detect a destroyed bridge. Uses MIST. 1. First load MIST 2. Create First Trigger Trigger: ONCE Condition: Time More with Value 4 -- Ensure enough time for MIST to load Actions: DO SCRIPT --Enter the code below: mist.flagFunc.mapobjs_dead_zones{ zones = {'Bridge11'}, flag = 1, req_num = 1 } For the above, substitute Bridge11 with your trigger zone name When the object in the trigger zone is dead, flag 1 is set to value 1 (req_num) 2. Next, setup another trigger to do something when the object in the zone is destroyed: Trigger: ONCE Condition: FLAG IS TRUE with value 1 Action: MESSAGE TO ALL with text "TARGET DESTROYED" (or anything you want to do) Hope this helps. Wraith
  10. I have never tried this You must do a bit of editing to the sound file after?? Sent from my SM-G930W8 using Tapatalk
  11. I like the idea. I've even tried to do this in the past, but maybe just don't like my own voice. I had used Audacity to edit and make the sound files more AM static 'ish'. Let me know what you are using, I could share some of the setttings/notes I have.
  12. If you are making your own mission, are you using MIST and CTLD? If so, you will need to load in both the beacon.ogg sound file and the beaconsilent.ogg for Radio beacon homing. This can be done by adding a two Sound To Country actions. Pick an unused country, like Australia so no one actually hears the audio when joining at the start of the mission. If you don't add the two Audio files, radio beacons will not work. Make sure not to rename the file as well. Source: https://github.com/ciribob/DCS-CTLD
  13. I recently purchased this campaign and it has been alot of fun. Just finished mission 6. I ran into issues beginning mission 4 with ADF not working for Batumi. Could not tune into the frequency. Mission 6 i managed to finish despite FM homing (40 and 44 MHz) and ADF 490KHz to Kobuleti not working. Manage to finish by landmark navigation. I recall exercise area FM homing working in an earlier mission. Just wondering if anyone else has had these issues? To the campaign devs, if they still monitor, is it possible that DCS updates have broken the radio navigation? I'm running latest Open Beta. Thanks
  14. Another great resource: https://wiki.hoggitworld.com/view/Threat_Database
  15. I notice I have to hit TMS up a 2 or 3 times to get a lock. Sent from my SM-G930W8 using Tapatalk
  16. Page 148 of the Early Access Guide shows the DLZ for the AIM-9X but it's not yet implemented
  17. Pilot #001 makes it work..go figure. I've loaded the function library at mission start. It's all working now. Thanks again Hardcard
  18. Thanks for your response. I've incorporated the changes you suggested. I still get the attached error message. The code works fine until i call it in a function. Attached is also the updated mission file. Thanks Altitude Test with Function.miz
  19. Ok, So I want to take this one step further. Calling the code from a function in a separate LUA file. Here is the function in MissionFunctions.lua: function AGL(pilot_name,unit_of_measure) --[[ Return Aircraft AGL altitude in Meters or Feet Arguments pilot_name = Name of Pilot/Unit in ME unit_of_measure = Meters or Feet ]]-- local Huey = Unit.getByName(pilot_name) local Huey_Altitude_MSL = Huey:getPoint().y -- Altitude MSL, in meters -- Huey's altitude from ground local Huey_Vec3 = Huey:getPoint() local Huey_Land_Height = land.getHeight({x = Huey_Vec3.x , y = Huey_Vec3.z}) -- Altitude from ground in meters local Huey_Altitude_Ground = Huey_Altitude_MSL - Huey_Land_Height --AGL in Meters local Huey_AGL_Meters = mist.utils.round(Huey_Altitude_Ground , 0) --Round to 0 decimal places --Convert AGL from Meters to Feet local Huey_AGL_Feet = mist.utils.round(Huey_Altitude_Ground * 3.28084, 0) --Round to 0 decimal places if unit_of_measure == meters then return Huey_AGL_Meters end if unit_of_measure == feet then return Huey_AGL_Feet end end Here is how I'm calling from DO SCRIPT in ME: local _string = AGL('Pilot# 001', 'feet') trigger.action.outTextForGroup(1, _string, 30, false) I get a error about attempt to load a NIL value again. This must be a scope thing. Attached is a mission file. TIA MissionFunctions.lua Altitude Test with Function.miz
  20. @Hardcard I made a typo. It works great. Thanks for your help.
  21. @Hardcard Thanks for your input. I did not have the pilot name, so I fixed that, copied verbatim what you posted above, and pasted in a DO SCRIPT and I still get the message: attempt to index a nil value (global 'Unit') on the first line.
  22. When I delete the first line, I get this: input:1: attempt to index a nil value (global 'Unit') Actually made it worse.
  23. I'm trying to write a script to display the altitude of an aircraft. Here is what I have so far: local Unit = {} local id = Unit.getByName('UH1H') local pos = id:getPosition() local distance = sqrt((pos.p.x - zonepos.x)^2 + (pos.p.z - zonepos.z)^2) pos2d.x = pos.p.x --convert Vec3 to Vec2 pos2d.y = pos.p.z landheight = land.getHeight(pos2d) -- get land height at aircraft location local _altitude = pos.p.y - landheight local _string = 'Altitude: ' .. _altitude trigger.action.outTextForGroup(1, _string, 30, false) When I try it in game and in a LUA decoder, I pretty much get the same result:input:2: attempt to call a nil value (field 'getByName') What can I be doing wrong here? TIA
  24. Thanks Grimes. I've tried both and works very well. --ELAPSED TIME 1 local _theTime = mist.getClockString(timer.getTime()) local _string = 'Current Mission Time: ' .. _theTime trigger.action.outTextForGroup(1, _string, 30, false) -- ELAPSED TIME 2 local _theTime = mist.getClockString(timer.getAbsTime() - timer.getTime0()) local _string = 'Current Mission Time: ' .. _theTime trigger.action.outTextForGroup(1, _string, 30, false)
  25. I'm trying to show how much time has elapsed in a mission. Here is what I have: function SecondsToClock(seconds) local seconds = tonumber(seconds) if seconds <= 0 then return "00:00:00"; else hours = string.format("%02.f", math.floor(seconds/3600)); mins = string.format("%02.f", math.floor(seconds/60 - (hours*60))); secs = string.format("%02.f", math.floor(seconds - hours*3600 - mins *60)); return hours..":"..mins..":"..secs end end local _theTime = mist.getClockString(SecondsToClock(timer.getTime())) local _string = 'Current Mission Time: ' .. _theTime trigger.action.outTextForGroup(1, _string, 30, false) The output is always 00:00:00 The timer.getTime() function is supposed to give the seconds elapsed so I take that value, convert it to HH:MM:SS converted to string to display. I'm not sure if I'm over complicating things. There should be a way to do this. Googling doesn't reveal much. Any help would be appreciated. Thanks
×
×
  • Create New...