RPG Maker Forums

I want to make a condition that's quick, something like

maps = [1, 2, 4, 7, 9, 10, 15, 16, 17];$game_variables[1] == $game_variables[1].any? {|i| maps.include?(i)}$game_variables[1] being the current map id, to condition if the current map is any of those numbers is the array.

But I'm not really good with inject methods/arrays.

My immediate use would be to have it so that if you're in a forest-based map id, there's a chance that at a passing hour, you'll generate Leaf Essence, and if you're in an earthy map, there's a chance that at a passing hour you'll generate Earth Essence, etc, and instead of going "if map is this or if map is this or if map is this or if map is that... etc" I can just condition an array that I can easily add to if need be.

It doesn't need to be a conditional script branch. It can just be a script call. Doesn't matter.

Might I ask for assistance?

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,547
Members
137,835
Latest member
yetisteven
Top