Jump to content

Infinite Respawning with MIST


PhoenixTunes

Recommended Posts

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:

Link to comment
Share on other sites

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/

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.7GHz, 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 10 Pro x64, 1920X1080

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

And I will execute vengeance in anger and fury upon the heathen, such as they have not heard.

                                                                                                                 Micah 5:15

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Delete the initrandomposition line

 

Thanks'a'million! I'm trying to learn, but it's a slow process

 

And I will execute vengeance in anger and fury upon the heathen, such as they have not heard.

                                                                                                                 Micah 5:15

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

 

And I will execute vengeance in anger and fury upon the heathen, such as they have not heard.

                                                                                                                 Micah 5:15

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

52 minutes ago, Pikey said:

thanks man , gotta say , im no coder and this all makes my brain smoke lol 

sig sm.png

walshtimothyWW2 virtual flier - currently playing on 4ya ww2 - youtube channel here

https://www.ww2adinfinitum.blog -  https://projectoverlord.co.uk/

 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Recently Browsing   0 members

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