4/11/2024 0 Comments Rpg maker vx ace lighting script![]() I've given a list of reasons why you might want to do it as a script call rather than use the event command, and what you're doing doesn't match any of them. However, I have to ask why you're trying to do this to the player via a script call? A simple Move Route command would do the job. If that doesn't work, you could just put in a loop that waits 4 frames, checks if the player is at the destination tile, and breaks if they are. You could try adding this line at the end of the script, but I don't know whether it'd help:įiber.yield while $game_player.move_route_forcing This isn't catered for by the instructions above. This is what stops the next command from running. If you look at Game_Interpreter's Set Move Route command, you'll see in addition to setting the move route on the character, it also does a Fiber.yield while the move route is happening. This isn't really meant to be used for stuff that needs to happen in a sequence. Then cancel the NPC move routes (so they stop turning to face the player if the player moves again) with this: After you add that script, add the player's move route, with a Wait for Completion. The move route defaults are kept (repeat, no skip, no wait). Mr.list.push( RPG::MoveCommand.new(25,) ) You could do it with a number of move routes, trying to synchronise the timing, or you could do this: ![]() You want to make the player follow a particular path around them, and you want them all to turn to face the player as he/she moves. Let's say you have a little cutscene and there are 5 NPCs consecutively numbered as events 5, 6, 7, 8 and 9. Mr.list.push( RPG::MoveCommand.new you can apply the same move route to a number of events by using a loop with a variable for the event id. Mr.list.push( RPG::MoveCommand.new(18, ) ) Mr.list.push( RPG::MoveCommand.new(15, ) ) Mr.list.push( RPG::MoveCommand.new(17, ) ) Mr.list.push( RPG::MoveCommand.new(36, ) ) This is how each one is defined in the help file: So to create a move route via script, you're going to need to create a new RPG::MoveRoute object plus one or more RPG::MoveCommand objects. It contains values for repeat, skippable, and wait (the checkboxes you see on the Set Move Route command), as well as an array of RPG::MoveCommand objects (also defined in the help file, just below RPG::MoveRoute). you want to apply the same move route to several events, but don't want to copy/paste the entire thing for each eventĪ move route is an object of type RPG::MoveRoute - you can find this in the help file under RGSS Reference Manual > Game Library > RPGVXAce Data Structures > RPG::MoveRoute.you don't know which event you want to apply the move route to (you can use a variable to hold the event id, or even decide in the script if the move route should be applied to an event, a player, a follower or a vehicle).the move route is quite long and movement commands are repeated (you can use a loop to repeat one or more commands rather than writing them all out individually).You might want to do it this way, rather than using the Set Move Route event command, for a number of reasons: These are the commands you need to use if you want to create a move route and apply it to one or move events, by using a Script call in an event list.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |