Nirwanda

Procrastimancer
Veteran
Joined
Nov 2, 2012
Messages
1,292
Reaction score
611
First Language
Spanish
Primarily Uses
RMMV
I don't know if this can be solved but I have a child npc that's running in circles around town, and you need to talk to her to complete a subquest. The thing is that after talking to her, the event changes pages and her move route starts from the beginning even if she's midway through it, making her run into a wall. It's a very minor thing and it works fine once the screen is exited and reentered. But, I was wondering if there was a solution to this short of making her stop dead in her tracks after page change, and then resetting the event through a switch when reentering the screen or something like that.
 

DarcHiro

Dark Lord of Lollipops
Member
Joined
May 8, 2015
Messages
10
Reaction score
11
First Language
English
Primarily Uses
I was messing around in the editor to try and come up with an idea, but all I could come up with is create a completely new event. You can have one event blank when the switch activates and the other event appear. And to make the appearance a clean look would be to fade out the screen before the switch, and fade in after. Not sure if that is what you were looking for, but that was the only way I could fix that.
 

MenaKatep

Veteran
Veteran
Joined
May 11, 2016
Messages
67
Reaction score
24
First Language
English
Primarily Uses
Here. 






If you go down to Titanhex's post and use the event idea for pathfinding. It's very simple, but it would be easy to elaborate on it as a common event and make it more complex. Anyway, I hope that points you in the right direction. Then you can ensure your npc gets to the desired location before doing the new movement route. You'd want a third page then.

Second page would be pathfinding and the third page would begin the new movement route upon selfswitch ON.
 

Roderick

Veteran
Veteran
Joined
Apr 19, 2016
Messages
39
Reaction score
11
First Language
English
Primarily Uses
Remove the movement of the NPC from all its pages. Make a note of the event name for the NPC.


Add a new invisible event somewhere on the same page, out of the way. Set it to run in parallel. Put the NPC's movement route in the invisible event (make sure to change the movement route to the NPC's name). Set the movement route to Repeat and Wait.


Edit: Crap, I clicked this off the sidebar without noticing that it's a VX question; I only have MV. I don't know if that's an option in VX, but it doesn't hurt to check. I hope it does help you.
 
Last edited by a moderator:

Nirwanda

Procrastimancer
Veteran
Joined
Nov 2, 2012
Messages
1,292
Reaction score
611
First Language
Spanish
Primarily Uses
RMMV
Well, I tried to use titan hex menthod since it seemed like the simpler one, but I'm running into a bug:


