how do i enable a button, when pressed, stop the actions of another button?
basically when my character moves i can attack at the same time which... makes things look abit silly. how can i implement a button that causes me to stop entirely and when the animation is finished the button is unlocked/enabled again so i can walk?
Create a variable "canwalk" ; 0 = the player can walk and 1 = the player cannot walk.
Then try this:
If [your walk button] is pressed
and if variable canwalk = 0
----> then the character walks.
If [your attack button] is pressed
---> the character attacks
plays animation "attack"
put the variable canwalk to 1
When the animation 'attack" is finished, put the variable canwalk to 0.
Develop games in your browser. Powerful, performant & highly capable.
Worked like a Charm, Thanks!