Jump to content

Recommended Posts

Posted

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

Posted (edited)

I made a file to test the problem I said.

Please use the F10 menu to activate a su27

Then when you shoot down the first one, please use F10 to respawn a su27.

Then it began to show a idle(sluggish?) situation.

ReSpawn Test.miz

Edited by hardnick
Posted

Confirm that the late activation if canceled

respawn can work Very well!!!

Is there a better solution to this problem?

(except uncheckedlate activation)

 

Thank you~~~ Grimes

Posted

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.

Posted

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

Posted

Question, can you output the value of v.ID ? By the looks of it it returns the group ID and not the name of the group. I haven't checked the mission yet

[sIGPIC]OK[/sIGPIC]

Posted

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]

Posted

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]

  • Recently Browsing   0 members

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