Here is the event (sorry it's in spanish)


Sin_nombre.png



Anyway, what I did was set up the x and y variables and then set up a loop. Inside the loop there are conditional branches that check if the event is in the correct position, and if it isn't, it'll move one step towards the correct direction, and set the x or y variables again. Once the x and y are right (so she's in place), it starts a switch that leads to the second page where the default move route is in place and ready to go. But the thing is that after assuming her correct position, the game freezes and I don't know why. Any ideas. Since it's in spanish: any need for clarification?
 

MenaKatep

Veteran
Veteran
Joined
May 11, 2016
Messages
67
Reaction score
24
First Language
English
Primarily Uses
Thats' weird. . . are the other pages set to autorun? I'll try and recreate something to check it out too if you can't get it to run.
 

Roderick

Veteran
Veteran
Joined
Apr 19, 2016
Messages
39
Reaction score
11
First Language
English
Primarily Uses
Again, this is in MV, so I'm sorry if it doesn't work for you.


I created an NPC and named it Walker and made it so that when I talked to it it said one thing and switched Self Switch A on, then on the other page, which runs when SSA is active, it says something else and turns SSA off. Then I created this event:


Untitled.jpg


In MV, the NPC maintains its route, even while repeatedly switching pages.

I can't comment on your event; I don't know nearly enough Spanish to make sense of it.
 
Last edited by a moderator:

Nirwanda

Procrastimancer
Veteran
Joined
Nov 2, 2012
Messages
1,292
Reaction score
611
First Language
Spanish
Primarily Uses
RMMV
@MenaKatepYeah, the event is set to action button, not autorun. (BTW your name sounds familiar, where could I have heard it from?)


@RoderickIf I do it that way the event will still restart its move route when talked to, running into a wall.


http://s000.tinyupload.com/index.php?file_id=33040765212202372938


Here's a little demo I made. The left girl uses the coordinates method and freezes the game while the right one uses a parallel process and runs into a wall.


BTW, because I copypasted the event from my game and I'm lazy, you need a variable to be set in order for the girl's dialogue to proceed. The variable acivates by opening the nearby chest.
 
Last edited by a moderator:

Roderick

Veteran
Veteran
Joined
Apr 19, 2016
Messages
39
Reaction score
11
First Language
English
Primarily Uses
@RoderickIf I do it that way the event will still restart its move route when talked to, running into a wall.



I wrote that up in MV and tested it, and it worked fine. So I downloaded VX Ace Lite, and tried the same thing, and it broke, just as you said. So... sorry, but I guess I don't have any simple solution for you.
 

MenaKatep

Veteran
Veteran
Joined
May 11, 2016
Messages
67
Reaction score
24
First Language
English
Primarily Uses
Ok I found something for MV made by Shaz that does exactly what you want but I was looking for something in Ruby. I also stumbled upon this one 





It seems promising. Been around for a while! 

The help info in the file is this

To move a player or event, use this in an event "Script..." command:

find_path(x, y, ev = 0, wait = false)

x is the target x
y is the targey y

ev is set to 0 by default and can be omitted like so: find_path(9, 0)
ev represents what character is to be moved. -1 is the player, 0 is the
calling event, and anything above is an event on the map whose ID is the ev.

wait if set to false and can be ommitted like so:
find_path(9, 0) or find_path(9, 0, -1)
wait specifies if the player will have to wait for the move route to finish
to start moving again.

You may also use find_path(x, y) (no ev or wait) inside of an event's
"Set Move Route..." command, using the "Script..." tab. This does the same
as above, but takes on the properties of the move route you are making,
including the affected character.

So you would turn on the script and then in the event do script... "find_path(10, 15, wait = true)" and execute. Should then execute the movement and wait to finish moving before doing anything else.


EDIT: Well, I played a game called Darkages for a long time hosted by KRU Interactive; I also played a multitude of other MMORPGs over a long period of time too. I don't know where else you'd know my username though. Maybe on a previous RPGMaker forum I was on. :)  
 
Last edited by a moderator:

Roderick

Veteran
Veteran
Joined
Apr 19, 2016
Messages
39
Reaction score
11
First Language
English
Primarily Uses
OK, so here's my next solution, created and tested in VX Ace. This WILL work, if you've got a simple path for the NPC. If it's a more complex path, you'll need some fancier scripting, but it will still be the same. The script I wrote makes the NPC walk around the outer edge of the screen, but you can just change the constants checked in the event to different numbers, and it'll walk in any size box you want.


First event, the NPC. Second page is the same, but with a different text, and turns SSA off, with SSA On as a Condition.


Walker.jpg


Second event. The bit cut off the bottom is just a :Branch End or two.


Walkerpath.jpg
 
Last edited by a moderator:

Nirwanda

Procrastimancer
Veteran
Joined
Nov 2, 2012
Messages
1,292
Reaction score
611
First Language
Spanish
Primarily Uses
RMMV
@MenaKatepFor some reason I can't get the script to work, I must be doing something stupid. And stupid is as stupid does because I couldn't follow @Roderick's method. You know what? I''ll probably just live with it, I don't want to be bothering people so much and causing so many headaches, I'm sorry.
 

MenaKatep

Veteran
Veteran
Joined
May 11, 2016
Messages
67
Reaction score
24
First Language
English
Primarily Uses
@Nirwanda OK I GOT THE WORKING COPY OF THE SCRIPT XD

http://forums.rpgmakerweb.com/applications/core/interface/file/attachment.php?id=33900

There were some revisions that didn't end up in the initial thread's post and were commented with later on. Try THAT one and it should work for you. :)

I even tested it out myself!


So sorry it took such a long time to get it figured out. I just figured that eventing it at this point would be dumb especially if a script can handle it all in one line of event commands.
 
Last edited by a moderator:

Nirwanda

Procrastimancer
Veteran
Joined
Nov 2, 2012
Messages
1,292
Reaction score
611
First Language
Spanish
Primarily Uses
RMMV
Here's a demo of what I did.


Well, I must be dumb and doing something wrong, because when i speak to the npc instead of returning to it's original location, the event takes a few steps down and continues in a new move route. I think It only considers the y and not the x maybe?


Since I've bothered you so much, could I bother you one last time asking what did I do wrong?
 

MenaKatep

Veteran
Veteran
Joined
May 11, 2016
Messages
67
Reaction score
24
First Language
English
Primarily Uses
It's ok I'll figure it out! :D


@Nirwanda Alrighty! I figured it out. So when the script was updated, they changed the parameters that are passed from the event to the script. LOL. So, basically you'll set your "find_path(x, y)" BUT then you'll have to specify a wait time after that like 180-240 frames or something because what's happening is the event is cutting the movement off. The wait function doesn't work so you need to kind of time it out and set the appropriate amount of time for it to wait before flipping self switch.


example1.png
 
Last edited by a moderator:

MenaKatep

Veteran
Veteran
Joined
May 11, 2016
Messages
67
Reaction score
24
First Language
English
Primarily Uses
JUST SO GLAD WE FINALLY GOT IT! hahahahahaha
 

Latest Threads

Latest Profile Posts

Do you think horror RM games are still a thing today? :|
Now counting one week of skies alternating between cloud, rain, and heavy winds, in the middle of summer. Sure puts a new meaning to the phrase "strange weather around here"
Vacation from work coming up, hope I can smash out a bunch of progress on my game
We gather here on this divine day of Saturday, to proceed with the game make! Praise be.
No way, these madlads actually did it, they made Sans in real life

Forum statistics

Threads
118,605
Messages
1,117,248
Members
155,674
Latest member
violetpaw06
Top