Hey guys!
I was wondering if there is an easy way to set up a normal player transfer event but which would have a list of potential areas to teleport to at random. Say if you go through a magic door it could take you to 1 of 5 different maps which would be chosen entirely at random.
Any ideas?
Thanks!
I'll take a swing at this ~ the following method uses absolutely no scripting, eventing only.
For example, you have your random destinations as Map IDs 3, 4, 5, 6, 7. You then create a transfer event, and do the following:
Create some variables. If the entry points on the new maps will be in the exact same spot (will minimize your work), you only would need 3:
Variable 0001: Random Destination
Variable 0002: X Map
Variable 0003: Y Map
Then, in the Contents of the Event, have these lines:
@>Control Variables: [0001: Random Destinaion] = Random No. (3...7)
@>Control Variables: [0002: X Map] = 10 {this is actually your x coordinate where you'll appear, so you'll have a different #}
@>Control Variables: [0003: Y Map] = 12 {same as above, just this is your y coordinate}
@>Transfer Player: Variable [0001][0002][0003], Left {or whichever direction}
It's very basic, but it should give you a base to work from.
I'd also add that for this to work best you need to add in the condition for if the wrong map is chosen. So:
Let's say you have map 1 through 5 are dungeon maps, but map 3 is a boss dungeon so you don't want it to load.
This solves the problem of [A] having maps in the wrong order and making sure that the player actually transfers to a new map.
Label: Start # You need this so that the event can re-roll the random number.Control Variables [0001: Random Destination] = Random No (1...5)Conditional Branch: Variable [0001: Random Destination] == 3Jump to Label: Start # If you don't do this the player won't move to a new map. The random number needs to be re-rolledExit Event ProcessingBranch EndYou then create one of these for each of the maps you don't want to load.
@ think: If he uses Shaz' method he doesn't have to worry about the wrong map being chosen -
he won't list a 'wrong' map as one of the five (or ten or three) choices.