H60MTI Posted Sunday at 02:15 PM Posted Sunday at 02:15 PM Does anyone know of a way to have a recurring drone? With the QF-4E now in the game, I'm trying to think of a way to have that drone just go from waypoint to waypoint and if it gets shot down, it just basically respawns at WP0 and keeps going. Can use it to test out different planes with different missiles, radar techniques etc...I know I can probably have 13 different drone all with triggers to activate the next on death but there has to be an easier way. I also don't want immortal because I want to see it go down in flames as well Lol Former SSG US Army UH-60A/L/M Crewchief "2 To Fly!"
Tobias00723 Posted Sunday at 09:28 PM Posted Sunday at 09:28 PM I believe you might wanna see -> https://wiki.hoggitworld.com/view/MIST_respawnGroup with a bit of code you should be able to achieve this, so you dont need to have 100 times of the same group encase the previous one dies that function should produce infinitely of the same group 1 DCS Mission Scripting Wizard | TGFB Owner | Dev of HIP Dynamic Server | Maker of TGFB Dynamic | tgfb-dcs.com | Contact me | TGFB Discord
d0ppler Posted Tuesday at 03:20 AM Posted Tuesday at 03:20 AM (edited) No need for MIST. Just add a repetetive trigger -> Do Script: local function spawnPlane(plane, speedKTS, altitudeFT) local startXCoord = -289193 -- start X pos CCS format local startYCoord = 587118 -- start Y pos CCS format local endXCoord = -290020 -- endpos X pos CCS format local endYCoord = 682460 -- endpos Y pos CCS format if not id then id = 0 end if altitudeFT < 0 then altitudeFT = 1000 end local altitudeMTR = altitudeFT / 3.28 local speedMS = speedKTS / 1.94 id = id + 1 theDrone = "SpawnedDrone-" .. id local groupData = { ["units"] = { [1] = { ["type"] = plane, ["y"] = startYCoord, ["x"] = startXCoord, ["name"] = theDrone, }, }, ["y"] = startYCoord, ["x"] = startXCoord, ["name"] = "SpawnedDroneGroup-" .. id, ["route"] = { ["points"] = { [1] = { ["alt"] = altitudeMTR, ["type"] = "Turning Point", ["ETA"] = 0, ["alt_type"] = "BARO", ["formation_template"] = "", ["y"] = startYCoord, ["x"] = startXCoord, ["ETA_locked"] = true, ["speed"] = speedMS, -- meter pr second ["action"] = "line abreast", ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = {}, }, }, ["speed_locked"] = true, }, [2] = { ["alt"] = altitudeMTR, ["type"] = "Turning Point", ["ETA"] = 200, ["alt_type"] = "BARO", ["formation_template"] = "", ["y"] = endYCoord, ["x"] = endXCoord, ["ETA_locked"] = false, ["speed"] = speedMS, ["action"] = "line abreast", ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = {}, }, }, ["speed_locked"] = true, }, }, }, } coalition.addGroup(country.id.RUSSIA, Group.Category.AIRPLANE, groupData) end local plane = "QF-4E" local speedKTS = 500 local altitudeFT = 10000 if not theDrone then theDrone = "foobar" end local check = Unit.getByName(theDrone) if not check then spawnPlane(plane, speedKTS, altitudeFT) end Play with the X,Y coords (native CCS format) This will spawn a new QF-4E every time it dies. You can ofcourse change the unit type from QF-4E to something else, the speed and the altitude Edited Tuesday at 03:25 AM by d0ppler A-10C, AV-8B, Ka-50, F-14B, F-16C, F-5E, F/A-18C, L-39, Mi-8, MiG-21, MiG-29, SA34, Spitfire, Su-27, Su-33, UH-1H
kira_mikamy Posted yesterday at 12:06 AM Posted yesterday at 12:06 AM (edited) after you had create the drone in mission editor and named it as example "DRONE_TEMPLATE" (the GROUP name) you can use MOOSE and declare just remember that moose ad a #001 at the end of the group name after the spawn, this function will check every 5 minutes (300seconds) if a group named SPAWNED_DRONE#001 exist. if exist, nothing happen. if not exist (destroyed or not yet spawned) it will spawn one. the drone will spawn in the place where its placed in missione editor and follow his waypoint every time function IS_DRONE_ALIVE() if not Group.getByName("SPAWNED_DRONE#001") then DRONE_SPAWN = SPAWN:NewWithAlias("DRONE_TEMPLATE", "SPAWNED_DRONE"):Spawn() end end local timer_DRONE = TIMER:New(IS_DRONE_ALIVE):Start(300, 300) Edited yesterday at 12:07 AM by kira_mikamy 1
Recommended Posts