

hardnick
Members-
Posts
63 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by hardnick
-
Oh, "DO SCRIPT FILE" Now I get it! but the second Su27(respawn su27) is still very peaceful and not aggressive. But thank you very much, Zayets.
-
Thank you so much! But I can't see the respawn.lua file you edited.
-
Yes v.ID output is the group name (su27)
-
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
-
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.
-
I tested. if the group is activated() then the mist.respawnGroup won't work.
-
Thank you! Zayets, I will try it. ^^
-
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
-
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
-
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
-
Excuse me if not Group.getByName('groupName') then mist.respawnGroup('groupName', true) end it needs Trigger once or a continuous check In the mission editor if Using too much continuous check will reduce the game performance? For example 20 Thank you!
-
我找到答案了~謝謝 removeItem的使用方式路徑非常重要 以下是例子: missionCommands.removeItemForCoalition(coalition.side.BLUE, {[1] = "外層選項名稱", [2] = "內層選項名稱"})
-
I got it! Example ForCoalition removeItem Path will be : actually missionCommands.removeItemForCoalition(coalition.side.BLUE, {[1] = "Fighters", [2] = "F-18"}) so After understanding missionCommands.removeItemForCoalition(coalition.side.BLUE, {[1] = v.path[1], [2] = v.path[2]}) Thank you guys!!!
-
That's it "Path is a table" Great! Thank you guys, I will try.
-
I created the Radio submenu to trigger the AI vehicles But I try any kind of path. It can't delete the items in the submenu Sometimes it will removes all Radio item (F10 is wiped) What am I doing wrong? On the path? I just want to delete that single item after the trigger (Like F-18 or Su-27) thank you very much! local function setFlags(v) trigger.action.setUserFlag(v.flag, v.val) missionCommands.removeItem(v.path) end local _path1 = missionCommands.addSubMenu("Fighters", nil) local _path2 = missionCommands.addSubMenu("Tanks", nil) local ai_1 = missionCommands.addCommand("F-18", _path1, setFlags, {flag=101, val=true, path=ai_1}) local ai_2 = missionCommands.addCommand("Su-27", _path1, setFlags, {flag=102, val=true, path=ai_2}) local ai_3 = missionCommands.addCommand("T-90", _path2, setFlags, {flag=201, val=true, path=ai_3}) local ai_4 = missionCommands.addCommand("T-72", _path2, setFlags, {flag=202, val=true, path=ai_4})
-
目前發現應該是路徑的問題造成無法單獨刪除最內層的選單 底下function裡面的v.Path已經可以成功地將F10選中的最外層給刪除掉 而現在的問題是更內層的路徑有點搞不懂 像是 missionCommands.removeItemForCoalition(coalition.side.BLUE, v.Path{v.AI}) 結果這樣也不對.....不知到最內層的Path該怎麼寫呢? local function setFlags(v) trigger.action.setUserFlag(v.flag, v.val) trigger.action.outText(v.AI, 5) missionCommands.removeItemForCoalition(coalition.side.BLUE, v.Path) end local FIGHT_SPAWNMENU = missionCommands.addSubMenuForCoalition(coalition.side.BLUE, "AI Fighter") missionCommands.addCommandForCoalition(coalition.side.BLUE, "F-18", FIGHT_SPAWNMENU, setFlags, {flag=101, val=true, Path=FIGHT_SPAWNMENU, AI="F-18"}) missionCommands.addCommandForCoalition(coalition.side.BLUE, "Su-27", FIGHT_SPAWNMENU, setFlags, {flag=102, val=true, Path=FIGHT_SPAWNMENU, AI="Su-27"}) local TANK_SPAWNMENU = missionCommands.addSubMenuForCoalition(coalition.side.BLUE, "AI Tank") missionCommands.addCommandForCoalition(coalition.side.BLUE, "T-90", TANK_SPAWNMENU, setFlags, {flag=201, val=true, Path=TANK_SPAWNMENU, AI="T-90"}) missionCommands.addCommandForCoalition(coalition.side.BLUE, "T-72", TANK_SPAWNMENU, setFlags, {flag=202, val=true, Path=TANK_SPAWNMENU, AI="T-72"})
-
我嘗試使用lua來編寫F10選單的分層目錄 然後分別使用不同的Flag來觸發AI單位 但是想要在相對應的AI單位被觸發之後順便就把選單裡面的那個選項給移除 例如我選了F-18然後AI F-18被觸發之後F10選單裡面的F-18選項就一起刪除掉 於是找到了removeItemForCoalition 這個語法來嘗試 但不知怎麼做才是對的....它總是會把整的F10選單給清除掉 剛剛嘗試接觸lua還不是很了解 麻煩各位大大幫小弟解惑一下 以下是選單語法的例子 我是想在setFlags的function裡面一起解決掉就好了 local function setFlags(v) trigger.action.setUserFlag(v.flag, v.val) missionCommands.removeItemForCoalition(coalition.side.BLUE, v.AI, FIGHT_SPAWNMENU) end local FIGHT_SPAWNMENU = missionCommands.addSubMenuForCoalition(coalition.side.BLUE, "戰機") missionCommands.addCommandForCoalition(coalition.side.BLUE, "F-18", FIGHT_SPAWNMENU, setFlags, {flag=101, val=true, AI="F-18"}) missionCommands.addCommandForCoalition(coalition.side.BLUE, "Su-27", FIGHT_SPAWNMENU, setFlags, {flag=102, val=true, AI="Su-27"}) local TANK_SPAWNMENU = missionCommands.addSubMenuForCoalition(coalition.side.BLUE, "裝甲車") missionCommands.addCommandForCoalition(coalition.side.BLUE, "T-90", TANK_SPAWNMENU, setFlags, {flag=201, val=true, AI="T-90"}) missionCommands.addCommandForCoalition(coalition.side.BLUE, "T-72", TANK_SPAWNMENU, setFlags, {flag=202, val=true, AI="T-72"}) 感謝 function 裡面判斷 TANK_SPAWNMENU 的部分我會再修改 請問lua能用 if()之類的判斷式嗎?
-
我知道了....原來在空中是要按RALT+\能叫出選單
-
原來是這個樣子~那請問我在任務編輯器裡面添加的無線電選單內容"\然後F10"裡面,我已經添加多個可以Trigger的項目,大黃蜂起飛後該如何選擇呢? 感謝!
-
F/A-18C 在空中重的話無法使用 \ 進入無線電選單,但是如果改成跑道重生 \ 無線電選單就回來了... 相同檔案測試F-15C在空中重生 \ 無線完全電可以正常顯示,請問這是Bug嗎?
-
When I use the Selective Jettison Knob, STORES does not respond. It seems that only RACK/LCHR is normal (DCS OPEN BETA version 2.5.2.18307)
-
好的~是BUG我就不用擔心了....我是怕我漏掉了什麼動作 謝謝您!
-
-
原來是這樣!太感謝了~起碼知道原因和解決辦法^^