I don't know if this is a bug or if I did something wrong (I don't think so?), but it seems that whenever I place any code in my room's repeatedly_execute function (it can be any code, from one line to a 100 lines) then SkipUntilCharacterStops is disabled.
I originally discovered this while keeping the text on an overlay updated (for debugging purposes). The problem seemed to resolve itself after I removed the offending lines (all of them!) from repeatedly_execute.
Phemar, since we have so many versions of AGS, including versions in development, please state which version you are using.
(And I am asking this to anyone reading this: if you are going to report a bug, first thing tell which version of AGS you are using, so that we will at least know where to start looking).
Second question, where do you call SkipUntilCharacterStops from?
Sorry Crimson, I'm using the latest release - build 3.2.1.111. I call SkipUntilCharacterStops from inside a module's on_key_press.
Eg.
function on_key_press (eKeyCode keycode) {
if (Queue.Playing()) { // If an interaction is playing
if (keycode == eKeySpace) {
if (oSpeech.Valid) { // If speech is currently displayed
if (t == p) // If it's the last command in the series of commands for the interaction
Queue.Stop (eQueue_Reset); // Stop the interaction
else {
Queue.Stop (eQueue_DontReset); // Skip the current line of speech
Queue.Resume ();
} }
ClaimEvent ();
}
if (keycode == eKeyEscape) {
if (player.Moving)
SkipUntilCharacterStops (player.ID); // If the move command is part of a scripted command
else {
Queue.Stop(); // Stop the current interaction
ClaimEvent ();
} }
}
else if (keycode == eKeyEscape)
SkipUntilCharacterStops (player.ID); // If the move command is a mouse command
}
Manual sais:
Quote
SkipUntilCharacterStops(CHARID)
Skips through the game until the specified character stops walking, a blocking script runs, or a message box is displayed.
I put few random math operations (like int a = 10 + 10) into repeatedly_execute and that seem to work fine.
Then I made gui toggle its visibility off and on there, and skip stopped working.
Hmmm. I've designed my game in such a way that not a single blocking command is called throughout the entire script. As you might be able to tell from the example I posted above, I've basically written my own scripting engine in AGS. It can run any command non-blocking, such as character.Say and Wait etc.
The downside to this is that it's a little bit slower (only one command per game loop), but the effect on gameplay is worth it.
The only command I had in repeatedly_execute was Overlay.SetText, which shouldn't stop SkipUntilCharacterStops, should it? It's not blocking, it's not a message box and nor does toggle a GUI.
Oh well.
I too think it's a bit strange. I am going to check the engine code more. I am not sure why setting gui property is counted as blocking in this case.
I know this infinitely old, but has anyone ever encountered this bug yet? I am trying to implement double click (https://www.adventuregamestudio.co.uk/forums/index.php?topic=53226.0) to teleport a character to the destination using SkipUntilCharacterStops, but it doesn't work at all. (using 3.4.1.15)