Disabling abilities?

So, in the code of the character, (please mind any bugs and stuff like that, this is very much WIP) I have a mana bar and spells; I am trying to make it so that when the mana bar runs out, the spells cannot be used, I’m also trying to find a way to make it so that two spells cannot be used at the same time. Sorry if the code is super messy, I’m just working with what works for me ^^`

to cast Arc: hold SPACE + Z
(fireballs is a WIP, but if you want to do stuff with that then go ahead), hold SPACE + X

Use a filter and a switch, if the bar is at 0 or less, close the switch

3 Likes

Excuse me if this is a dumb question, but where would I connect them in this case, since, technically, there is no one block that controls the cast… especially since I found out that without the code bundle, the cast can still be done somehow and I don’t know where to find the problem… ._.

1 Like

maybe the cast is in a different block?

I think you would have to do something with logic, i dont know much logic, that would make it so that if SPACE and X are pressed, then id turns off a switch that allows SPACE and Z to do anything. Does this make sense at all? or did i just type vomit

1 Like