I didn't really know what to put on the title, but i keep running into certain walls with the code that sometimes i find a work around and other times i don't and don't get the exact result I'm looking for.
For example, when holding down mouse button and weapon equals 4, reduce platform max speed to 25, when mouse is released set max speed to 50.
"this works as intended, great"
When colliding by enemy hit box set max speed to 25, wait .5 seconds and then set max speed to 50.
"this works as intended, and so does the last line of code."
When overlapping the Slime terrain, set speed to 25... this is where suddenly i hit a block. because there is no single instance of, no longer colliding or overlapping. So, if I say when not overlapping "slime terrain" set speed to 50, all of the other codes no longer work. and i understand why. all of my work arounds i can think of have more or either result in the slime terrain slowing me and everything else not working. or my slime terrain slowing is just choppy because I have it slowing and setting back to normal every .5 seconds while overlapping. i've tried using 2 or 3 different variables that do checks, but the code boils down to the same thing but instead of using objects, I'm using variables. so that doesn't work.
this is something I constantly run into, with other effects as well. I believe that it's maybe a fundamentally misunderstanding or lack of an ability to properly articulate my intent in a logic-based form.
but could someone explain to me how I can create in this case, multiple ways to make a slowing effect, that all works together. or at least how I would simply create a blanket effect that checks has multiple things for it to be true, but only needs one of them to be.
i would think an or statement would be useful, but in this example, the holding down the mouse button while weapon is 4, doesn't play nice with all of that as all of those things have to be true for that, but using a or statement with that separates them. So, is there a way to have an "or" statement but also include "ands" with in it?