Hey There!
I'm new to RPG Maker MZ so I was hoping to get some help with a Skill I'm trying to build.
So I created a Skill called Teleport, and set it up to work like this:
When the skill is used in the menu, it will call a Common Event called Teleport, which will call a bunch of conditionals to confirm if different locations switches are active, I want the skill to allow the character to teleport itself to known locations, so if they went to the city, now that switch is active and they can teleport there, and if the go to the cave, they are now able to go to both locations, and so on.
The issue comes with the Common Event's conditionals, 2 locations and flags are manageable, as the logic goes:
If City flag = 1
If Cave flag = 1
Show Choices: City, Cave
When City -> Teleport to City
When Cave -> Teleport to Cave
End
Else
Show Choices: City
When City -> Teleport to City
End
If City Flag = 0
If Cave Flag = 1
Show Choices: Cave
When Cave -> Teleport to Cave
End
Pretty simple, but when you add another location, which I intend to do, the whole If statements get exponentially bigger and unmanageable.
Does anyone know of a way to make the If conditions more manageable? Perhaps there is a way to have the Choices shown be based off of a List that keeps track of which flags are active? Or maybe there's a whole other way of doing this.
Any help is appreciated.
Thank you very much
Cinis.
I'm new to RPG Maker MZ so I was hoping to get some help with a Skill I'm trying to build.
So I created a Skill called Teleport, and set it up to work like this:
When the skill is used in the menu, it will call a Common Event called Teleport, which will call a bunch of conditionals to confirm if different locations switches are active, I want the skill to allow the character to teleport itself to known locations, so if they went to the city, now that switch is active and they can teleport there, and if the go to the cave, they are now able to go to both locations, and so on.
The issue comes with the Common Event's conditionals, 2 locations and flags are manageable, as the logic goes:
If City flag = 1
If Cave flag = 1
Show Choices: City, Cave
When City -> Teleport to City
When Cave -> Teleport to Cave
End
Else
Show Choices: City
When City -> Teleport to City
End
If City Flag = 0
If Cave Flag = 1
Show Choices: Cave
When Cave -> Teleport to Cave
End
Pretty simple, but when you add another location, which I intend to do, the whole If statements get exponentially bigger and unmanageable.
Does anyone know of a way to make the If conditions more manageable? Perhaps there is a way to have the Choices shown be based off of a List that keeps track of which flags are active? Or maybe there's a whole other way of doing this.
Any help is appreciated.
Thank you very much
Cinis.