Flat!!! 0 Posted May 23, 2007 I am trying to make a menu in the radio. So what I want is like If I use Alpha channel I will come to a Sub menu. Example of what I mean: 1st menu Channel Alpha "BOOM" 2nd menu: Alpha "Bang" Bravo "kaboom" Charlie "KADABABOOM" Now if i press in first menu BOOM I come to the 2nd menu and see BANG KABOOM... And if I click Alpha in 2nd menu I get a Hint saying "Bang" and if I press Bravo I get a hint " kaboom" and so on. I would be very thankful if somebody could help me And I want to be able to use other menus too so I would have something similar on Bravo in 1st menu. (what you see first on radio) Share this post Link to post Share on other sites
Big Dawg KS 6 Posted May 23, 2007 Yes it would be possible but if you can't figure it out yourself you're probably not ready to attempt something that difficult. But basically you'd need to create your radio triggers, set them to repeatedly, and on activation you set the value of a global variable for each trigger, ex: AlphaActivated = 1. Then in a script use those variables to keep track of what submenu is currently active and when to do some action. You can hide, activate or change the text of the radio channels with setRadioMsg to create the submenus. But basically the hard part is keeping track of what menu is currently displayed and thus knowing what action to take. Share this post Link to post Share on other sites
Taurus 20 Posted May 24, 2007 TBH Flat use http://www.flashpoint1985.com/cgi-bin....t=62966 That is a dialog thing, I dunno but I think those are just triggered for the one who used them. I'm currently having problems with all of this, <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">local player in MP all players are local and the script you run will probably get executed on all players too. same goes with the utterly confusion with <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">position player Who and which player will the game take the position from?? Anyways, back to teh radio bit. You will get lost on the whole radio part in MP because the game can not determine(As far as I know) who used the radio. Using addAction menus suck too because even if you do removeAction <id> it will just be removed from you, but your AI fellow mates and the others will see the ones removed. (a bug me thinks) Share this post Link to post Share on other sites
the unknown 0 Posted May 24, 2007 Works in MP The limiter sometimes refuses to do its job. Place 1 trigger for each radiocommand, and set it on repeat. In the on activation field you put RadioAlpha=true for the alpha trigger you do the same with the other triggers. Then you put players = group this in the units initline that needs to acces the radio. Copy the code into a .sqs file and start it up at the start of your mission. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#selection RadioAlpha=false RadioBravo=false RadioCharlie=false RadioDelta=false RadioEcho=false RadioFoxtrot=false RadioGolf=false RadioHotel=false RadioIndia=false RadioJuliet=false 1 setradiomsg "blabla1" 2 setradiomsg "blabla2" 3 setradiomsg "blabla3" 4 setradiomsg "blabla4" 5 setradiomsg "blabla5" 6 setradiomsg "blabla6" 7 setradiomsg "blabla7" 8 setradiomsg "blabla8" 9 setradiomsg "blabla9" 10 setradiomsg "blabla10" ?(player != leader players): 1 setRadioMSG "NULL" ?(player != leader players): 2 setRadioMSG "NULL" ?(player != leader players): 3 setRadioMSG "NULL" ?(player != leader players): 4 setRadioMSG "NULL" ?(player != leader players): 5 setRadioMSG "NULL" ?(player != leader players): 6 setRadioMSG "NULL" ?(player != leader players): 7 setRadioMSG "NULL" ?(player != leader players): 8 setRadioMSG "NULL" ?(player != leader players): 9 setRadioMSG "NULL" ?(player != leader players): 10 setRadioMSG "NULL" ~0.1 @ RadioAlpha or RadioBravo or RadioCharlie or RadioDelta or RadioEcho or RadioFoxtrot or RadioGolf or RadioHotel or RadioIndia or RadioJuliet ? RadioAlpha : RadioAlpha=false; goto "menu" ? RadioBravo : RadioBravo=false; >>>CODEHERE<<< ? RadioCharlie : RadioCharlie=false; >>>CODEHERE<<< ? RadioDelta : RadioDelta=false; >>>CODEHERE<<< ? RadioEcho : RadioEcho=false; >>>CODEHERE<<< ? RadioFoxtrot : RadioFoxtrot=false; >>>CODEHERE<<< ? RadioGolf : RadioGolf=false; >>>CODEHERE<<< ? RadioHotel : RadioHotel=false; >>>CODEHERE<<< ? RadioIndia : RadioIndia=false; >>>CODEHERE<<< ? RadioJuliet : RadioJuliet=false; >>>CODEHERE<<< #menu RadioAlpha=false RadioBravo=false RadioCharlie=false RadioDelta=false RadioEcho=false RadioFoxtrot=false RadioGolf=false RadioHotel=false RadioIndia=false RadioJuliet=false 1 setradiomsg "blabla1" 2 setradiomsg "blabla2" 3 setradiomsg "blabla3" 4 setradiomsg "null" 5 setradiomsg "null" 6 setradiomsg "null" 7 setradiomsg "null" 8 setradiomsg "null" 9 setradiomsg "null" 10 setradiomsg "<-Back" ?(player != leader players): 1 setRadioMSG "NULL" ?(player != leader players): 2 setRadioMSG "NULL" ?(player != leader players): 3 setRadioMSG "NULL" ?(player != leader players): 4 setRadioMSG "NULL" ?(player != leader players): 5 setRadioMSG "NULL" ?(player != leader players): 6 setRadioMSG "NULL" ?(player != leader players): 7 setRadioMSG "NULL" ?(player != leader players): 8 setRadioMSG "NULL" ?(player != leader players): 9 setRadioMSG "NULL" ?(player != leader players): 10 setRadioMSG "NULL" ~0.1 @ RadioAlpha or RadioBravo or RadioCharlie or RadioJuliet ? RadioAlpha : RadioAlpha=false; >>>CODEHERE<<< ? RadioBravo : RadioBravo=false; >>>CODEHERE<<< ? RadioCharlie : RadioCharlie=false; >>>CODEHERE<<< ? RadioJuliet : RadioJuliet=false; goto "selection" If you got questions just ask them, Ill see if I can help you with them. Share this post Link to post Share on other sites
Op4 BuhBye 0 Posted May 24, 2007 I used the addaction and removeaction and it works fine locally for each player. Share this post Link to post Share on other sites
Big Dawg KS 6 Posted May 24, 2007 Who and which player will the game take the position from?? The player that the script is local to, unless it's the server. You're right, ?(local player) will always be true because player only refers to the player to whom that script is local (so it's kind of redundant). Every piece of code that is executed in the game must be local to either one client (a player connected to the server) or the server (basically whose computer is executing it), so if it's a client then 'player' always refers to that client. The same code can be repeated for all clients + the server (ex: if executed from a trigger, waypoint, or init field), but each time it is still local to only one of them. the unknown, you really need to pick up SQF and try the switch-statement, it will save you a lot of repetition. Share this post Link to post Share on other sites
the unknown 0 Posted May 25, 2007 Quote[/b] ]the unknown, you really need to pick up SQF and try the switch-statement, it will save you a lot of repetition. Well I had this laying around and I couldnt be bothered to change it. And I am willing to learn the sqf stuff but the problem is I dont have mission idea's to use them with. Share this post Link to post Share on other sites