The Dink Network

wait_for_button DinkHD weirdness

March 24th, 06:16 AM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
So doing some testing and for some reason the wait_for_button command stops recognising the CTRL button being pushed - i.e. it does give &result a value of 1. But the other keys are working...

I am in DinkHD debug mode, so not sure if that is impacting, but it only seems to exhibit this error on one screen after defeating the summoned knight in Story 2 of SOB.

I've used the translocation spell to fight with bow and arrow from the mud, but while I can use the magic to get into the mud, I can't complete the next spell to get out as wait_for_button is looking for &result to equal 1 to exit the loop of positioning the target of where to teleport to.

So I added the line of using spacebar to achieve the same effect as ctrl and that works...

This was working fine before... in DinkHD, at least a month ago when I last tested this part.

=====================================================================

Weird thing is the same thing happens using the Ultimate Cheat warp.

And even weirder, if I save the game at that point using Ultimate Cheat, then reload it, the wait_for_button() command now registers the CTRL key press.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

As you can talk to the Mudman from the mud you can still complete this task and move onto Story 3 the Desert, which is serendipitous - but still would like to know why the CTRL button press stops working for a bit.

I guess I'll see if the error happens in freedink at this point of the game.
March 24th, 10:42 PM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
okay, error is not in freedink

still there in DinkHD on reloading the game

I suspect the script that is used to summon the red knight at the end, which can use magic to fire green magic, is possibly the culprit, but why it is doing this now when it was fine about a month ago is a mystery. Perhaps there has been an update to DinkHD recently although there is nothing in the log.txt file in the DinkSmallwoodHD folder.

=================================================================================

So the SHIFT button is also affected by the wait_for_button()

Interestingly both CTRL and SHIFT work as normal until the wait_for_button() procedure is called
March 26th, 04:45 PM
goblins.gif
drone1400
Peasant He/Him Romania
C# nerd 
Hmm, I think nothing should have changed since a month ago. You can see the code updates Seth does here: https://github.com/SethRobinson/RTDink/commits/master/

I think the latest version has stuff from November last year?

Either way, I see Seth is active again, maybe I can pester RobJ to ask him to have a look at your thread and see what's up?
March 26th, 05:04 PM
custom_robj.png
Robj
Jester He/Him Australia
You feed the madness, and it feeds on you. 
Hmm.. not sure I've experienced this, or didn't notice it. But, I've sent this to Seth so hopefully he looks at it soon.

I also haven't been using PC much at all as of recently so maybe it was a bug introduced in the recent updates? I dunno.
March 26th, 08:38 PM
seth.gif
Seth
Peasant He/Him Japan
 
Yeah I've been talking to Simon (thanks for helping me recreate the bug locally), sent over a fixed (I think) .exe last night in fact!

The problem was caused because HD has special code to skip detected dialog with the punch/magic keys (added for touchscreen controls in the first HD version which was for iPhone/iPad) but they also "eat" the keystroke when it happens. Slightly more complicated (the thing that detected conversation to skip wouldn't ignore dead sprites which broke it more and made behavior 'more broken' when using a full savestate vs normal load) but that's the gist.

Certain DMODS doing advanced things (freezing dink and having text, but actually it's a new form of control/etc.) could cause problems.
March 28th, 12:35 AM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
Yes, thanks Seth, it is fixed now.

I thought this was a recent error, but I suspect it was there for a while, but I was testing/playing in freedink at first, and while I think I noticed the error in my first playthrough that I recorded - I forgot about it.

Old age...