I want to make a game where you have a bunch of moves, but you can only do a move if you aren’t currently in the process of performing another one. So for example, if you are currently jumping, “canJump” has to be true, and jumping would automatically set “canRun”, “canSwim” and “canClimb” to false until the jump is complete.
I can create a jump block that automatically does “set canRun to false”, “set canSwim to false”, etc. But that’s very wordy, so I’d rather have every variable be in a list and have a script that sets every canVariable aside from jump to false, then sets them back to true at the end. How can I do this?
if you remake the set variable block as a custom block you can input text and reporters into the first slot (unlike the regular set variable block). With that you should be able to loop through a list of variable names and set them however you like.
I would put an image here showing the custom block, but unfortunately I am unable to. You can still right-click the set variables block and hit edit to see how to recreate it
If I'm understanding correctly what you want to accomplish, I don't think you need a separate variable for every kind of move. Just have a current move variable that you set to "jump" when you're jumping, etc. Set it to "none" or something when you finish a move. Then you can say