We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hey, I've been using processing for about a month now, and I'm working on making a basic maze game for fun. I've finished all the mechanism required to move the characters, prevent them from leaving the map and so on, but when I try to change the characters, it changes it once, but never back again... can any1 help? Here's the code that I'm having trouble with:
if (keyPressed) { if ((key == 'p') || (key == 'P')) { glow = fire; biden = madPepe; } }
if (keyPressed) { if ((key == 'b') || (key == 'B')) { fire = glow; madPepe = biden; } }
I know that the Biden variable has been changed to madPepe, and I can't reverse that...any way to reverse it or is that not possible? Thank you
Answers
@Ahmed -- share your complete code. Also, please edit your original post and format your code snippet: https://forum.processing.org/two/discussion/15473/readme-how-to-format-code-and-text
If you are trying to swap a value back and forth, it sounds like you need 3 variables.
If you don't, watch what happens:
also, change the title - the contents have nothing to do with image loading.