Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: SlimeyOoze on February 23, 2022, 09:55:01 AM
-
Hello,
I'm trying to get 1 Switch Event check against 2 possible answers but can't see how?
In an if statement I would do
if(mySwitch == "unassigned" || mySwitch == "Left"
{
...Then do this
}
I guess I'm asking how I would go about placing an "OR" in Play Maker? either via a Switch or If Statement.
Currently I have a Switch event checking against UP, DOWN, LEFT & RIGHT but at the start the string variable isn't unassigned.
Thank You.
-
Would it be "String Compare"?
-
Heya,
Yes String compare will be the one to use here as I can't remember if there is a switch action for strings. You'll need the first string compare to check against the value Unassigned with a match flowing to another state. Otherwise it will go to the second compare checking against Left and having it go to where you want from there.
-
Thank you Athin