Announcement: Remember: you are giving away your fantastic ideas for free, and somebody else might even make money from them (or appear to). That's just how the world works! If you're worried about it, maybe you shouldn't post your ideas here.


Caravel Forum : DROD Boards : Feature Requests : Script command to cancel pending moves
New Topic New Poll Post Reply
Poster Message
Dragon Fogel
Level: Smitemaster
Rank Points: 2584
Registered: 06-21-2014
IP: Logged
icon Script command to cancel pending moves (0)  
Sometimes, when you tell a character to move or turn, that command doesn't get immediately executed and is instead queued up for the next turn. This tends to take priority over other script commands.

I don't know exactly why this happens, but it would be nice to be able to override it. There are a lot of times when the script is more important than the movement.
12-23-2024 at 10:14 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
hyperme
Level: Smitemaster
Avatar
Rank Points: 1261
Registered: 06-23-2006
IP: Logged
icon Re: Script command to cancel pending moves (0)  
Character moves don't get "queued", so I don't think this works. What's actually happening is that because move commands can take multiple turns, the character won't advance to the next command until the move is finished. This wired pretty strongly into how the movement commands work, so changing that would be very risky.

____________________________
[Insert witty comment here]
Qzvlkx?
01-04-2025 at 10:18 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Dragon Fogel
Level: Smitemaster
Rank Points: 2584
Registered: 06-21-2014
IP: Logged
icon Re: Script command to cancel pending moves (0)  
Okay, then here's my new thought. Two commands. One stops the character from doing any movement on the current turn, but stores a "next move" if a move command comes up. The other cancels the previous command and causes the stored next move to happen immediately.

I don't know if there's anything this would enable which is currently impossible, but it would make it more convenient to adjust scripts for moving NPCs that do other things.
01-04-2025 at 10:40 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
hyperme
Level: Smitemaster
Avatar
Rank Points: 1261
Registered: 06-23-2006
IP: Logged
icon Re: Script command to cancel pending moves (0)  
It may be possible to add a behaviour that makes it so single-step moves don't become blocking if they can't be done.

The "stored move" thing seems kind of complicated from a user perspective.

____________________________
[Insert witty comment here]
Qzvlkx?
01-07-2025 at 05:27 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Dragon Fogel
Level: Smitemaster
Rank Points: 2584
Registered: 06-21-2014
IP: Logged
icon Re: Script command to cancel pending moves (0)  
The idea is that it would be more of a tool so that, if the move is happening at the wrong point in the turn but the script is complicated enough that copying the code which actually sets up the move is nontrivial (because it has weird conditions or something), you can just use these commands.
01-07-2025 at 06:30 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Someone Else
Level: Smitemaster
Avatar
Rank Points: 2358
Registered: 06-14-2005
IP: Logged
icon Re: Script command to cancel pending moves (0)  
Probably the best way to accomplish your goal is to store the bit to calculate the next move in a subroutine and call that. If you need to calculate something at a different point, use local (_ prefixed) variables at that different point.
01-07-2025 at 09:28 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Feature Requests : Script command to cancel pending moves
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.9
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.