So Im trying to set a "random" events on my field map, were when the player walks out of town a variable is set to a random number and when they step onto the field different locations appear depending on the number that is chosen. So if the variable becomes a 5 a tent appears in the lower left, if its a 9 a cave entrance appears on the mountains..etc.etc.
Well my problem comes with the pre-selected conditions for events, it only appears if the number is equal to or above. I just want equal to, so if I get the number 3, only events corresponding to that variable number appears, not everything above it as well. I tried conditional branches and those work, but they dont hide the graphics. I want the number 3 tent to only appear when the random variable is 3.
Can anybody help me with this?
Event conditions variable being a equal to
● ARCHIVED · READ-ONLY
-
-
you can not change the conditions from the editor, it will always be "or above".
However, you can make a workaround using page priority...
Make a single event, with one page for each number and have the condition ask for the same number as the page - that means on page 1, the variable will be tested for "1 or above", on page 2 it will be tested for "2 or above", on page 3 "3 or above" and so on. With such a structure, the page priority will take care of the higher results and prevent the lower pages from activating when the number is higher.
(theoretically you can skip numbers, but in all cased the conditions have to be sorted to test for higher numbers in higher pages. Having each page test only for its own number makes it better readable for humans, but is not strictly neccessary)
And then you use each of those pages to move and switch events to create the map you want to appear there - you might want to search for Tsukihime's "Tile swap" script as that might help with rearranging the map -
Thanks Andar, thats seems to work. As long as I have at least 3 pages per event I can hide the graphics, this helps a lot.
-
This wasn't exactly what I meant.
As you said, depending on complexity of your map it can work if you make additional empty pages for your events, but in other cases it would be much better to use a controlling event like I described to rearrange the map.
You'll need a few more switches or an "off-map" part of the map where you can store unused events without them becoming visible to the player, and then in the controlling event you place commands like "switch Tent ON", "switch Dungeon entrance OFF", "set event location enemy 2 to x,y" and so on.
Sometimes the multiple page per event approach is better (especially if the map is basically static with few changes), sometimes it's better (especially for later bughunting) to have everything set and controlled by a single event.