Jump to content

1.2.8 ME trigger problem: Radio Item Add For Coalition


L0op8ack

Recommended Posts

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 by L0op8ack
Link to comment
Share on other sites

  • 1 month later...

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 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

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

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 by ajax
Link to comment
Share on other sites

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

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

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

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

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

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 by =LFC=Chameleon_Silk
Link to comment
Share on other sites

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 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

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

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

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

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

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

  • Recently Browsing   0 members

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