I am working on a RPG 3rd person controller that will work with the Xbox360 Controller. I want to assign the four available spells to the four face buttons of the controller.
Currently I have it so when you press the “a” button, the move assigned to button “a” will become active. However I need it to work where pressing “a” once will activate the move (until you cats it using RT) and pressing it again will turn it off.
Any thoughts? Thanks.
This should work
if(Input.GetButtonDown(“ButtonName”){
bool = !bool
}
if(“button”)
{
value = !value;
}
drop in the portion of code that makes the move active and I can plug this in with actual variables.
Thank you for the response, but I actually just solved the problem myself.
Every time I press a button I call a method and pass an int with it. Inside that method I turn all the button booleans to false, then run a switch statement using the int passed in and turn the appropriate one on.