Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
I have the Simple HUD inserted in the game, but i also would like to give the players the option to hide it if they don't like it (with the Tab key, for example), but i have no idea of how to do it.
return if !$Trainer # Don't draw the hud if the player wasn't defined
add
Code:
return if !$game_switches[99]
This will make it turn off when it refreshes if game switch 99 is off.
Now the next step is to add Tab into our list of Inputs, so in PokemonControls, under module Input, add
Code:
TAB =XX
XX being the next available number.
Then right below, under def self.buttontoKey(button)
you're going to add
Code:
when Input::TAB
return [0x09] # TAB
to the list of inputs. 09 is the ASCII code for horizontal tab
Now Tab can be used as an input. So lets add it to SceneMap, and make it actually do something. Make sure to put it in the loop, add
Code:
if Input.trigger?(Input::TAB)
pbSEPlay("Choose") # Delete this line to remove the SE
$game_switches[99]=!$game_switches[99]
$hud_need_refresh = true #refreshes the hud manually, so that the change takes place immediately
end