Transfer Player to random location within a set of designations

Hey all - I couldn't find anything like this in the RMMV Script Calls or within the existing MV Plugins. Below is my Plugin request - please let me know if you need any more info, thanks!

###

Goal

To transfer the player randomly between a set of designations.

Use Cases

We want to create an Event that will transfer the player to a curated set of locations. For example: 

Basic case:

  • Player steps on Event A on Map001
  • Event A will transfer player to either (selected randomly):LocationA on Map001
  • LocationB on Map001
  • LocationC on Map001
Expanded case:

  • Player steps on Event A on Map001
  • Event A triggers and transfers player to LocationA
  • While exploring LocationA, player triggers Event B, which transfers them either (selected randomly):LocationA
  • LocationB
  • LocationC
[*]Player is transferred to any of the above locations.
Feature Requests

Not sure what the limitations will be in regards to how many locations can be set within the plugin, but we would need to nest at least three locations within one Transfer Player Event, with a potential maximum of 100 locations. 

Examples

Think level generation on The Binding of Isaac. Ideally, this will be used with a Variable switch, so when the player triggers Event A so many times, they will transfer to a location outside of this loop. 

###

Truly appreciate the help here. Let me know if there is more info I can provide. 
Why can't this be done with events?
you can do this via getting the list of maps and then based on that get the specific map and then based on that give qordinates and then send the player there 😀
you can do this via getting the list of maps and then based on that get the specific map and then based on that give qordinates and then send the player there 😀
I don't follow quite follow. 

If I get a list of maps, then call another specific map, then give coordinates, I still am programming/choosing the coordinates to send the player. I don't want to choose what Location to send the player - I want the location to be randomly selected from a pool of locations. 
I understood that all your destinations were on the same map?


Just create a common event that sets a variable to a random number between 1 and however many locations you have.


Then use conditional branches to check the variable and teleport the player to that location.


On each of your events, do a Call Common Event command to call that common event.


The only difficulty is where you want to do something different after teleporting to one location x number of times. In that case, you could use a variable for each location, increment it just prior to the associated transfer command, and then do a check to see if it's hit the magic number - if not, teleport, if it has, do whatever the other thing was that you wanted.
Awesome, thanks!
If you're happy with that solution, I'll go ahead and move this over to MV Support as you won't be needing a plugin.
Please do, thanks. 

Original thread: https://forums.rpgmakerweb.com/threads/transfer-player-to-random-location-within-a-set-of-designations.50646/