Smart Pathfinding

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,778
Reaction score
12,206
First Language
English
Primarily Uses
RMMV
SmartPath 22 -1

You replace the text EventId1 and EventId2 with the actual numbers.
 

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
14,730
Reaction score
14,575
First Language
Filipino
Primarily Uses
VNM
Hi Shaz, I have a problem with your pathfinding script and it's very hard to explain.
So here is my map layout
upload_2019-5-23_21-15-0.png

I wanted one by one the characters go to a position. There should be enough breathing space for the pathfinding to make a path I think?
But I noticed the smart pathfinding just fails randomly even though I have put adequate wait times like this:

upload_2019-5-23_21-14-22.png

But the issue is the last character walks like this instead!
upload_2019-5-23_21-16-19.png

Small Sample Project:
https://www.dropbox.com/s/oiuyt28u2evhd19/ShazPathfinding_Issue.rar?dl=0






EDIT I figured it out it's related to player followers for some reason? But removing them fixed most of my issues!
 
Last edited:

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,350
Reaction score
332
First Language
German
Primarily Uses
RMMV
Just found this, thank you for sharing this seems very helpfull, cant wait to test it out.
 

AshleyBrowney

Villager
Member
Joined
Feb 23, 2020
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
Got some issues with the Plugin! Where the entity it is applied to doesn't move the way the Plugin is supposed to. Can someone tell me what I am doing wrong?
Issue.pngPlugin Manager.png
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,778
Reaction score
12,206
First Language
English
Primarily Uses
RMMV
What are you expecting to happen here? For the event to move towards / follow the player as soon as switch 7 is turned on?

Your trigger is set to Action Button, so this will only happen after you interact with the event. I'm guessing this is probably not what you're after. What is on the first page of the event?

If you want this event to start moving towards the player as soon as that switch is turned on, then put the plugin command into the event that turns on that switch instead of this one, and the plugin command will be SmartPath 32 -1.
 

AshleyBrowney

Villager
Member
Joined
Feb 23, 2020
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hey Shaz, When I did what you told me to do, it gave me an error
1582646578429.png
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,778
Reaction score
12,206
First Language
English
Primarily Uses
RMMV
Are you able to zip up your project and send to me? I think there is something wrong somewhere, but not sure where to start looking.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,778
Reaction score
12,206
First Language
English
Primarily Uses
RMMV
Which map are you on when you get this error? The error (on map 9) is happening because you're telling it to make event 32 approach the player. But there is no event 32 on that map.

Is the switched turned on on one map, but the event you want to follow the player is on a different map? If that's the case, then you need to do it a little differently. An event on one map cannot tell an event on another map to do something, unless you use a switch. So remove the plugin call from event 5 on map 9, as well as from event 32 on map 2. Create a NEW event on map 2 that is conditioned by switch 7, set to parallel process, and has the plugin command followed by an Erase Event command.

This way, the switch is turned on when the necklace is picked up, and when you go to map 2 this new event will make the ghost approach the player.
 

AshleyBrowney

Villager
Member
Joined
Feb 23, 2020
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
I am on the Child's Bedroom Map in the project, that is when I get the Error.
 

AshleyBrowney

Villager
Member
Joined
Feb 23, 2020
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
So for Map 2, I do a new event for Event 32 and use that command, and I use a Movement as well as the command and an Erase Event on a Parallel?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,778
Reaction score
12,206
First Language
English
Primarily Uses
RMMV
No. You edit event 32 and remove the plugin command. Then you create a NEW event, parallel process, conditioned by the same switch. Put the plugin command on that event, followed by Erase Event.

And you remove the plugin command from the event in the child's bedroom.
 

AshleyBrowney

Villager
Member
Joined
Feb 23, 2020
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
Okay I got the same Error Message, but this time It has the correct event stuff, In the Childs room I did everything you said and set the event to follow the Player, so It would be "SmartPath 6 -1 " Right?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,778
Reaction score
12,206
First Language
English
Primarily Uses
RMMV
Your events are a bit confusing. Switch 7 can be turned on from multiple events here. I didn't realise event 6 on this map was the ghost. You have the plugin call on 2 pages on this event as well.

Because the switch can be turned on via several events, I'd do the same thing here - remove the SmartPath call from event 6 (both pages) and 5 and any other events that have it, then add a new event, parallel process, conditioned by switch 7, with the plugin call (SmartPath 6 -1) followed by Erase Event.
 

AshleyBrowney

Villager
Member
Joined
Feb 23, 2020
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
Okay it works! Thank you SO much for your help man! the plugin is fine for Commercial use right? Either way, I will credit you for the Plugin
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,778
Reaction score
12,206
First Language
English
Primarily Uses
RMMV
Yes, as per the terms on the first page, commercial use is allowed.
 

AshleyBrowney

Villager
Member
Joined
Feb 23, 2020
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
Okay Great! Thank you for taking your time to help me I hope you have a good rest of your day
 

AshleyBrowney

Villager
Member
Joined
Feb 23, 2020
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hey, So I am having a bit of an issue with cancelling a SmartPath for when a Switch is on, and reactivating it for when a Switch is off, trying to make a Hiding Mechanic for my game. Any Idea what I am doing wrong?
My thing is like this:
If : Hidden is ON
Plugin Command: SmartPath 3 cancel
Erase Event
End

If : Hidden is OFF
Plugin Command: SmartPath 3 -1
Erase Event
End

Is this how is it Supposed to go? If Not, How will I go about doing it? 1583287992737.png
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

It's weird I actually have MORE work to do when stuck at home than before.
The No Travel Game Jam is here! Jump in to make a game in the month of April that takes place all in one town!


Decided to take a stab at video editing.... Even made a clickbait screen. I'm so proud of my sellout ways. :LZSexcite:

Forum statistics

Threads
95,471
Messages
929,406
Members
125,714
Latest member
jwh741
Top