PhoenixTunes Posted February 21, 2018 Posted February 21, 2018 Hello everyone, i'm just wondering if there is a way to respawn a group infinitely with MIST? When I say infinitely, I mean that they won't stop respawning after the first respawned group dies such as when I use the code "mist.respawnGroup('F-86F CAP', true)". Any help is greatly appreciated! :pilotfly:
fargo007 Posted February 22, 2018 Posted February 22, 2018 Do you insist on MIST? I do this all the time with MOOSE: Badguy1 = SPAWN:New( "Badguy1" ) :InitRandomizePosition(true,1000,5) :InitLimit( 1, 101 ) :SpawnScheduled( 30, .5 ) 1 - Create what you want to be spawned and name the group Badguy1. Select "Late Activation." 2 - MISSION START trigger, "Moose load", no conditions, DO SCRIPT FILE, Moose.lua 3 - Save this snippet above into a filename ending with .lua. 4 - MISSION START trigger, "Mission load", no conditions, DO SCRIPT FILE, <what_you_named_it>.lua 5 - profit. This gives you 1 badguy alive at a time, 101 total, spawned within a 1000M radius of where you place him, with a new one coming randomly 15 to 30 seconds after the existing one dies. Adjust counts, radius size to suit. Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/
shnicklefritz Posted February 22, 2018 Posted February 22, 2018 (edited) I use mist to respawn a couple of ways: If unit dies: { Continuous Action: On crash } { UnitDead or GroupDead } {Do Script: mist.respawn... } You can delay them this way as well, instead of Do script, set flag x to true, then another condition, time since flag x, do script mist.respawn, set flag x false... If the aircraft RTB's and shutsdown it's engine: Do script file: function onShutdownAI:onEvent(event) if world.event.S_EVENT_ENGINE_SHUTDOWN == event.id and event.initiator:getPlayerName() == nil then local shutdownGroup = event.initiator:getGroup() local shutdownType = event.initiator:getTypeName() local shutdownCall = event.initiator:getCallsign() local shutdownID = event.initiator:getID() local shutdownName = shutdownGroup:getName() local shutdownSide = shutdownGroup:getCoalition() local shutdownMess1 = " has returned to base. We are getting another one in air ASAP." trigger.action.deactivateGroup(shutdownGroup) trigger.action.outTextForCoalition(shutdownSide, "A friendly " .. shutdownType .. ", callsign " .. shutdownCall .. shutdownMess1, 15) if shutdownType == "F-86F" then mist.respawnGroup(shutdownName, true) elseif shutdownType == "Other Aircraft" then mist.respawnGroup(shutdownName, true) --Change or delete elseif shutdownType == "Other Aircraft" then mist.respawnGroup(shutdownName, true) --Change or delete end end end world.addEventHandler(onShutdownAI) The above works for me. Also, you can create a trigger zone, {switched condition} {part of group/unit out of zone} {do script mist.respawn...} Edited February 23, 2018 by shnicklefritz
Slutcher Posted February 22, 2018 Posted February 22, 2018 do if Group.getByName('F-86F CAP'):getSize() < 1 then mist.respawnGroup('F-86F CAP', true) end end Hope that helps. http://www.51bisons.com
Montrose Posted August 25, 2018 Posted August 25, 2018 do if Group.getByName('F-86F CAP'):getSize() < 1 then mist.respawnGroup('F-86F CAP', true) end end Hope that helps. is their a way to pass a variable in the Group.getByName? eg do if Group.getByName('Variable'):getSize() < 1 then mist.respawnGroup('Variable', true) end end [sIGPIC][/sIGPIC]
Khamul Posted March 1, 2020 Posted March 1, 2020 Do you insist on MIST? I do this all the time with MOOSE: Badguy1 = SPAWN:New( "Badguy1" ) :InitRandomizePosition(true,1000,5) :InitLimit( 1, 101 ) :SpawnScheduled( 30, .5 ) 1 - Create what you want to be spawned and name the group Badguy1. Select "Late Activation." 2 - MISSION START trigger, "Moose load", no conditions, DO SCRIPT FILE, Moose.lua 3 - Save this snippet above into a filename ending with .lua. 4 - MISSION START trigger, "Mission load", no conditions, DO SCRIPT FILE, <what_you_named_it>.lua 5 - profit. This gives you 1 badguy alive at a time, 101 total, spawned within a 1000M radius of where you place him, with a new one coming randomly 15 to 30 seconds after the existing one dies. Adjust counts, radius size to suit. Hi, I'm quite new to the MOOSE, I've tried your script and it works for single unit, but if I use group with more than 1 unit, seems not working. Is there a script for creating randomize respawn group with more than 1 unit or randomize respawn mutiple groups, please? TU NE CEDE MALIS SED CONTRA AUDENTIOR ITO _________________________________________ Asrock Fatal1ty Gaming K6+, i5-6600K, 32 GB DDR4, Asus GTX 1070 Strix, SSD 500GB, HDD 1TB, Win 10 x64, Monitor LG Ultrawide 29UM67, Soundblaster Z+Sennheiser Game One, HOTAS Warthog, TFRP Thrustmaster, TrackIr
Phantom_Mark Posted March 1, 2020 Posted March 1, 2020 Hi, I'm quite new to the MOOSE, I've tried your script and it works for single unit, but if I use group with more than 1 unit, seems not working. Is there a script for creating randomize respawn group with more than 1 unit or randomize respawn mutiple groups, please? Following.......this would be great if you can do groups, like you say.
Ramsay Posted March 1, 2020 Posted March 1, 2020 Hi, I'm quite new to the MOOSE, I've tried your script and it works for single unit, but if I use group with more than 1 unit, seems not working. Is there a script for creating randomize respawn group with more than 1 unit or randomize respawn mutiple groups, please? Change :InitLimit( [b]1[/b], 101 ) to :InitLimit( [b]2[/b], 101 ) for 2 aircraft to spawn, 3 for 3 aircraft, etc. i9 9900K @4.8GHz, 64GB DDR4, RTX4070 12GB, 1+2TB NVMe, 6+4TB HD, 4+1TB SSD, Winwing Orion 2 F-15EX Throttle + F-16EX Stick, TPR Pedals, TIR5, Win 11 Pro x64, Odyssey G93SC 5120X1440
Khamul Posted March 1, 2020 Posted March 1, 2020 Change :InitLimit( [b]1[/b], 101 ) to :InitLimit( [b]2[/b], 101 ) for 2 aircraft to spawn, 3 for 3 aircraft, etc. Great! You made my day! :thumbup: Now I understand that I need to practice and explore/try the code. Thanks so much! TU NE CEDE MALIS SED CONTRA AUDENTIOR ITO _________________________________________ Asrock Fatal1ty Gaming K6+, i5-6600K, 32 GB DDR4, Asus GTX 1070 Strix, SSD 500GB, HDD 1TB, Win 10 x64, Monitor LG Ultrawide 29UM67, Soundblaster Z+Sennheiser Game One, HOTAS Warthog, TFRP Thrustmaster, TrackIr
rwbishUP Posted March 7, 2020 Posted March 7, 2020 Do you insist on MIST? I do this all the time with MOOSE: Badguy1 = SPAWN:New( "Badguy1" ) :InitRandomizePosition(true,1000,5) :InitLimit( 1, 101 ) :SpawnScheduled( 30, .5 ) 1 - Create what you want to be spawned and name the group Badguy1. Select "Late Activation." 2 - MISSION START trigger, "Moose load", no conditions, DO SCRIPT FILE, Moose.lua 3 - Save this snippet above into a filename ending with .lua. 4 - MISSION START trigger, "Mission load", no conditions, DO SCRIPT FILE, <what_you_named_it>.lua 5 - profit. This gives you 1 badguy alive at a time, 101 total, spawned within a 1000M radius of where you place him, with a new one coming randomly 15 to 30 seconds after the existing one dies. Adjust counts, radius size to suit. I'm adding some training sorties to my main mission. I have 1 group of 2 su33s set to spawn from Kuznetsov. I am using MOOSE, I would like these 2 units to respawn from the original point after they're destroyed. I can only find information on respawning in random location. Could you help me out with assigning them to respawn back on the kuznetsov and repeat their orbit, thanks.
=475FG= Dawger Posted March 7, 2020 Posted March 7, 2020 I'm adding some training sorties to my main mission. I have 1 group of 2 su33s set to spawn from Kuznetsov. I am using MOOSE, I would like these 2 units to respawn from the original point after they're destroyed. I can only find information on respawning in random location. Could you help me out with assigning them to respawn back on the kuznetsov and repeat their orbit, thanks. Delete the initrandomposition line
rwbishUP Posted March 7, 2020 Posted March 7, 2020 Delete the initrandomposition line Thanks'a'million! I'm trying to learn, but it's a slow process
Fab Posted March 11, 2020 Posted March 11, 2020 This is what I have been looking for!!!!! Is there a way, to make the spawn use random planes Intel Core i7-6700K Cpu 4.00 GHz OC 4.8 GHz Water Cooled|32 GB DDR4 ram OC| Nvidia RTX 2080Ti| TrustMaster Warthog|Saitek Battle Pro Pedals | Logitec G13| Oculus Rift S :joystick: I´m in for a ride, a VR ride:pilotfly: https://www.youtube.com/channel/UCBX_-Hml7_7s1dggit_vGpA?view_as=public
rwbishUP Posted March 14, 2020 Posted March 14, 2020 This is what I have been looking for!!!!! Is there a way, to make the spawn use random planes I don't know, I'm sure there is, but i definitely don't know how, I'm just now learning to spawn a single ac, I've got a long way too go
Coyote_One Posted September 3, 2020 Posted September 3, 2020 Do you insist on MIST? I do this all the time with MOOSE: Badguy1 = SPAWN:New( "Badguy1" ) :InitRandomizePosition(true,1000,5) :InitLimit( 1, 101 ) :SpawnScheduled( 30, .5 ) 1 - Create what you want to be spawned and name the group Badguy1. Select "Late Activation." 2 - MISSION START trigger, "Moose load", no conditions, DO SCRIPT FILE, Moose.lua 3 - Save this snippet above into a filename ending with .lua. 4 - MISSION START trigger, "Mission load", no conditions, DO SCRIPT FILE, <what_you_named_it>.lua 5 - profit. This gives you 1 badguy alive at a time, 101 total, spawned within a 1000M radius of where you place him, with a new one coming randomly 15 to 30 seconds after the existing one dies. Adjust counts, radius size to suit. Is that possible if I wanted to choose when I wanted those units to come back? Say my team is ready for a fight, I want them to choose when to spawn them in each time. Not automatically after a delay. I currently use the \ F10 other to spawn aircraft in but when theyre destroyed thats it, cant bring them back. I'd like to respawn on their command multiple times.
Seance12 Posted September 5, 2020 Posted September 5, 2020 You can use templates to randomize what gets spawned. Check the moose docs on github for example missions and build off of those. Thats what i do. Sent from my LM-Q730 using Tapatalk
Walshtimothy Posted July 28, 2023 Posted July 28, 2023 can the above moose or mist options be easily set to spawn in one of 20 ( or larger ) zones ? Thanks , trying to learn this but its gave me a migraine lol walshtimothyWW2 virtual flier - currently playing on 4ya ww2 - youtube channel here https://www.ww2adinfinitum.blog - https://projectoverlord.co.uk/
Pikey Posted August 18, 2023 Posted August 18, 2023 On 7/28/2023 at 9:17 PM, Walshtimothy said: can the above moose or mist options be easily set to spawn in one of 20 ( or larger ) zones ? Thanks , trying to learn this but its gave me a migraine lol https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones 1 ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *
Walshtimothy Posted August 18, 2023 Posted August 18, 2023 52 minutes ago, Pikey said: https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones thanks man , gotta say , im no coder and this all makes my brain smoke lol walshtimothyWW2 virtual flier - currently playing on 4ya ww2 - youtube channel here https://www.ww2adinfinitum.blog - https://projectoverlord.co.uk/
609_Relentov Posted August 20, 2023 Posted August 20, 2023 Not sure if this would fit your needs, but I made my OpForAC script available that could save you some time, re: adding unlimited spawning of opposing force AI aircraft. I wrote it as a way to incorporate air-to-air training in any mission I create, without having to create enemy AI aircraft groups and triggers - via the F10 menu. Also as sort of a way to continue to learn Lua and the SSE. 1 1
Recommended Posts