I need to make a cutscene where a player walks on specific tiles that have events on top of them. Is there a way to reference events in a move route so that the player will always walk over the events regardless of the arrangement? (the order remains consistent but the positions will vary). If not, how do I write a script that tells the player to go to event x and event y?
How to make player move to an event?
RPG Maker XP Supportyour description is a bit short and missing details, so I'm not sure if my answer will help.
But if there is a changing path to walk, then most likely you'll need to add a pathfinding script first - the older makers were really bad at pathfinding.
other than that, the set move route command should have a drop-down menu where to select which event (or the player) to target with the move commands, but that is more for fixed move routes and it is sometimes difficult to event variant move routes if the result is not to a fixed point.
But if there is a changing path to walk, then most likely you'll need to add a pathfinding script first - the older makers were really bad at pathfinding.
other than that, the set move route command should have a drop-down menu where to select which event (or the player) to target with the move commands, but that is more for fixed move routes and it is sometimes difficult to event variant move routes if the result is not to a fixed point.
I typed the question right before going to bed super late so my bad for the weird wording, here's a visual of what i'm trying to accomplish:
The player will arrange various events in a specific order on the map before being able to walk through the events. I want a cutscene to automatically play when a satisfactory order is arranged. So what I need to know is: How can I tell the player to walk *to* an event, followed by the next one and then next one?
The player will arrange various events in a specific order on the map before being able to walk through the events. I want a cutscene to automatically play when a satisfactory order is arranged. So what I need to know is: How can I tell the player to walk *to* an event, followed by the next one and then next one?
A pathfinding script does make the process much easier.
I suggest making this small edit to
If your three events are IDs 1, 2, and 3, your script call would look like this
The first parameter 0 indicates the player is the one moving, and the second parameter is the map event ID you want to move to (hence the small edit I made).
Path find requests are fired off immediately after reaching the previous target. Path finding cannot be interrupted by the player.
I suggest making this small edit to
def self.check_args:
Code:
def self.check_args(char, target, range, pass, dynamic, immediate)
range = 0 if range == nil || range < 0
if char.is_a?(Numeric)
char = (char > 0 ? $game_map.events[char] : $game_player)
end
if target.is_a?(Numeric)
target = (target > 0 ? $game_map.events[target] : $game_player)
end
target = PathTarget.new(target, range, pass, dynamic, immediate)
if $DEBUG && BlizzCFG::DEBUG_MESSAGES && char == nil
p "Warning! Character to move does not exist!"
end
return [char, target]
end
If your three events are IDs 1, 2, and 3, your script call would look like this
Code:
PathFinder.find(0, 1)
PathFinder.find(0, 2)
PathFinder.find(0, 3)
Path find requests are fired off immediately after reaching the previous target. Path finding cannot be interrupted by the player.
Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-player-move-to-an-event.152245/