Jump to content

mist.respawnGroup unit just sits idle


hardnick

Recommended Posts

I finally learned to use the mist.respawnGroup successfully.

But there have been some problem

 

if not Group.getByName(v.ID) then
           mist.respawnGroup(v.ID, true)
end

 

The original unit(Group) works properly! after that... any respawned unit it can Follow the route But just sits idle.

What am I doing wrong?

I can even formation with it :pilotfly:

 

Thank You.

 

My DCS version 2.5.3.21708

MIST version mist_4_3_74

Screen_180924_033024.jpg.84b6963acc440c2bcacd3bfaaaa49233.jpg

Link to comment
Share on other sites

Appears to be related to having late activation checked. The group will attack normally with a normal spawn.

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

Link to comment
Share on other sites

I think of a way.

If I destroy All those groups at the beginning of the mission

Group.getByName(SomeGroup):destroy()

I don't need to use the "later activation".

 

Although this is not the perfect solution

But at least it can solve the problem :)

 

Thank you all.

Link to comment
Share on other sites

Thank you, Zayets, but I have tried it, it still doesn't work.

 

local function B_SpawnAI(v)
local TextSpawn_A = "RED "..v.AIGroup_BGF.." activated"
local TextSpawn_B = "RED "..v.AIGroup_BGF.." ReSpawn"
local TextSpawn_C = "RED "..v.AIGroup_BGF.." Already performing a task"
    if not Group.getByName(v.ID) then
           mist.respawnGroup(v.ID, true)
		Group.getByName(v.ID):activate()
           trigger.action.outTextForCoalition(coalition.side.BLUE, TextSpawn_B, 30)
         elseif Unit.getByName(v.UnitName):isActive() then
                trigger.action.outTextForCoalition(coalition.side.BLUE, TextSpawn_C, 30)
           else
                local myGroup = Group.getByName(v.ID)
                Group.activate(myGroup)
                trigger.action.outTextForCoalition(coalition.side.BLUE, TextSpawn_A, 30)
            end
         end
         




local Menu_BlueItem = {"ReSpawn Test"}
local SubMenu_BlueItem_1 = {"su27"}

local Blue_Menu1 = missionCommands.addSubMenuForCoalition(coalition.side.BLUE, Menu_BlueItem[1], B_SpawnAI)

missionCommands.addCommandForCoalition(coalition.side.BLUE, SubMenu_BlueItem_1[1], Blue_Menu1, B_SpawnAI, {AIGroup_BGF = SubMenu_BlueItem_1[1], ID = "su27", UnitName = "U_su27"})

ReSpawn Test.miz

Link to comment
Share on other sites

I just took your script from the DO SCRIPT trigger action and created a new file which I loaded 5 seconds after mission starts with DO SCRIPT FILE. So basically it is exactly as you wrote it. If you want to see the file you will have to unzip ReSpawn Yes.miz and then simply look into the folder for it.

[sIGPIC]OK[/sIGPIC]

Link to comment
Share on other sites

Yeah, tasking on the respawned units sometimes sub par. They do what's expected quite often for me. One thing I do myself is to use dynAdd instead of respawn. It is the same approach, have a late activated group and then use dynAdd. This function is more to my liking as I can modify the route on the fly. It does take more coding but it (almost) never fails.

[sIGPIC]OK[/sIGPIC]

Link to comment
Share on other sites

  • Recently Browsing   0 members

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