Can anyone point me in the direction of a mouse script whereby you click a spot and the character moves all the way there?
Vlue's mouse system only moves one tile at a time.
Jet's may do this but it's not compatible with Yanfly's Save Engine, so I have never been able to check it out.
I know that such a mouse script exists for XP (Amaranth and Aldorlea), but there only seem to be just the 2 above in the Ace Master Script List.
Thanks
Falcao's script might something for you to look at, but I read somewhere that he has other problems with eventing.
Basically pathfinding is one of the more complex functions in any game - that's the reason why most scripts don't have pathfinding utilities included, but are single-step only.
Oh dear. That's a shame. Thanks for the info.
I'll leave the thread open for a bit in case anyone has any other ideas.
I've converted our XP script to Ace, but it would take a bit of work to pull it out into it's own script (it's merged with the RTP scripts). Also, I couldn't guarantee it'd work with Yanfly's Save Engine either.
When I get time (*sigh*) I will provide the script. That means it won't happen anytime soon, so you should keep looking.
That would be really kind of you if you could do that. I'll keep looking as well.
Optimal path finding is complex in terms of cpu time. Getting it to run fast enough on XP is not easy. Conceptually there are some fairly simple algorithms.
The pathfinding in Aldorlea assumes you want to go in the direction of the mouse click rather than going specifically to that tile. This is an easier problem to solve and my algorithm is much faster as it never calculates more than one move into the future.
It is an option you can consider.
*hugs*
@Zeriab
So you have a script that will work in Ace? If so, I would have thought that this would be fine for what I have in mind.
I believe Zeriab wrote the mouse script for Aldorlea, which is why he knows so much about its behaviour. (And if that's the case, it also goes one tile at a time).
No no no definitely not one tile at a time, it would be a nightmare lol especially since I don't exactly come up with small areas in general. 🙂
The one for Aldorlea is for XP, which is why I asked Zeriab if the one he referred to was for Ace
Ah, of course. My mistake - I misread Zeriab's post. Sorry.
I'm working on getting our XP -> Ace converted script out into its own files. Give me a couple of days. But keep looking in the meantime - I've seen at least three other Ace mouse scripts, I think.
Is it basically the same as algorithm used in the "approach" move routes? Where you might end up walking back and forth if you just happen to be standing behind a fairly large obstacle that spans a few tiles across.
That's interesting - so instead of pathfinding, which might take you BACKWARDS to go around a large obstacle to reach a target on the other side, your script would take you TOWARDS the obstacle and stop when you hit it?
The pathfinding in our script (originally done by Near Fantastica and SephirothSpawn) is easy for me to follow, though I've seen a couple of scripts that look like they're less involved, but I have trouble understanding them. I haven't encountered any lagging in Ace like we used to have in early versions of the XP script, as I've added a Graphics.update every now and then, and Ace runs at a higher frame rate.
@Tsu:
Nope, it is different, you'll only walk forwards. "Approach" may at any time cause a move to occur in a different direction.
@Shaz:
Yup, A hit occurs if you cannot process further towards the goal. I.e. if you have to do a lot of move_up and move_left to reach a goal then being blocked only on move_up it will move_left.
I guess it's worth noting that when I made the algorithm going BACKWARDS could have been a huge deal.
We had monsters (events) which approached the player. If player suddenly changed direction on a miss-click you could get caught.
*hugs*
Great.
thank you so much for this. Much appreciated.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
If you have issues with the script, post in the script's thread. If you find it doesn't do what you want, report this post and ask for the thread to be reopened.