

sunski34
Members-
Posts
753 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by sunski34
-
Hi SUNTSAG, ok I'm not sure if it's a new DCS problem or not.... But the name of a static unit, linked to the map, is not a string but a number ! I added the necessary tests in ATME in version V1.0.7. Thank you for your returns and help. Sunski
-
Hi SUNTSAG, can you explain a little bit more... I see that the problem is come from a DCS call so an event call.... So I think that ATME received a bad dcs "dead event" ! When you say you speek about an airport static objects in DCS map, not add in a mission? That's right? Sunski
-
Hi, why Roland isn't accessible when France ?? But it's Ok with Germany. Strange ;) Sunski
-
Documentation en francais Bonjour à tous, Vous trouverez joint à au premier post de ce thread la documentation en francais d'ATME V1.0.6. Dorénavant, la documentation en français sera mise à jour à cet endroit : https://forums.eagle.ru/showpost.php?p=3001633&postcount=1 Je reste bien sur disponible pour toute personne voulant se lancer... SnowSnipper et moi même avons réalisé ce script en considérant qu'à la base nous étions avant tout des passionnés de DCS et non de lua et des scripts ... même si il faut connaitre les bases quand même. N'hésitez pas à vous lancer, nous serons là pour vous aider. Egalement ici https://forums.eagle.ru/showpost.php?p=3001614&postcount=3 les missions et fichiers du manuel. Sunski.
-
[NEW Script] Advanced Tools for Mission Editor
sunski34 replied to sunski34's topic in Mission Editor
Documentation of last version of ATME : V1.0.6 Hi, I updated the english documentation of ATME with new Area functions : -> Add a zone in a area -> Remove zones from an area -> Test if a reference is in a area -> get a random position in a area with a isFlat flag for smooth slope (<5%) -> Add test isInArea for ATME.C_Group, ATME.C_AIUnit and ATME.C_Player -> Add ATME.C_Group.getGroupInAreaForAll and ATME.C_Group.getGroupInAreaForCoalition functions that return list of groups in a particular area. Note that actually, a area is a set of circles (DCS zone or 2D Circles). A 2D circle can be linked to a unit or player, so its center may move. In a next version a polygon zone will be added (however no crossed polygon will be supported, but non convex polygon will be ok). Link here for download : https://forums.eagle.ru/showpost.php?p=3001613&postcount=3 Test and enjoy ATME Sunski -
There was a problem by using F10 on ME a couple of month ago, rapidly fixed by ED. So in that case, when only using triggers and actions in Mission Editor, no problem that works well now.
-
Hi, As Grimes said, yes, you can only play one sound file with DCS lua functions. But in my experience, I never success playing .wav sound files. No problem with .ogg files. So basicaly, you have to manage your play list with DCS lua functions. ATME may help you to play a list of sound files but you have to know and set a duration. Actually, no event is sent by DCS at the end of play. If you change a playlist while ATME use it, then you can do smooth change or immediate change. For a smooth change, that will be done at the end of the current sound file. The basic time is 1second For example, see and hear (of course) the begin of the ATM global presentation video . The sound is the original one in the mission. Sunski
-
A peace of lua code.... local function isInPolygon(_P, _vertex) local point = _P local isOnVertex = false for i = 1, #_vertex do if _vertex[i].x == point.x and _vertex[i].z == point.z then isOnVertex = true end end if isOnVertex == false then local inside = 0 for i = 1, #_vertex - 1 do if _vertex[i].y <= point.y then if _vertex[i + 1].y > point.y and whichSide(_vertex[i], _vertex[i+1], point) < 0 then inside = inside + 1 end elseif _vertex[i + 1].y <= point.y and whichSide(_vertex[i], _vertex[i+1], point) > 0 then inside = inside - 1 end end -- if inside == 0 then point outside polygon -- if inside ~= 0 then point inside polygon -- No efficient for crossed polygon return inside ~= 0 else return true end end whichSide(A,B,P) is a basic function to find the position of a point P relative to an oriented segment AB : det =(B.x - A.x) * (P.z - A.z) - (B.z - A.z) * (P.x - A.x) det < 0 if P on left and det > 0 if P on right That is the code I will include in my ATME script Tools in next version ;) The biggest problem is to spawn in such a polygon... Code is near good too ;) Sunski
-
Salut à tous, ce jour une mise à jour d'ATME corrigeant quelques soucis et surtout ajoutant une gestion multiZones (classe ATME.C_Area) utilisable pour vérifier une localisation ou récupérer une liste de groupes dans ces zones par exemple. Pour toute aide n'hésitez pas... Ici le lien https://forums.eagle.ru/showthread.php?t=179992 Sunski
-
[NEW Script] Advanced Tools for Mission Editor
sunski34 replied to sunski34's topic in Mission Editor
An a new mission example Here's a new example with multiple spawnning in multiple zones... For DCS 1.5.5 Try and enjoy ;) Sunski test spawnMultiZones.miz ATME_spawnTestmultiZones.lua -
[NEW Script] Advanced Tools for Mission Editor
sunski34 replied to sunski34's topic in Mission Editor
ATME Framework has been updated with V1.0.6. New Area Class to manage multiZone spawning : area = ATME.C_Area() area:add("spawnZone") area:add("spawnZone2") In that case, "spawnZone" and "spawnZone2" are DCS Zones. New functions to like : area:isInside(reference) where reference can be a ATME.C_AIUnit, ATME.C_Player , ATME.C_StaticObject or a point. New functions in ATME.C_Group, ATME.C_Player and ATME.C_AIUnit : objet:isInArea(area) spawn function can be used with area instance like : area = ATME.C_Area() area:add("spawnZone") area:add("spawnZone2") local unit = ATME.C_AIUnit.getByName("reference unit") var1:setRepeatSpawnContext("RANDOM 2 5", 10,2) local err2, var2 = var1:spawn(area, "origin", unit) if err2 == true then if var2 == "BAD_SPAWN_POSITION" then thisModule:output("Position error on first spawn", 1) elseif var2 == "SPAWN_EMPTY_AREA" then thisModule:output("Empty area", 1) end end and of course, you can get all groups in an area with : local groups = ATME.C_Group.getGroupsInAreaForCoalition("BLUE", area, false) or local groups = ATME.C_Group.getGroupsInAreaForAll(area, false) I will update documentation ASAP Enjoy ATME Sunski -
Thank you Zeus Will belougas be AC (Anti Tanks) or not? Sunski
-
Crash Fire Rescue Mission Template (Including Scripts)
sunski34 replied to SUNTSAG's topic in Mission Editor
With the consent of SUNTSAG (thank you man), please find here the link to ATME script Framework https://forums.eagle.ru/showthread.php?t=179992 regards Sunski -
ATME has sound functions (in ATME player class) which can help you as SUNTSAG said : -> Play lists with start and stop -> Stop and start sounds, repeat sounds -> Play a sound once here is the link to download ATME and see documentation ;) https://forums.eagle.ru/showthread.php?t=179992 Ask me if you need help on ATME. Sunski
-
Hi Galm, you can use ATME script Framework to do that. An example here : https://forums.eagle.ru/showpost.php?p=3019664&postcount=33, how to create a submenu here : https://forums.eagle.ru/showpost.php?p=3024593&postcount=6 You can download ATME here https://forums.eagle.ru/showpost.php?p=3001608&postcount=1 And a mission made by SUNTSAG using ATME sound and F10 menu abilities (see his video) : https://forums.eagle.ru/showthread.php?t=181503 Ask me if you need help Sunski
-
Crash Fire Rescue Mission Template (Including Scripts)
sunski34 replied to SUNTSAG's topic in Mission Editor
Hi SUNTSAG, excellent ;) Happy to see the result of your work using ATME script framework ;) and its sound abilities ! Sunski -
Up -- BAP 100 When? Hi, Any idea of when we can use BAP 100 on mirage? And belouga AC will be implemented or not ? Thanks Sunski
-
Salut à tout, ce jour la version V1.0.5 d'ATME a été publiée. Elle apporte une meilleure information en cas d'erreur (affichage du nom du module et du numéro de ligne, usage de la fonction en erreur). Par ailleurs, les menus F10 ont été optimisés et il est possible maintenant de faire du multispawn automatique. Le lien ici : https://forums.eagle.ru/showpost.php?p=3001608&postcount=1 et un exemple de multispawn ici : https://forums.eagle.ru/showthread.php?t=179992&page=5 La documentation a été mise à jour également, voir dans le thread... Si vous avez des questions, n'hésitez pas. Sunski.
-
[NEW Script] Advanced Tools for Mission Editor
sunski34 replied to sunski34's topic in Mission Editor
Multi spawn mission example Hi, you can find a mission and the script to understand how to implement. As you can see, dynamic waypoint tracking is activated for each spawned group (see line 36 of ATME_spawnTest1.lua). Enjoy ATME. Sunski. test spawn.miz ATME_spawnTest1.lua -
[NEW Script] Advanced Tools for Mission Editor
sunski34 replied to sunski34's topic in Mission Editor
Multi Spawn... how to use ... Hi, multi spawn is activated with the first spawn function after a spawn context function like in this example : local err, var1 = ATME.C_GroupSpawnDatas.duplicateFromMissionDatas("origin", "new1") if err == false then local gpos = ATME.C_Group.getByName("origin"):getFirstUnit():getPosition() gpos.x = gpos.x + 20 local unit = ATME.C_AIUnit.getByName("reference unit") var1:setRepeatSpawnContext("RANDOM 2 5", 10, 2) local err2, var2 = var1:spawn(gpos, "origin", unit) end setRepeatSpawnContext function is here defined for : -> A random quantity of spawns between 2 and 5 -> A 10s period (+ or - 2s random) Try it. Sunski -
[NEW Script] Advanced Tools for Mission Editor
sunski34 replied to sunski34's topic in Mission Editor
Hi, new version of ATME, V1.0.5. F10 Menu optimizations and multiple spawnning management. Add update of Rescue module tool. The link is here : https://forums.eagle.ru/showpost.php?p=3001608&postcount=1 The documentation has been updated... See above too. Enjoy ATME. Sunski -
[NEW Script] Advanced Tools for Mission Editor
sunski34 replied to sunski34's topic in Mission Editor
AA spawn Hi, Actually there's a problem with spawning : https://forums.eagle.ru/showpost.php?p=2992017&postcount=1167 So I wait for a patch to finalize AA spawning. Regards Sunski. -
Just a precision... Create a sub submenu is the same way as create a submenu : local function onCreatePlayer(player) player.modules["MyModule"].F10SubMenuLevel1 = ATME.C_F10Menu(player, "Sub Menu Level 1", nil) player.modules["MyModule"].F10SubMenuLevel2 = ATME.C_F10Menu(player, "Sub Menu Level 2", F10SubMenuLevel1 ) player.modules["MyModule"].F10SubMenuLevel2:append(1, "Action name", fctAction , {player}) end Then you see that command is in the submenu level 2 which is in the submenu Level 1. Have fun ;) Sunski
-
Try this before adding other functionalities... Regards Sunski
-
Some informations to understand Hi SUNTSAG, If you want to create a submenu with a command when a player enters, juste do : local function onCreatePlayer(player) player.modules["MyModule"].F10SubMenu = ATME.C_F10Menu(player, "Sub Menu name", nil) player.modules["MyModule"].F10SubMenu:append(1, "Action name", fctAction , {player}) end "MyModule" is the name of your module : 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 = nil, onModuleStartHandler = nil, } thisModule = ATME.C_Module("[b]MyModule[/b]", newHandlers, true) and create before function onCreatePlayer your menu function fctAction like this : local fctAction fctAction = function(args) local player = args[1] -- to get the player -- Then you can do what you want here by adding new entries like this player.modules["MyModule"].F10SubMenu:append(1, "Action name 1", fcNewAction1, {player}) player.modules["MyModule"].F10SubMenu:append(1, "Action name 2", fcNewAction2, {player}) end then create to new menu functions fctNewAction1 and fctNewAction2 in the same way you used for fctAction... For beginning, just display a message in your menu functions for exemple (function fctNewAction1): local fctNewAction1 fctNewAction1 = function(args) local player = args[1] -- to get the player -- Then you can do what you want here by adding player message player:display("In function fctAction1", 5) end