L0op8ack Posted April 30, 2014 Share Posted April 30, 2014 (edited) DCS World Version : 1.2.8 27203 Problem: ME trigger 'Radio Item Add For Coalition' Red client radio menu show items added for blue Test Mission and track files: Trigger-RadioAddForCol.zip Test mission setup detail: triggers: ONCE | time more( 30 ) | Radio Item Add For Coalition( Red, 'Radio Item For Red') ONCE | time more( 60 ) | Radio Item Add For Coalition( Blue, 'Radio Item For Blue') planes: One Red Su25T client for checking Radio Item added by triggers. Test result: (Red Su25T \ F10 radio menu) mission time(seconds) | \ F10 radio Item | Correct? 00-30 | N/A | YES 30-60 | Radio Item For Red | YES 60+ | Radio Item For Blue | NO Edited June 4, 2014 by L0op8ack Link to comment Share on other sites More sharing options...
dooom Posted June 3, 2014 Share Posted June 3, 2014 (edited) confirmed... major pain as i just spent 4 days building a new PvP mission... can this get looked at or in the least, confirm that it is reported to ED? I also note that adding radio item for a specific group will make it available to whole coalition. Demo mission attached. I'll link to this thread under the bugs forum too.RADIO ADD BUG.miz Edited June 3, 2014 by dooom ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL Link to comment Share on other sites More sharing options...
dooom Posted June 3, 2014 Share Posted June 3, 2014 Can a tester acknowledge if this one has been reported as a bug..? It's a game breaker for any advanced PvP mission. My demo mission shows it pretty clearly ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL Link to comment Share on other sites More sharing options...
ajax Posted June 4, 2014 Share Posted June 4, 2014 (edited) Interesting. The first time I joined a RED P-51 I saw the BLUE menu. I switched aircraft, and from that point on I saw the appropriate menu in all aircraft (in dOoOm's mission). Edit: This test was in MP. I tried it in SP and the menu was always wrong for RED aircraft. Edited June 4, 2014 by ajax Link to comment Share on other sites More sharing options...
dooom Posted June 4, 2014 Share Posted June 4, 2014 Yeah it's borked.... I am seriously pained by this bug + the bridge issues for mission making ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL Link to comment Share on other sites More sharing options...
LFCChameleon_Silk Posted June 4, 2014 Share Posted June 4, 2014 using the ingame triggers to give radio has this behaviour however if you use the radio adding part such as from the CTTS script then you will circumvent this issue. as far as i can tell this bug was also present in 1.2.7 possibly previous versions as well (i never reported i just assumed such an obvious bug was noted already) Link to comment Share on other sites More sharing options...
dooom Posted June 4, 2014 Share Posted June 4, 2014 I didn't realize CTTS had an add function - I worry about addin too many scripts to the mission though... It already has mist + flak+ scout + scoring scripts....Is there a best practice I should be aware of when using multiple scripts? ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL Link to comment Share on other sites More sharing options...
ENO Posted June 4, 2014 Share Posted June 4, 2014 I'm sure someone can answer more completely- but think of it this way... If you have a script that requires MIST to function properly, then logically you would need MIST to load sooner. Sometimes you need a few seconds for MIST to load, and then for the script to load. Most of my scripts are loaded on a "time more 10" condition to give MIST a chance to load. An exception to this rule might be if the script doesn't have a reason to trigger (ie: a unit is not in a designated zone- or you don't want it to track units until later on in the mission) then it won't necessarily cause an error. You can load the script on a different condition later on... they don't all need to be dog piled into the mission at once. I always recalled CTTS needing to be loaded by initialization (at the bottom) and my setup currently runs with CTTS loaded then, and MIST loaded at start. I was corrected on this recently- but this has not caused me any issues. As for the other scripts- I don't think they'll necessarily conflict with one another provided the script functions found within base scripts (like MIST) are already loaded. As long as those are loaded, you should be able to bring your other various scripts online thereafter... (time more 10-12 is a time that has worked for me). "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art Link to comment Share on other sites More sharing options...
dooom Posted June 4, 2014 Share Posted June 4, 2014 So CTTS works with do script file? I was sure it needed init too.. Thus conflict with mist ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL Link to comment Share on other sites More sharing options...
LFCChameleon_Silk Posted June 4, 2014 Share Posted June 4, 2014 (edited) nah your not really understanding what i mean, there is a portion of the CTTS script and many other scripts where radio commands are given out to the players based on an table of unit names at the top of the script, the radio commands are then linked to a function that is run elsewhere in the script (if your doing a lot of trigger based stuff in the ME then you can simply make a function that sets a flag - here here is a working example. (although i admit i did not test this prior to posting) MIST has nothing to do with the radio adding this way. -- Radio add example -- ------------------------------- -- INIT VALUES FOR FIRST RUN -- ------------------------------- radiotable_red = {} radiotable_blue = {} local rradiotext1 = "Example red radio text" local bradiotext1 = "Example blue radio text" -- add for which group names you want to get the radio red_radio = { "Su-25 Russian #000", blue_radio = { "Su-25 American #000", ------------------------------------------------------------------------------------------------------------------------------------------------------------------ function addradio_red(arg, time) ------------------------------------------------------------------------------------------------------------------------------------------------------------------ for i=1,#red_radio do AddRadioMenu_red(red_radio[i]) end return time + 5 end --- ------------------------------------------------------------------------------------------------------------------------------------------------------------------ function addradio_blue(arg, time) ------------------------------------------------------------------------------------------------------------------------------------------------------------------ for i=1,#blue_radio do AddRadioMenu_blue(blue_radio[i]) end return time + 5 end --- ------------------------------------------------------------------------------------------------------------ ------------------------------------------ RADIO COMMAND ADD ---------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------ function AddRadioMenu_red(unitName) ------------------------------------------------------------------------------------------------------------------------------------------------------------------ if radiotable_red[unitName] == nil then local unit = Unit.getByName(unitName) if unit == nil then return end local group = unit:getGroup() if group == nil then return end radiogid = group:getID() missionCommands.addCommandForGroup(radiogid, rradiotext1, nil, example_function_to_run_for_red, unitName) radiotable_red[unitName] = true end end --- ------------------------------------------------------------------------------------------------------------ ------------------------------------------ RADIO COMMAND ADD ---------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------ function AddRadioMenu_blue(unitName) ------------------------------------------------------------------------------------------------------------------------------------------------------------------ if radiotable_blue[unitName] == nil then local unit = Unit.getByName(unitName) if unit == nil then return end local group = unit:getGroup() if group == nil then return end radiogid = group:getID() missionCommands.addCommandForGroup(radiogid, bradiotext1, nil, example_function_to_run_for_blue, unitName) end end --- ------------------------------------------------------------------------------------------------------------------------------------------------------------------ function example_function_to_run_for_blue() ------------------------------------------------------------------------------------------------------------------------------------------------------------------ trigger.action.setUserFlag(1, 1) -- set a flag when radio command used return end --- ------------------------------------------------------------------------------------------------------------------------------------------------------------------ function example_function_to_run_for_red() ------------------------------------------------------------------------------------------------------------------------------------------------------------------ trigger.action.setUserFlag(2, 1) -- set a flag when radio command used return end --- ------------------------------------------------------------------------------------------------------------------------------------------------------------------ function recheck_red() ------------------------------------------------------------------------------------------------------------------------------------------------------------------ for i=1,#red_radio do local unitName = red_radio[i] local unit = Unit.getByName(unitName) if unit == nil then local playerName = unit:getPlayerName() end end timer.scheduleFunction(recheck_red, nil, timer.getTime() + 2) return end --- ------------------------------------------------------------------------------------------------------------------------------------------------------------------ function recheck_blue() ------------------------------------------------------------------------------------------------------------------------------------------------------------------ for i=1,#blue_radio do local unitName = blue_radio[i] local unit = Unit.getByName(unitName) if unit == nil then local playerName = unit:getPlayerName() end end timer.scheduleFunction(recheck_blue, nil, timer.getTime() + 2) return end --- timer.scheduleFunction(addradio_blue, nil, timer.getTime() + 5) timer.scheduleFunction(addradio_red, nil, timer.getTime() + 5) timer.scheduleFunction(recheck_red, nil, timer.getTime() + 2) timer.scheduleFunction(recheck_blue, nil, timer.getTime() + 2) its actually a good idea to run seperate scripts as seperate files that way if one fails the rest of your mission keeps working (or should) you can "do script" a MIST function as long as the mission has mist loading at the start and then the trigger thats doing the do script is delayed by a few seconds of mission time. adding radio items this way actually solves a problem it doesn't create one and it will never fail to work, the script is not complex and is very simple and if this failed then ED would have some big problems with the scripting engine on their hands. also about you init question dooom, you can init a script not just at the bottom of the ME trigger window, it only needs to be loaded for access to its functions to be available so if you made a trigger that on the 33rd second loaded mist, you would be able to use its functions after 33 seconds and this could be done with a trigger with do script file or do script with the entire contents of MIST in it (once they fix the cutoff bug of do script) Edited June 4, 2014 by =LFC=Chameleon_Silk Link to comment Share on other sites More sharing options...
dooom Posted June 5, 2014 Share Posted June 5, 2014 (edited) Thanks Silk... How would i use the script above to add move than one radio item per unit? i am unsure how to use the example you provided.... i load it as a do script file and identify the units in the red/blue radio table but thats it.. Am i supposed to use a do script later to acutally add it? sorry for not understanding but i was having trouble following the example into practical use. **EDIT** I figured it out by cross comparing your example to CTTS.. thanks!! Edited June 5, 2014 by dooom ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL Link to comment Share on other sites More sharing options...
LFCChameleon_Silk Posted June 5, 2014 Share Posted June 5, 2014 np i think you will find that part of the script works wonders for fixing radio command issues, remember that you can build a lot of the flag throwing right into the script itself and also have it run a function and output text to players etc, this is how i built my task system. 1 Link to comment Share on other sites More sharing options...
dooom Posted June 5, 2014 Share Posted June 5, 2014 i just finished modifying the script you provided and all is working in the missions agian.. Thanks a million! ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL Link to comment Share on other sites More sharing options...
LFCChameleon_Silk Posted June 5, 2014 Share Posted June 5, 2014 anytime man, make sure you give me a link to your mission so i can test it out myself and see how it develops, or better yet the server your hosting it at -- you can also dissect anything from my mission: Operation Perched Eagle, I'd be lying if I said it had advanced scripting in it but you will find examples of a lot of working MIST functions without the elegance of other scripts written by other people (sometimes the elegance really makes scripts hard to follow whats occuring) its not well documented (if at all) but you may recognize mist functions easy enough. Link to comment Share on other sites More sharing options...
dooom Posted June 6, 2014 Share Posted June 6, 2014 yeah - the mission is close to release... i just have to fix a couple triggers and it will be live - thanks a million for the help - you, sith, stonehouse, grimes, speed, ajax - you all help guys like me quite a bit with the scripts... its appreciated. ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL Link to comment Share on other sites More sharing options...
Stonehouse Posted June 6, 2014 Share Posted June 6, 2014 Sounds like another interesting mission, I can't join in due to the time difference and needs of real life but I expect to see some pics lol ;D On the scripts help thing, no problem at all but I'm still in the beginners group compared to most here and learn a lot by seeing other people's problems get sorted so it's only fair that if I have some knowledge I'm happy to pass it on and try to help. Mind you I might be the one asking for help soon, I'm still stuck with the time of flight version of the flak script and getting Snafu's GCICAP thing working 100% for me but have some time off soon so hopefully will get somewhere in between house reno tasks. Link to comment Share on other sites More sharing options...
LFCChameleon_Silk Posted June 6, 2014 Share Posted June 6, 2014 i have issues with having dynamically created reinforcements being able to capture my zones that are setup with MIST, but no one has any answers for me :( but as Stonehouse said - I'm beginner but that won't stop me from sharing anything I've learned or created for the sake of helping others and the community. Link to comment Share on other sites More sharing options...
Stonehouse Posted June 6, 2014 Share Posted June 6, 2014 I didn't catch your thread Silk but did you try Mist 3.3a - the one Ajax did some fixes for? The changes were to do with some of the unit table functionality in Mist with 1.2.8 so it may help you if you haven't tried it already. Link to comment Share on other sites More sharing options...
LFCChameleon_Silk Posted June 7, 2014 Share Posted June 7, 2014 thanks i will check it out Stonehouse Link to comment Share on other sites More sharing options...
Recommended Posts