Thank you all in advance 🙂
How do I code it to where player and event_Emily both move to mapX 0 and mapY 0?
RPG Maker MV Supportuse one set move route set to the player and one set move route set to the event, giving them the route to whereever you want.
Just make sure that the event gets through activated before moving on the player position in the end.
If that is not enough to help you, you need to tell us where the problem is because moving player or event to a position is extremely basic and should always work - you just need to provide the correct move commands based on your map.
Just make sure that the event gets through activated before moving on the player position in the end.
If that is not enough to help you, you need to tell us where the problem is because moving player or event to a position is extremely basic and should always work - you just need to provide the correct move commands based on your map.
Here's a handy function for that situation, it's getEventsByName, like html getElementsByClassName...
Your event_Emily can be done like...
PHP:
var RPGMakerMV = RPGMakerMV || {};
RPGMakerMV.getEventsByName = function(name){
var events = [];
for(var i = 0; i < $dataMap.events.length; i++){
if($dataMap.events[i] === null) continue;
if($dataMap.events[i].name !== undefined && $dataMap.events[i].name === name)
events.push($gameMap._events[$dataMap.events[i].id]);
}
return events;
}
Your event_Emily can be done like...
PHP:
var emily = RPGMakerMV.getEventsByName("Emily")[0];
emily._x = 0;
emily._y = 0;
Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-code-it-to-where-player-and-event_emily-both-move-to-mapx-0-and-mapy-0.76548/