Jump to content

Mist Script for group respawning back to departure base


Recommended Posts

Posted

What is the best way to get a group which consists of one airframe to respawn back to original base it departed from after landing at a different base...???

Posted

moose example

 

Not an answer with mist, but with moose...

 

local PlaneSpawn = SPAWN:New("Planegroup")
PlaneSpawn:InitRepeatOnLanding()
PlaneSpawn:Spawn()

 

Once the plane group lands, it will be respawned at the original position defined in the mission editor.

 

Check here:

http://flightcontrol-master.github.io/MOOSE/

 

Fc

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Posted

It is mostly just down to determining when you want to respawn the group. So you can do a check like

 

if Unit.getByName('whatever') and Unit.getByName('whatever'):inAir() == false then

mist.resapwnGroup('whatever', true)

end

 

Depending on how often that was checked it may respawn the group the moment it lands. Alternatively you can add a delay to the check or whatever else.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Mine is slightly different:

  
if not Group.getByName('RUSCAP1') then
   local msg = {}
   msg.text = "Respawning RUSCAP1."
   msg.displayTime = 30
   msg.msgFor = {coa = {'all'}}
   mist.message.add(msg)
   mist.respawnGroup('RUSCAP1', true)
   local con = Group.getByName('RUSCAP1'):getController()
end

 

I can't remember where I got this from, but it works.

It also displays a message for 30 seconds.

This is setup to respawn a group called RUSCAP1.

This just respawns them wherever they originally started, so if they start on a ramp, they'll respawn on the ramp.

Be aware that parking spaces are not preserved, so they'll just pick the first open parking space.

Posted
What is the best way to get a group which consists of one airframe to respawn back to original base it departed from after landing at a different base...???

 

 

 

Tomorrow we'll get your stuff together Hafody :-)

 

We're almost there, aren't we?

 

FC

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

  • Recently Browsing   0 members

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