[Answered] Place Event on Character's Place of Death

[Objective] When the player dies on the map (e.g., dungeon puzzle), an animated scene of the character's death happens before the character respawns to retry the level.

[Problem] While I am able to animate the character's death by having an event and turning stepping animation and direction fix ON for the attached image, I am unable to move this animated death event over the player's current location.

The logic is as follows: Player dies, turn transparent ON for player, move animated death event over player's current location, once animated death event completes, erase the event (or turn event "off"?), then transfer player to some location while turning transparent OFF for player for visibility.

Again, the difficulty would be moving the event over to the character's place of death.

I have seen a thread here that shares using the script call below would achieve this result:
$game_map.events[EVENTID].moveto($game_player.x,$game_player.y)

However, I think the above script is in Ruby as opposed to javascript?

Any help would be greatly appreciated. Thanks!
I think the script call for RMMV would be like this:
JavaScript:
$gameMap.event(id).locate($gamePlayer.x, $gamePlayer.y);
Or, with event commands:

◆Control Variables:#0001 DeathX = Map X of Player ◆Control Variables:#0002 DeathY = Map Y of Player ◆Set Event Location:EV005, ({DeathX},{DeathY})
Thanks! This helped a lot. I got everything in working order now!
Great, happy RPG Making!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/answered-place-event-on-characters-place-of-death.147002/