Jump to content

removing radio item


xcom
 Share

Recommended Posts

Hi all,

 

I got to a small predicament with using the missionCommands.removeItemForCoalition function.

The function states that you need to use ENUM COALITION and PATH.

I've mistakenly removed the submenu but then figured out that I'll need to put the command itself's PATH into the remove function.

 

For example -

1. I run -

local rPath = missionCommands.addCommandForCoalition(groupCoaEnum, v..Zname.."_CAP", redCAP, setCC, v..Zname.."_CAP")

groupCoaEnum - Enum of the coalition.

v..Zname.."_CAP" - name of the string.

redCAP - PATH to the submenu.

setCC - Function that runs a command to do something.

v..Zname.."_CAP" - argument that is passed to the function.

 

Now I'd like to remove the command from the radio submenu, ONLY after the command runs, meaning ONLY after it has been selected.

To do it, I figured I'll add the command to remove it in the inside function called setCC, problem is, the PATH is not returned or I need somehow to get the PATH of the newly added command into the setCC function.

 

I hope this is understandable, it's a bit hard to explain.

Thanks for any help!


Edited by xcom
Link to comment
Share on other sites

  • 1 year later...
 Share

  • Recently Browsing   0 members

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