TMC wrote:
Only possible by scripting it.
That would be a nice menu bit to have.
OK, I implemented it. Get it in nightlies soon. Dang, half an hour for a bit.
That would be a nice menu bit to have.
OK, I implemented it. Get it in nightlies soon. Dang, half an hour for a bit.
That sounds a lot like another request I made a long time ago. Definitely one I could use. Thanks for adding it.
TMC wrote:
I haven't tested, but isn't that what suspend/resumeplayer already does? However, displaying a menu may cancel the hero's pathfinding: there's an option for it, which you would have to use if you wanted to pause the player and display a menu. So it might be a good idea to change that, actually, and instead only consider cancelling pathfinding when the player themselves brings up a menu.
Pepsi Ranger wrote:
1. Pause/Resume Hero Movement
Similar to suspend/resume npcs, this would stop the hero's movement toward his mouse-click destination, and then resume the journey on the script's command.
Similar to suspend/resume npcs, this would stop the hero's movement toward his mouse-click destination, and then resume the journey on the script's command.
I haven't tested, but isn't that what suspend/resumeplayer already does? However, displaying a menu may cancel the hero's pathfinding: there's an option for it, which you would have to use if you wanted to pause the player and display a menu. So it might be a good idea to change that, actually, and instead only consider cancelling pathfinding when the player themselves brings up a menu.
I don't know what the regular mouse behavior does or is supposed to do during suspend/resume player, but when you're using mouse commands in a while loop and you suspend the player, the hero continues to move to his destination until he reaches it. Keep in mind that this is the case if you suspend player after the mouse is clicked. I don't know if the same applies if you suspend player before the mouse is clicked.
TMC wrote:
It shouldn't lock up. If there's no path, then A* will search up to 1000 tiles before giving up and pathing to the nearest tile to the destination that it found. Do you mean that "wait for hero" never stops waiting?
Pepsi Ranger wrote:
the script locks up if you don't write a contingency script for safeguarding against inaccessible destinations
It shouldn't lock up. If there's no path, then A* will search up to 1000 tiles before giving up and pathing to the nearest tile to the destination that it found. Do you mean that "wait for hero" never stops waiting?
I think so, yeah. In a while loop, if the script can only continue if it reaches the destination and then can't reach a destination, that's a problem if you've got a wait tick before canceling counting down to 1000. I don't see this being a problem if you don't have a wait, but it can be a pain if you do. But, there are ways to script out of it, which is what I think you saw in action in the video for Hybrid Mystery Park (I'll remind you in the other thread what I'm talking about).
TMC wrote:
I don't understand, care to elaborate?
Pepsi Ranger wrote:
4. Suspend/Resume Mouse-Click
Basically the same thing as #1, but works at a script level rather than a hero level. Could also be called REPEAT LAST MOUSE ACTION.
Basically the same thing as #1, but works at a script level rather than a hero level. Could also be called REPEAT LAST MOUSE ACTION.
I don't understand, care to elaborate?
This is probably badly conceived, but the gist is that if your pathfinding via mouse cancels due to obstruction or unclear path, and then the script moves the obstacle out of the way, a "repeat last mouse action" would essentially repeat the last command issued by the player without requiring a new click. The workaround is to store pixel or tile destination coordinates and send it to the coordinates, but plotscript doesn't really do single destination coordinates well. As of now, it has to be done in two commands: "walk hero to x" and "walk hero to y." We should really have something called "pathfind hero to location (x,y)" so that the previous two commands don't yield wonky results. (I see that NPCs already have this command. Heroes need it, too.)
TMC wrote:
This sounds like a point-and-click puzzle game engine feature, rather than an RPG engine feature. You can script this very easily using 'slice at pixel', though.
Pepsi Ranger wrote:
5. Grab Slice/Sprite/NPC/Hero with Mouse
This sounds like a point-and-click puzzle game engine feature, rather than an RPG engine feature. You can script this very easily using 'slice at pixel', though.
Yeah, this would be a luxury feature, but sometimes those features make the engine more diverse and user-friendly. But, definitely not a priority.
Place Obligatory Signature Here



