One way of doing it without really digging into your system:
CurrentCBut;
if (global.CBut != global.VBut)
{
if global.CBut = 1
{
BOOMERANG()
CurrentCBut = 1;
}
///////////ARROWS///////
if global.CBut = 2
{
ARROWS()
CurrentCBut = 2;
}
//////////////////////BOMBS///
if global.CBut = 3
{
BOMBS()
CurrentCBut = 3;
}
}
else if (global.CBut == global. VBut)
{
global.VBut = CurrentCBut;
}
What happens is this: Your C Button is at 3 but you V Button is at 6. You move your menu cursor to set C to 6 but you already have V set to 6. V will then take your old CurrentCBut value of 3 and C will take the value of 6. Thus, the numbers swap.
The thing is that you need to put checks and sets (setting and checking the globals) into separate code from the C press code. You should try having code in your say your HUD or Inventory handling object. Moving your cursor sets a cursorTemp variable to each number. Then, when you press C or V, it does the check WHILE still in the menu to make sure they don't equal each other. If they don't match, then it set's your C Button to an equipped weapon for C. Same for V.
I am trying to explain clearly as possible but it's hard without seeing how you handle your inventory and hud and such. With my Zelda games, I try to be as easy to follow as possible. Instead of hardcoded numbers such as what you are doing, I use a string something like this:
C Press Event while NOT in the inventory
switch (global.CItemEquipped)
{
case "arrows":
{
if (global.arrows > 0)
{
shoot_an_arrow_code or script here
}
else
{
play_error/empty_sound_effect
}
break;
}
case "boomerang":
{
boomerang_code_here or script
break;
}
}
So on and so forth. This way, I can program how an item works in a script. When it is ready to test, I add a case for that item in the switch event. It could be personal preference but I believe you should be using a SWITCH instead of 20 IF checks. It is much cleaner code and is less code(which is better for Game Maker).
Anyway, just trying to give you some insight. Like I said, I could do better if I saw exactly how your item system worked.