Here is the idea:
When the game starts, it randomly places 3 animals (chosen at random) on the screen at random locations. The locations are chosen so that none of them can bump into the other.
As the intro plays the animals are walking around the pen.
I would like to get the location of the animals before the player is transfered from the intro map to the game map.
You can get what the effect will be. The lower area changes, but the pen and animals don't.
Is this possible?
VX Ace Save Event Location between maps
● ARCHIVED · READ-ONLY
-
-
You can always take a xposition and y postiin and use move events that target them to place them at the right place I suppose.
But you can also use a plugin to actually spawn events, being set to a dummy map.
I think Shaz made it. -
What are you doing with the positions after you obtain them? I don't understand what your "You can get what the effect will be. The lower area changes, but the pen and animals don't" means. How are you achieving that?
I don't think either my event clone or save event position scripts will help here, and I kind of think you are going to another map and want to place events on that map based on where they are on the current one. If that's the case, I'd just use two variables for the X and Y positions of each animal (6 variables in total), and before you transfer from the map, set the variables (using Control Variables > Game Data > Character [Event #]'s Map X/Y), and as soon as you transfer to the new map, use Set Event Location for each event, getting the X and Y locations from the variables. -
Lets see if this helps:
Spoiler
Here are the animals positions before the player transfers from the starting map to the game map. When the player transfers I would like the animals in those same positions.
Right now when the player transfers off the starting map, the animals are placed where the events are and I would like to save the animals current positions and then place them exactly where they were before the player changed map. -
You must save the event locations' x and y coordinates when exiting the map in specifically asigned variables.
Change the variables and events as required:
Code:$game_variables[11]=$game_map.events[1].x $game_variables[12]=$game_map.events[1].y $game_variables[21]=$game_map.events[2].x $game_variables[22]=$game_map.events[2].y $game_variables[31]=$game_map.events[3].x $game_variables[32]=$game_map.events[3].y
Remember to put this code into your event that takes you off the map BEFORE the teleport.
You can then set the teleport to this map:
-fade out
-teleport to map with animals, no fading
-run3 Set Event Location calls, each for one of the animals, coordinates are "Designation with variables" and plug the correct variables in
-fade in
Then it should work the way you intend. -
If the animals are also moving randomly, they could be facing a different direction, so you might also need to save the event's direction and restore that on the new map too.