Moving object keeps returning to its original spot, Help...

Hi,

So currently I'm having problem with using Set Move Route command.

You see, at the moment I'm trying to create an event where few objects were meant to teleport to a different tile when the Player steps on a button.

I'm using the current script attached, everything works fine at first, but whenever the Player leaves and returns to the same map, the object returned to its original spot instead of staying on the new tile.

So what am I supposed to do to fix it? OTL;

Screenshot rpg.png
Hi there,

Where is the player being teleported? Is it the same map or a different one? If it is a  different map, then this is normal. Every time you enter a map it resets the events. A way around this is to make your event a common event that holds the position data of the moving tiles via variables. There are other ways of doing this for sure, but that is how I have achieved a similar effect.

If you need help setting up the common event, then just reply and I'll help as I can. I'm not a coder though, so I'm more then sure there's an easier way to script it, I just can't help with that.

Hope it helps,

Sindaine
You can control a switch for every event.

If the player will manage to put the event into the right spot, a switch can turn ON.

Not a self switch. A SWITCH.

Name that switch so it can make sense.

Let's say the first switch you use is named ItemPlaced1. Ok?

So when the item will be in position, ItemPlaced1 turns ON by the move route command.

After that you add one more command.

Erase event 

Alternative:

You can set position instead of move route command of course as you do.

Set the event Through to ON (it is on the bottom left of the eventing screen).

Skip if cant move, wait to complete will be the move route command settings.

Go the landing point of the event.

Create an event on there, a blank one, set to below character.

Create a new event page.

Condition will be  Variable ItemPlaced1 is ON

Put the graphic of the event that moved.

Save.

Run it.

Change map.

Come back.

The event runs, changing place.

It gets erased the same time a new event with same graphic takes its place.

The new event is fixed there.

There you go.

Temporary link to a project demo to show you how:

https://www.dropbox.com/s/c6weux5cl8jx8z5/Project5.zip?dl=0

@Sindaine this might have nothing to do with common events.  🙂  

This "Next day" naming, looks to me like a fixed change.

And why doing such a complex thing, when there is a more lightweight and less complex way to do things.  :|  

A common event is there all the time. That's why it is called common.

It helps complex tasks and mostly Evented systems.  🙂

Doing such a thing for let's say five movable events on a map is... not very recommended, at least by me.

It can be done in a m ore simple way.

Check the demo I provided.  ☺️

Cheers.

Edit:

"script attached"  This is not a script. It is an event.

Also, you might need @Sindaine's idea IF you have to move events AGAIN by coming back.

But if it is an one time movement and then events fixed there, do as I say.
There is a remember event positions script.
You can control a switch for every event.

If the player will manage to put the event into the right spot, a switch can turn ON.

Not a self switch. A SWITCH.

Name that switch so it can make sense.

Let's say the first switch you use is named ItemPlaced1. Ok?

So when the item will be in position, ItemPlaced1 turns ON by the move route command.

After that you add one more command.

Erase event 

Alternative:

You can set position instead of move route command of course as you do.

Set the event Through to ON (it is on the bottom left of the eventing screen).

Skip if cant move, wait to complete will be the move route command settings.

Go the landing point of the event.

Create an event on there, a blank one, set to below character.

Create a new event page.

Condition will be  Variable ItemPlaced1 is ON

Put the graphic of the event that moved.

Save.

Run it.

Change map.

Come back.

The event runs, changing place.

It gets erased the same time a new event with same graphic takes its place.

The new event is fixed there.

There you go.

Temporary link to a project demo to show you how:

https://www.dropbox.com/s/c6weux5cl8jx8z5/Project5.zip?dl=0

@Sindaine this might have nothing to do with common events.  🙂  

This "Next day" naming, looks to me like a fixed change.

And why doing such a complex thing, when there is a more lightweight and less complex way to do things.  :|  

A common event is there all the time. That's why it is called common.

It helps complex tasks and mostly Evented systems.  🙂

Doing such a thing for let's say five movable events on a map is... not very recommended, at least by me.

It can be done in a m ore simple way.

Check the demo I provided.  ☺️

Cheers.

Edit:

"script attached"  This is not a script. It is an event.

Also, you might need @Sindaine's idea IF you have to move events AGAIN by coming back.

But if it is an one time movement and then events fixed there, do as I say.
Thanks, for the example Dreadshadow.

But unfortunately even when I tried to copy your event the object does the same thing. D: I just don't know anymore what's wrong with mine.

Here is my current screenies:

[IMG]http://i430.photobucket.com/albums/qq23/Hyrika/Rpgmaker1_zps8ry3t6e7.png[/IMG]

[IMG]http://i430.photobucket.com/albums/qq23/Hyrika/Rpgmaker2_zpsaaod8tkl.png[/IMG]

[IMG]http://i430.photobucket.com/albums/qq23/Hyrika/Rpgmaker3_zpslzstacjn.png[/IMG]
You move event with ID = 20, using the event with ID = 26 (see on to p of the window) .

The Event with ID = 20 must have the second page with the switch condition.

Not  the Event 26 that controls the movement.

You made the second page on event 26 though...

Edit:

And you should erase Event 20. Not 26.

Fix it, and maybe press the spoiler show button on my signature, get the Events game and play it.

It will show you how to do a LOT of stuff. 😉

Gotta go.

Worst case scenario:

If you can't fix it, send me your project zipped using dropbox using PM (Private message)  here on the forum.

Share the link in the PM so I can get it and build it for you. (with comments so you can learn from it)

Just tell me where I must work (map)

I can't suggest anything more here.
Or.


Use this script.

Original thread: https://forums.rpgmakerweb.com/threads/moving-object-keeps-returning-to-its-original-spot-help.37089/