Issue with an event returning to its starting position...

Ok here is what I want to happen:

-Enter a room to find a skeleton walking around (randomly).

-Kill the skeleton.

-Skeleton turns into a small pile of bones on the floor, forever.

Now, I can get most of this done, however when you leave the room and come back, the pile of bones moves back to the original starting place of the event.

This is probably another easy fix that I am overlooking, but I have tried the various control variables and such and I just can't seem to get the right combination of event stuff to make it work.

Screens of my event pages:

Spoiler
STnKPSb.png
Spoiler
KkTyUyZ.png
Spoiler
keTkRl2.png
Thanks in advance for your help!

-Doc

  *patiently waits for Shaz or Andar to comment xD*
Store the X/Y coordinates in variables of the pile of bones when it first appears.

When the player enters the map with the pile of bones, have a parallel event or auto-start event running that moves the skeleton sprite to the location stored in the X/Y variables, then use a switch to turn itself off (and back on again when the player leaves the map, so it will repeat every time the player re-enters the same map).
-Skeleton turns into a small pile of bones on the floor, forever.

What you did makes sense, so I don't know why the skeleton is back alive whenever you re-enter the map.

I used a lot of such event and never have a problem with it before

Did you reset the event somewhere (turn the self switch A and B back off)?
What you did makes sense, so I don't know why the skeleton is back alive whenever you re-enter the map.

I used a lot of such event and never have a problem with it before

Did you reset the event somewhere (turn the self switch A and B back off)?
He is not back alive... he is back as a pile of bones, but at the original location where the event started and not where the pile of bones fell after being killed...

I want the pile of bones to remain in the spot where the skeleton was killed.

I feel like there should be a way to get the map coordinates and then recall it everytime you enter that map, but I can not figure it out for the life of me (day 3 of trying to figure it out >.<)

Edit - Milennin, I am trying to figure out how to do that. It makes sense in my head but I can't figure out how to make it happen in the event.
Do you always kill him in the same spot? If so then you can turn on a switch when you kill him, and the pile of bones event only appears when that switch is on. Set the pile of bones though as a new event, which only appears when the switch is on (use a global switch, not a self switch for that).

If you do not kill him in the same spot, you'll either need two variables to store the location of the skeleton, or a script that keeps events in the same position they were in when you left the map. I think Shaz has one for that?
Do you always kill him in the same spot? If so then you can turn on a switch when you kill him, and the pile of bones event only appears when that switch is on.

If you do not kill him in the same spot, you'll either need two variables to store the location of the skeleton, or a script that keeps events in the same position they were in when you left the map. I think Shaz has one for that?
It is not always the same spot. And I have been trying to get control variables and control switches to work. Like, I understand the concept of what needs to happen, but I do not know how to implement it and have been doing a lot of trial and error trying to figure it out. Furthermore I am not too savvy when it comes to scripts so I am not very comfortable with manipulating or implementing them yet. In time I will get better.

I'll just keep browsing through material on this stuff until I find what I need... Maybe I glossed over it already and didn't notice hahaha >.<
You can store event's X and Y coordinate by creating a command in the event page itself:

Control Variables -> Game Data -> (click on the ...) -> Character (select "this event") -> set it to X (for variable that store X coordinate)

Control Variables -> Game Data -> (click on the ...) -> Character (select "this event") -> set it to Y (for variable that store Y coordinate)

Edit:

Just in case you are interested. Shaz himself has something for such occasion

http://forums.rpgmakerweb.com/index.php?/topic/1853-remember-event-position
You either need a parallel process for correcting event positions on a map if they change from their editor positions (maps are read-only, and that includes coordinates), or a script like Shaz' "Remember Event Position".

In the case of a parallel process make sure it's erased (NOT switched off) after all positions have been corrected.
You can store event's X and Y coordinate by creating a command in the event page itself:

Control Variables -> Game Data -> (click on the ...) -> Character (select "this event") -> set it to X (for variable that store X coordinate)

Control Variables -> Game Data -> (click on the ...) -> Character (select "this event") -> set it to Y (for variable that store Y coordinate)

Edit:

Just in case you are interested. Shaz himself has something for such occasion

