Hello everyone! I'm not sure how to do this, but I want to transfer the player to a map, but I want it to be random. For example, you teleport to a subway, but there are chances of teleporting to a building or some other place. Hope I explained it right, sorry. ^^'
Random transfer player locations?
RPG Maker VXAce SupportSet a variable to a random number between 1 and the number of locations you want to use.
Do a series of conditional branches like this:
If variable == 1 teleport to location 1else if variable == 2 teleport to location 2 else if variable == 3 teleport to location 3 end endendfor however many locations you want.If you can teleport to this map from multiple maps and you all want them to do the same processing, put all of the above into a common event, and on each transfer event, call the common event.
Do a series of conditional branches like this:
If variable == 1 teleport to location 1else if variable == 2 teleport to location 2 else if variable == 3 teleport to location 3 end endendfor however many locations you want.If you can teleport to this map from multiple maps and you all want them to do the same processing, put all of the above into a common event, and on each transfer event, call the common event.
You can do like set a variable to a random number then use conditional branches checking the vairables' value and do the teleport
I recommend going to this thread here which has a lot more discussion on the subject of random maps
Or you can easily do that with Transfer Player. Just randomize the variables beforehand.
The downside of this method though is that it overlooks positions that aren't passable.
The downside of this method though is that it overlooks positions that aren't passable.
thinkpadius, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.
I'm sure if the OP still needed help, they would have come back within the last 4 months and asked for it 😉
Closing.
I'm sure if the OP still needed help, they would have come back within the last 4 months and asked for it 😉
Closing.
Original thread: https://forums.rpgmakerweb.com/threads/random-transfer-player-locations.20776/