Good morning,
I feel like an absolute dummy right now, but I cannot find the solution anywhere for the life of me, and it's probably something very simple that I'm overlooking, but I'm well and truly at a loss right now.
As the title infers, I'm trying to check a Variable for multiple values using a Script. I've tried using || but it doesn't seem to work.
My current (not working) code:
I've tried using
How can I make this work?
---
Context:
The Variable (9) stores the current Map ID. In every map I have a Parallel event that triggers a Common Event before Erasing itself. The Common Event is needed to check the Variable (9) and set the BGM for that specific Map ID (or keeps it the same if applicable, and since maps 3, 4, 5 and 7 are the same 'area', the BGM remains the same, but maps 1, 2 and 6 are different - hence the need to check the Variable).
I hope that makes sense!
I feel like an absolute dummy right now, but I cannot find the solution anywhere for the life of me, and it's probably something very simple that I'm overlooking, but I'm well and truly at a loss right now.
As the title infers, I'm trying to check a Variable for multiple values using a Script. I've tried using || but it doesn't seem to work.
My current (not working) code:
If: Script: $gameVariables.value(9) == 3 || 4 || 5 || 7I've tried using
$gameVariables.value(9) == [x, y, z] and $gameVariables.value(9) == [x || y || z ] in brackets too, but that doesn't work either.How can I make this work?
---
Context:
The Variable (9) stores the current Map ID. In every map I have a Parallel event that triggers a Common Event before Erasing itself. The Common Event is needed to check the Variable (9) and set the BGM for that specific Map ID (or keeps it the same if applicable, and since maps 3, 4, 5 and 7 are the same 'area', the BGM remains the same, but maps 1, 2 and 6 are different - hence the need to check the Variable).
I hope that makes sense!