Jump to content

spinter

Members
  • Posts

    438
  • Joined

  • Last visited

Everything posted by spinter

  1. I have 2 helicopters I Pilot the other one but they are both empty ee to fly in multiplayer, I have to Detect id helicopter from the script even if they are inside. This error code back to me if they are not inside the unit, how can I do? function getUnitID2(unitName) local unit = Unit.getByName(unitName) local unitID = nil if unit ~= nil then unitID = unit:getID() end return unitID end local ely_id2 = getUnitID2('Pilot #1') trigger.action.outText(ely_id2, 5) sorry for my eng
  2. spinter

    script lua

    scrivo qui perché magari mi faccio capire! avrei bisogno di creare una triggers da script: esempio? type condiscion actions once flag 3 is true add radio item e possibile? potete aiutarmi? avete un esempio? potete spiegarmi?
  3. local units = Group.getByName('Uh1'):getUnits() if #units > 0 then local unit1pos = units[1]:getName() trigger.action.outText(unit1pos, 5) end is correct code? and how can I see if this group exists? I know if a target is Static Object? Sorry my eng im traslated by Google!
  4. and can create triggers condition type action with the script? Sample:I want to create a Once x-cockpit Message is it possible?
  5. to me it does not work! http://forums.eagle.ru/showthread.php?t=107139
  6. do local radio_vector = Unit.getByName('Pilot 1'):getPosition() trigger.action.radioTransmission('test.ogg', radio_vector, 0, true, 118000, 100) end No Sound!! I can not. were able to explain to me if I'm wrong code?
  7. Where am I doing wrong? function getUnitPos(unitName) local unit = Unit.getByName(unitName) local unitPos = nil if unit ~= nil then unitPos = unit:getPosition() end return unitPos end trigger.action.radioTransmission('test.ogg', getUnitPos('Pilot 1').p, 0, true, 118.000, 100)
  8. thx
  9. is possible with script use Set internal cargo?
  10. Great, thanks very close but we had managed wrong my course is your right thanks! my error if ely_mia_direzione > 180 then dir_1= (360 - ely_mia_direzione) + (ely_direzione_oby) else dir_1 = ely_direzione_oby - ely_mia_direzione end
  11. I can to help solve this problem? Point A Target Point B My Plane Direction My Plane: 90 Direction to take for the goal: 123 How can I calculate this degree to my plane? It should be about 220!
  12. Solved!! Global variabiles.lua load by once if load wiht mission Start Give error!!!
  13. grande lasa potresti andare a lavorare al lichea!! anzi proponigli il project!!
  14. None please!!
  15. I can not understand why when I write code in DoScript works! and if I use DoScriptFile does not work can you help me?
  16. I have this problem I would need to use a global variable, if I use DoScript works! Start mix -- Variabiles do pippo = 1 end Continus do trigger.action.outText(pippo, 5) pippo = pippo + 1 end but if I put them in two separate lua file and use the Script File Do me an error, how can I use? Can I use my boolean variables?
  17. thanks you've been a great!
  18. Sorry return me 90.08234834 to 90.9829283457827 Help please
  19. help me!! I need an excuse even such a thing as I can find the direction to be taken by a united to the other?
  20. fantastic thx!!!!!!!!!!
  21. Ma no sbagliate tutto!!! sappiamo benissimo tutti che se invece che leggere viaf leggevo amvi o un altro e ora non ero in viaf (stupido esempio ma semplice ) poi ci si fa gli amici e naturalmente si preferisce in quello che si è,la cosa importante e che ci unisce e volare e niente altro!! perciò un link vale l'altro poi se non ci si trova bene si cambia!!!! Perciò venite tutti in viaf vi restituisco IMU!!! :lol::lol::lol::lol::lol::lol::lol::lol::lol:
  22. How can I put it in a function and make the call? 'm not very good with lua! do local dist = nil local dist2 = nil local unit = Unit.getByName('Pilot #1') local avgx, avgy, avgz = 0, 0, 0 local unitPos = nil if unit ~= nil then unitPos = unit:getPosition() avgx = avgx + unit:getPosition().p.x avgy = avgy + unit:getPosition().p.y avgz = avgz + unit:getPosition().p.z end local unit = StaticObject.getByName('Container') local avgx2, avgy2, avgz2 = 0, 0, 0 local unitPos = nil if unit ~= nil then unitPos = unit:getPosition() avgx2 = avgx2 + unit:getPosition().p.x avgy2 = avgy2 + unit:getPosition().p.y avgz2 = avgz2 + unit:getPosition().p.z dist = math.sqrt( (avgx - avgx2)^2 + (avgz - avgz2)^2 ) trigger.action.outText('Distance: ' .. dist, 5) end end
×
×
  • Create New...