Jump to content


  • Posts

  • Joined

  • Last visited

About Cougar

  • Birthday 07/04/1980

Personal Information

  • Flight Simulators
    Lomac only thats the way to go :)
  • Location
    Quebec, Canada
  • Interests
    Flight simulation, Sky Diving
  1. You could use mist and use mist.getRoll()....im not at home but certainly someone can give you the exact syntax..
  2. Well if it can help better the main script ;) dont feel bad about it
  3. On the next update ive remove the need for zones ;)....wiyh noodle idea selecting target via f10 menu will make it instead of the complex trigger zone mess... Post it up or pm with your script which mihht help pass on some bumps im having here and there ..
  4. Correct It will be something tricky unfortunatly....
  5. No it shouldnt be a problem to remove aircraft....as long the unit name remain the same if you add new items within the limits of the number of present in the mission..... Ive progressed a bit on the updated code but just lacking of time at the moment but new code will be better i assume ;)
  6. Reworking the script for the better.....will update the first post when done....
  7. I'm getting an error trying to index a nil value...grrrr Seem likes the makeunittable isn't working..... Reedit: makeunittable works.... unitsInPoly = {} for index, unitName in pairs(mist.makeUnitTable({'[blue][plane]'})) do unitsInPoly[unitName] = unitName trigger.action.outText(mist.utils.tableShow(unitsInPoly),10) end Returns { ['test] = 'test' ['true'] = ['true'] ['Pilot #003'] = 'Pilot #003' } Wonder if because there's a" true" entry it somewhat make the mist.pointInPolygon call return an error as there's no pilot named 'true'.... Edit: True is a unit that I had set to Player...doh here's the error i get: 00072.290 ERROR DCS: Mission script error: : [string "local unitsInPoly = {}..."]:5: attempt to index a nil value stack traceback: [C]: ? [string "local unitsInPoly = {}..."]:5: in main chunk
  8. Also @St3v3f How I would use this script with units in polygon if possible at all? I've browses the mist 3.2 and there doesn't seem to have any specification about getunitsinzones for that one so maybe that's why I'm not able to avhieve anything on that side :/
  9. Sorry to revive this thread but I'm stuck and can't find a way to make it happen so looking for help once more... local units = mist.makeUnitTable({'[blue][plane]'}) local flag = 11 local zones = {'1', '2', '3', '4','5','6','7','8','9','10','11','12','13','14',} -- it equal of about 2 NM in lenght local zone_type = 'cylinder' function StrafePit1OnOff(result) local ret = mist.getUnitsInZones(units, zones, zone_type) if #ret == 0 and result == true then trigger.action.setUserFlag(flag, 0) result = false if namesS1 ~= nil then namesS1={} end elseif #ret > 0 and result == false then trigger.action.setUserFlag(flag, 1) result = true for i = 1, #ret do namesS1[#namesS1] = ret[i]:getName() end end mist.scheduleFunction (StrafePit1OnOff, {result}, timer.getTime() + 1) end StrafePit1OnOff(false) In the above it just allow 1 unit to be added to the "namesS1" table which is the first unit to enter the zone. Now if I do namesS1[#namesS1 + 1] = ret[i]:getName() It will add all the units name that are in the zone once the flag is activated thought its not what I'm looking for. What I'm trying to get is to be able to update that table so if gets the current unit inside the zone. If I add another statement Elseif #ret > 0 and result == true then namesS1[#namesS1 + 1] = ret[i]:getName() It will add the new units but table will be populated over and over and that's not what I'm looking for again lol If I do the following elseif #ret > 0 and result == true then If namesS1 ~= nil then namesS1 ={} namesS1[#namesS1 + 1] = ret[i]:getName() Was thinking that clearing the table first then adding the names would work but using mist tanbleshow it return {} so its not working.... Anyone have an idea how to make it work so it only add new names that are not already in the tables and remove the ones that aren't inside anymore. Thanks Cougar
  10. Use the uncontrolled tick box with late activation if I remember right
  11. Anyone tried it yet on multiplayer?
  12. http://forums.eagle.ru/showthread.php?t=116119 near bottom first page and answer of Grimes second page
  • Create New...