Jump to content

Recommended Posts

Posted

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:

Posted

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.

 

Banner EDForum2020.jpg

Have fun. Don't suck. Kill bad guys. 👍

https://discord.gg/blacksharkden/

Posted (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 by shnicklefritz
  • 6 months later...
Posted
 
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

  • 1 year later...
Posted
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

Posted
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.

Posted
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

Posted
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

Posted
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.

 

 

Posted
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

 

 

 

 

EDsignaturefleet.jpg

Posted
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

 

 

  • 5 months later...
Posted
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.

Posted

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

  • 2 years later...
  • 3 weeks later...
Posted
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

 

  • Like 1

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Posted

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.

 

 

  • Like 1
  • Thanks 1
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...