Original Source
- Original title: Shaz's Remember Event Position Sometimes Fails
- Original author: TheKeeper
- Original date: August 24, 2019
- Source thread: https://forums.rpgmakerweb.com/threads/shazs-remember-event-position-sometimes-fails.112522/
- Source forum path: Game Development Engines > Ruby Game System (RGSS) Scripts > RGSSx Script Support
Summary
Heyla! After playing--and enjoying--a mobile farming game, I decided to try my hand at making a farming simulator with RPG Maker VX ACe, so I went to work building the engine I would make the game with. One of the things I really liked about the game I was playing was the ability to move items around and place them wherever you want. A friend who is helping me build this engine suggested that I use Moghunter's Pick Up and Throw script (https://atelierrgss.wordpress.com/rgss3-pickup-and-throw/) to move the items around. The problem...
Archived First Post
After playing--and enjoying--a mobile farming game, I decided to try my hand at making a farming simulator with RPG Maker VX ACe, so I went to work building the engine I would make the game with. One of the things I really liked about the game I was playing was the ability to move items around and place them wherever you want. A friend who is helping me build this engine suggested that I use Moghunter's Pick Up and Throw script (https://atelierrgss.wordpress.com/rgss3-pickup-and-throw/) to move the items around. The problem is that, when you leave the map, the objects reset and move back to their original positions. I thought I solved the problem by adding in Shaz's Remember Event Positions script (https://forums.rpgmakerweb.com/index.php?threads/remember-event-position.1853/) to the engine. However, I discovered that, if I spawn a lot of objects and move them around on one map, then go to another map and spawn even one object and move that around, then leave that second map and come back, the object on the second map will have reverted to its original position. I would then have to pick up the object and move it back to the desired position, and it will save the position, just fine, after that. My issue, of course, is that it forgets the item's position, in the first place.
I thought, at first, that the problem was related to how I was originally making the script call: I was doing it through the custom movements feature of each event, and it was set to repeatedly save the position of the event. Maybe having so many events all repeatedly saving their positions was overloading the system so that sometimes it forgets an item's position? So I thought, maybe if I have the player manually save the position of each object, individually, it won't do this. Unfortunately, this does not seem to be the case. I still have the problem with objects on the second map reverting to their original positions.
So, I'm out of ideas on how to fix this. I'm hoping someone, here, with much more experience with scripting and eventing would have a good idea of either how to fix this problem or find a way to work around this quirk. I've included the engine I've put together as an attachment, so you can see, for yourself, the problem I'm referring to. Hopefully, someone can figure out what I've done wrong.
Thanks in advance for all the help and suggestions,
TheKeeper
=====
EDIT 1
=====
As per Shaz's request, I've included screenshots. The screenshots show the following: the player character picking up and moving the object, the player dropping the object in a desired location, manually saving the position of the object, then, after leaving and returning to the map, finding the object returned to its original position next to the spawn crystal. This happens on both the field map and the player's house map (basically, both maps I have them on). I've also included a screenshot of how I am calling the script in the event. If more are needed, or if these weren't what you had in mind, please let me know, and I'll upload more.
I'm using the following scripts:
- Hime's Full Input Keyboard Script http://himeworks.com/2013/07/full-input-keyboard/
- Galv's Use Item On Event Script https://galvs-scripts.com/category/rmvxa-scripts/event-utility/#post-532
- game_guy's More Self Switches Script https://forum.chaos-project.com/index.php?topic=11689.0
- Enelvon's Scrolling Choices Script https://github.com/sesvxace/snippets/tree/master/scrolling-choices
- Hime's Custom Page Conditions Script http://himeworks.com/2013/03/event-page-conditions/
- Shaz's Remember Event Position Script https://forums.rpgmakerweb.com/index.php?threads/remember-event-position.1853/
- Mog's Pickup and Throw Script https://atelierrgss.wordpress.com/rgss3-pickup-and-throw/
- Eshra's Event Spawner https://rascripts.wordpress.com/2012/11/07/event-spawning/
- Galv's Event Spawn Timer https://galvs-scripts.com/category/rmvxa-scripts/event-utility/#post-686
"If they all work on one map but not on the other, then it's something going on on that second map. Do you have other scripts that could be affecting it?" -- They don't work on either map I have them on. The list of scripts I'm using is provided above.
"Do you have the save location right at the end of the move route? Is the move route actually completed before you leave the map and return?"--When I initially did it through the move route, some were at the end of the route, some weren't. I think the ones that weren't were the ones where I was also using the move route to call Galv's Event Spawn Timer Script. However, I've since changed the way that I'm calling the Remember Event Position Script script, as you can see in the screenshot I provided: I now have the player activate the event, and they are asked if they want to save that event's position.
"If you have several items on the second map and pick them up and throw them, saving their positions afterwards, do they all revert when you leave and return? Some of them? None of them?"--All of the objects that I have moved at that time will revert to their old positions. Any objects previously moved before that time will remain where I had left them.
"Are your events static (placed on the map in the editor window) or are you spawning them somehow?"--They're spawned onto the map via Eshra's Event Spawner. That script allows events to remain persistent on the map, after they are spawned.
"Are there other events on the map that get erased on/after your first visit?"--Yes. On both maps, I have events that erase themselves. They're events that turn on the day/night common event.
=====
EDIT 2
=====
I tried uploading a screenshot of the event commands, but I kept getting an error. So I'm going to try it with Gyazo. Let me know if this works: https://gyazo.com/8070a11b86a6469950aa62ed1d201d7a
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadCreator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...