http://forums.rpgmakerweb.com/index.php?/topic/1853-remember-event-position
Yeah I am trying that and I must be missing something because I feel like it should work, but it still isn't working. I am having a look at that link now.

You either need a parallel process for correcting event positions on a map if they change from their editor positions (maps are read-only, and that includes coordinates), or a script like Shaz' "Remember Event Position".

In the case of a parallel process make sure it's erased (NOT switched off) after all positions have been corrected.
I have tried this too, but again I think I am doing something wrong because it just isn't working. I am reading the Shaz script.

Thanks guys, I really appreciate the help here.
One second thought, you can set the the page 3 of your event to parallel processing and use the command

Set Event Location -> Designation with variables

This did not occur to me immediately when I saw Andar's response lol
One second thought, you can set the the page 3 of your event to parallel processing and use the command

Set Event Location -> Designation with variables

This did not occur to me immediately when I saw Andar's response lol
OMG I finally figured out the order. I put the control variables of setting the X and Y coordinates on the second event page, and then call the location as mentioned here and in Andars response on the third page and BAM! the skeleton remains where he/she was killed!

Edit - Event page 1 remains as above, but 2 and 3 now look as follows:

Spoiler
fVaBjjK.png
Spoiler
sa09lHU.png
Only thing I am worried about is that page 2 and 3 of the event are both parallel processes, and if that will cause lag in the long run. I can't erase them because then the skeleton disappears entirely, which is not what I want. Thoughts on this?
2-3 parallel events wouldn't affect your performance. 10-20 will.
2-3 parallel events wouldn't affect your performance. 10-20 will.
Like 10 to 20 on one map yeah?
Yeah
2-3 parallel events wouldn't affect your performance. 10-20 will.
That depends how the parallels are written - one badly written parallel process will lag any map, while a hundred intelligent parallel processes will remain undetectable - one reason why I said to erase event the parallel process after the position has been corrected.

However, that will only work if you use a different event to correct the position, not the way you did it in the screenshots above.
That depends how the parallels are written - one badly written parallel process will lag any map, while a hundred intelligent parallel processes will remain undetectable - one reason why I said to erase event the parallel process after the position has been corrected.

However, that will only work if you use a different event to correct the position, not the way you did it in the screenshots above.
Yeah unless I can figure out another way to make it work, then I can't erase the event because it erases the pile of bones.

If a script is required to do it another way, then I will need a step by step on how to do it as I am not very good with scripts yet, and will most likely make many mistakes >.<
That depends how the parallels are written - one badly written parallel process will lag any map, while a hundred intelligent parallel processes will remain undetectable - one reason why I said to erase event the parallel process after the position has been corrected.

However, that will only work if you use a different event to correct the position, not the way you did it in the screenshots above.
Yeah, personally I would turn on a switch (in the player transfer event to let player enter the map) to activate the parallel event to set the location of the bones, then turn the switch off. 
Yeah, personally I would turn on a switch (in the player transfer event to let player enter the map) to activate the parallel event to set the location of the bones, then turn the switch off. 
Hmmm I like the way that sounds. I'm gonna try and get that to work later after dinner. If you feel like giving me a hand and showing me how before I trial and error it myself, that would be cool. But you don't have to ;P
Sure..

I hope the pictures load this time:

1_zpsvvtzxjkz.jpg
You don't need a switch if you erase event - simply remove the condition so that the parallel process will always be started when entering the map, and instead of control switch to switch it of, you'll use erase event to (temporarily) erase it from the map.

Edit: Just thought of this.. if you do the transfer event like I did above, you might see the bone jumping from the original position to the new position.

You can arrange it this way and use the wait command for better result

Control Switches ..... = ONWait: 60 frame(s)Transfer Player ....
Won't work, because the maps do not exist unless the player is on them. The event (no matter when switched) will only start after the transfer.

That's why it needs to be a parallel (those are executed before the autoruns), and if that is still too slow due to too many parallels, use fadeout before and fadein after the transfer

Original thread: https://forums.rpgmakerweb.com/threads/issue-with-an-event-returning-to-its-starting-position.46007/