Jump to content

ked

Members
  • Posts

    141
  • Joined

  • Last visited

Everything posted by ked

  1. Tacview doesnt seem to care much about the datalink, i guess i'll need to emulate it through awacs data, i'll take care of that later.
  2. Or maybe i can, just found this LoGetObjectById() -- (args - 1 (number), results - 1 (table)) Returned object table structure: { Name = Type = Subtype = Country = Coalition = LatLongAlt = { Lat = , Long = , Alt = } Heading = } Coupled with LoGetWorldObjects() -- (args - 0, results - 1 (table of object tables)) Could be what i'm looking for EDIT:Woops, didn't see you answered. I'm gonna check about the datalink data, thanks for the hint i'll get back to you with the results of my research :)
  3. Ok i did'nt see that when i first read it. So i want to export data like position, altitude,speed,heading of every aircraft that the player can see with his F10 menu (maybe even datalink datas from awacs would be great) Right now, after seeing the old page you linked me, i'm pretty sure i can only get datas about my aircraft.. Am i right ?
  4. thank you very much i'll get back to you if i have more questions :)
  5. Hey guys, i'm looking for information about export.lua and how it works but so far i don't really understand. Right now i know you put kinda include another file that you create and then put your code here, but how do i really get datas ? i couldn't find any up to date and complete enough doc :( Hope someone can help
  6. Hey guys, i'm trying to make a copy of the Su33 for further EFM modifications and i can't get some animations to work. Everything is showing up in the modelviewer provided by ED when i press enable animations but in game there's only cannons,afterburner's,ejection and shock absorbers animations working. Right now i'm following the guide and i can't find any part talking about lua to link the animations to the mod ? How does it work exactly ?
  7. Ok i've been working all day on this, briefing and texts are in french but feel free to learn from it or even use it http://gamers-squad.fr/public/training%20V2.0.0.zip And thanks sunski you've helped a lot, next i want to introduce scenarios and diversify possible missions :)
  8. Is there a way to get the C_AIUnit object resulting from the spawn ? Cause i'd like to assign a global variable to it
  9. Another question :p Let's say i do var1:spawn(ATME.modules[moduleName].areas[i].spawn) And i want to set a global variable for that AI unit, i've tried to do var1.modules[moduleName].variable = value But it's not working. What is exactly var1 ?
  10. Ok i've got it working doing for i = 1,8,1 do if ATME.modules[moduleName].areas[i].area == datas.area then local err, var1 = ATME.C_GroupSpawnDatas.duplicateFromMissionDatas(ATME.modules[moduleName].areas[i].name .. " Quick Response " .. ATME.modules[moduleName].responses[player.modules[moduleName].coalitionNumber].old, ATME.modules[moduleName].areas[i].name .. " Quick Response " .. ATME.modules[moduleName].responses[player.modules[moduleName].coalitionNumber].old .. math.random(10000)) if err == false then var1:spawn(ATME.modules[moduleName].areas[i].spawn) else player:display("error spawn in " .. ATME.modules[moduleName].areas[i].spawn,5) end break end end
  11. Damn i read the code 100 times and didn't find that ... :( It still doesn't spawn units here, seems to do only one iteration in the loop And in my logs i've got 36 times this thing appearing for like 25 seconds of gameplay, seems weird. Isn't it supposed to happen once ?
  12. You can download it here : http://gamers-squad.fr/public/training%20V1.1.5.zip ATME core seems to init in a loop according to my logs (like 3-4 times in less than a minute) and i can't acces the ATME.modules[moduleName].areas when i try to do for exemple player:display(ATME.modules[moduleName].areas[3].name,5) I've got no display
  13. And this loop isn't executing once (i've tried to add player:display and nothing shows up) for _i = 1, #ATME.modules[modulesName].areas do player:display("blblblblbl",5) if ATME.modules[modulesName].areas[i].area == datas.area then local err, var1 = ATME.C_GroupSpawnDatas.duplicateFromMissionDatas(ATME.modules[modulesName].areas[i].name+" Quick Response "+ATME.modules[moduleName].responses[player.modules[moduleName].coalitionNumber].old, ATME.modules[modulesName].areas[i].name+" Quick Response "+ATME.modules[moduleName].responses[player.modules[moduleName].coalitionNumber].old .. math.random(10000)) if err == false then var1:spawn(ATME.modules[modulesName].areas[i].spawn) player:display("Spawn "+ATME.modules[modulesName].areas[i].name+" Quick Response "+ATME.modules[moduleName].responses[player.modules[moduleName].coalitionNumber].old,5) end end end
  14. var1:spawn(ATME.modules[modulesName].areas[i].spawn) i dont see why it wouldn't work knowing the fact that i used to do this: if err == false then var1:spawn("Bravo 1") end "Bravo 1" is just a String, just like my spawn value in the areas table. Either way, it's still not working and i've got no idea why. I'll post the entire dcs.log because i see something weird, this line comes twice Once on the begining of the file and once way later when everything is supposed to be init for a long time.
  15. If teams don't get bigger either they'll make modules in half the time or they will make half the modules but your sentence makes no sense Best of luck, i hope the f14 was near conclusion ..
  16. Ok thanks for the help i've got this error On the particular line ATME.modules[moduleName].areas[1].area:setAircraftTracking(player) full code is local thisModule local moduleName = "QuickResponse" local function init(areUnitsAndPlayersInitialized) if areUnitsAndPlayersInitialized == true then ATME.modules[moduleName].areas = {} ATME.modules[moduleName].areas[1] = { area = ATME.C_Area(), name = "Bravo", spawn = "Bravo 1", } ATME.modules[moduleName].areas[2] = { area = ATME.C_Area(), name = "Charlie", spawn = "Delta", } ATME.modules[moduleName].areas[3] = { area = ATME.C_Area(), name = "Delta", spawn = "Delta", } ATME.modules[moduleName].areas[4] = { area = ATME.C_Area(), name = "Foxtrott", spawn = "Golf 3", } ATME.modules[moduleName].areas[5] = { area = ATME.C_Area(), name = "Golf", spawn = "Golf 3", } ATME.modules[moduleName].areas[6] = { area = ATME.C_Area(), name = "Hotel", spawn = "Hotel 3", } ATME.modules[moduleName].areas[7] = { area = ATME.C_Area(), name = "India", spawn = "India 2" } ATME.modules[moduleName].areas[8] = { area = ATME.C_Area(), name = "Juliett", spawn = "Mike" } ATME.modules[moduleName].responses = {} ATME.modules[moduleName].responses[1] = { old = "M21B" } ATME.modules[moduleName].responses[2] = { old = "F5" } ATME.modules[moduleName].areas[1].area:add("Bravo 1") ATME.modules[moduleName].areas[1].area:add("Bravo 2") ATME.modules[moduleName].areas[1].area:add("Bravo 3") ATME.modules[moduleName].areas[1].area:add("Bravo 4") ATME.modules[moduleName].areas[1].area:add("Bravo 5") ATME.modules[moduleName].areas[1].area:add("Bravo 6") ATME.modules[moduleName].areas[2].area:add("Charlie 1") ATME.modules[moduleName].areas[2].area:add("Charlie 2") ATME.modules[moduleName].areas[2].area:add("Charlie 3") ATME.modules[moduleName].areas[2].area:add("Charlie 4") ATME.modules[moduleName].areas[2].area:add("Charlie 5") ATME.modules[moduleName].areas[2].area:add("Charlie 6") ATME.modules[moduleName].areas[3].area:add("Delta") ATME.modules[moduleName].areas[4].area:add("Foxtrott 1") ATME.modules[moduleName].areas[4].area:add("Foxtrott 2") ATME.modules[moduleName].areas[4].area:add("Foxtrott 3") ATME.modules[moduleName].areas[4].area:add("Foxtrott 4") ATME.modules[moduleName].areas[4].area:add("Foxtrott 5") ATME.modules[moduleName].areas[4].area:add("Foxtrott 6") ATME.modules[moduleName].areas[5].area:add("Golf 1") ATME.modules[moduleName].areas[5].area:add("Golf 2") ATME.modules[moduleName].areas[6].area:add("Hotel 1") ATME.modules[moduleName].areas[6].area:add("Hotel 2") ATME.modules[moduleName].areas[6].area:add("Hotel 3") ATME.modules[moduleName].areas[6].area:add("Hotel 4") ATME.modules[moduleName].areas[7].area:add("India 1") ATME.modules[moduleName].areas[7].area:add("India 2") ATME.modules[moduleName].areas[7].area:add("India 3") ATME.modules[moduleName].areas[8].area:add("Juliett") end end local function onCreatePlayer(player) ATME.modules[moduleName].areas[1].area:setAircraftTracking(player) ATME.modules[moduleName].areas[2].area:setAircraftTracking(player) ATME.modules[moduleName].areas[3].area:setAircraftTracking(player) ATME.modules[moduleName].areas[4].area:setAircraftTracking(player) ATME.modules[moduleName].areas[5].area:setAircraftTracking(player) ATME.modules[moduleName].areas[6].area:setAircraftTracking(player) ATME.modules[moduleName].areas[7].area:setAircraftTracking(player) ATME.modules[moduleName].areas[8].area:setAircraftTracking(player) player.modules[moduleName].coalitionName = player:getCoalitionName() player.modules[moduleName].coalitionNumber = nil if player.modules[moduleName].coalitionName == "BLUE" then player.modules[moduleName].coalitionNumber = 1 else player.modules[moduleName].coalitionNumber = 2 end end local function onZonePass(events) for _id, _ in events:pairs() do if events:isCoreEvent(_id) == true then local typeEvent = events:getCoreEventType(_id) if typeEvent == "AREA_AIRCRAFT_ENTERS" then local datas = events:getCoreEventDatas(_id) -- player is in datas.unit variable -- area is in datas.area variable local player = datas.unit -- loop on your areas here when player enters a zone for _i = 1, #ATME.modules[modulesName].areas do if ATME.modules[modulesName].areas[i].area == datas.area then local err, var1 = ATME.C_GroupSpawnDatas.duplicateFromMissionDatas(ATME.modules[modulesName].areas[i].name+" Quick Response "+ATME.modules[moduleName].responses[player.modules[moduleName].coalitionNumber].old, ATME.modules[modulesName].areas[i].name+" Quick Response "+ATME.modules[moduleName].responses[player.modules[moduleName].coalitionNumber].old .. math.random(10000)) player:display("areas.area = datas.area",5) if err == false then var1:spawn(ATME.modules[modulesName].areas[i].spawn) player:display("Spawn "+ATME.modules[modulesName].areas[i].name+" Quick Response "+ATME.modules[moduleName].responses[player.modules[moduleName].coalitionNumber].old,5) end end end elseif typeEvent == "AREA_AIRCRAFT_LEAVES" then local datas = events:getCoreEventDatas(_id) -- player is in datas.unit variable -- area is in datas.area variable local player = datas.unit -- loop on your areas here when player leaves a zone -- nothing planned for this at the moment --for _i = 1, #ATME.modules[modulesName].areas do -- if ATME.modules[modulesName].areas[i].area == datas.area then -- if ATME.modules[modulesName].areas[i].name == "Bravo" then -- Code when player leaves Bravo Area -- elseif .... -- Test other area names and add specific code -- end -- end --end end end end end -- MAIN do local newHandlers = { onCreatePlayerHandler = onCreatePlayer, onDeletePlayerHandler = nil, onUpdatePlayerHandler = nil, onTakeoffPlayerHandler = nil, onLandingPlayerHandler = nil, onStartEnginePlayerHandler = nil, onStopEnginePlayerHandler = nil, onCreateAIUnitHandler = nil, onDeleteAIUnitHandler = nil, onDisableAIUnitHandler = nil, onTakeoffAIUnitHandler = nil, onLandingAIUnitHandler = nil, onStartEngineAIUnitHandler = nil, onStopEngineAIUnitHandler = nil, onCreateGroupHandler = nil, onDeleteGroupHandler = nil, onDisableGroupHandler = nil, onCreateStaticObjectHandler = nil, onDeleteStaticObjectHandler = nil, onTimerHandler = onZonePass, onModuleStartHandler = init, } thisModule = ATME.C_Module(moduleName, newHandlers, true) end i don't really get what's wrong, units and players might now be initialized when the init function executes EDIT: I've checked logs and the first error i have is on the line if player.modules[moduleName].coalitionName == "BLUE" then makes no sense
  17. Hey thanks it helps a lot, right now i'm also looking to know which zone he enters so if i do On module start, then i'd like to be able to know which zone the player enters, maybe with datas.area ? i couldnt find any doc about that :( Thanks for the help
  18. Sunski confirmed me that polygonal zones are not possible to create with ATME. I'm not sure about using MIST or MOOSE with ATME, will the zone be recognized in my ATME then ? will the mission be stable enough with 10 players ? anyway i need to clean up that code which is pretty heavy and not optimised. So i'm focused on getting the zone the player is in right now rather than seaching zones for the player. Now if adding another library doesn't slow it down i might do that aswell
  19. It might be i little laggy right now, still working on a way to do some things better. For exemple there's no way to do polygonal areas so i've got to do several circal areas and check every single one of them to make sure nobody's in there. And with ATME, looking at the doc i've only found player:isInDCSZone("zonename") which checks if player is in zone, but it would be much more effective to get the zone he is actualy in and then do a switch with functions spawning units. I'm looking at events handled by ATME but no sucess so far. I have to say i've only tested it with maximum 3 players on a medium PC (4th gen i5 and 8go of ram) and people were feeling some lags sometimes when i was going throug menus changing my commands. I'm looking to optimise this, you can find the full mision and luas here : mission my code I know sunski is watching so if you have an idea mate i'll take it :p
  20. feefifofum's solution works perfectly thanks everyone for the help !
  21. Thanks , will try that
  22. Hey guys i'm using ATME to spawn air unit groups based on an activation retarded group as a model. This group has waypoints but they seem to not follow them at first, right now they spawn , go for the nearest target and once it's destroyed they go back to follow their waypoints. I've got no idea how to make them follow waypoints and attack units within a certain range while still following waypoints (i'd like a real patrol but this doesn't seem to work) Any idea ? PS: i've got AWACS but i've tried without it and it doesn't see to change much
  23. Thank you apreciate that, works perfectly !
  24. thanks :)
  25. Exact same thing with empty mission(only the aircraft carrier and the sEDITu33), ATME core could be corrupted ? EDIT: i tried with basic model and a new Core file it's still not working when spawning on the aircraft carrier
×
×
  • Create New...