Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / 'MESSAGE' Bug

Author
Message
Increase
7
Years of Service
User Offline
Joined: 21st Feb 2017
Location:
Posted: 27th Aug 2019 17:51 Edited at: 27th Aug 2019 17:53
The MESSAGE command seems to mess up at least the conditional variable.
Worldwide optimal state system - ISBN 9783748157748
Weltweit optimales Staatssystem - ISBN 9783748159476
adambiser
AGK Developer
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 27th Aug 2019 18:04
The internal GetRawKeyPressed and GetRawKeyState values are set during Sync.

Increase
7
Years of Service
User Offline
Joined: 21st Feb 2017
Location:
Posted: 27th Aug 2019 18:43
That's ok - but the bug remains.
Worldwide optimal state system - ISBN 9783748157748
Weltweit optimales Staatssystem - ISBN 9783748159476
adambiser
AGK Developer
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 28th Aug 2019 01:08 Edited at: 28th Aug 2019 01:55
PSY
Developer
8
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 28th Aug 2019 01:38 Edited at: 28th Aug 2019 01:40
Yeah,

but when the message box disappears after you clicked it, the code should print out 0, because the keystate is NOT PRESSED, and there's a sync inside the loop.
Nevertheless, it prints out 1.

if you replace
with
it works correctly.


PSY LABS Games
Coders don't die, they just gosub without return
SFSW
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 28th Aug 2019 01:40
Technically, Increase is correct. Although keystates are updated with a 'Sync()' call, most keys do not reset correctly for state checks after app interruption. For examples, 9 (tab), 13 (enter), as well as 27 (escape) will all fail to reset for state checking after a message box or other interruption. So even after the app/game is restored, the state check still shows '1' until the same key is redundantly pressed and released a second time.

An exception to this is the alt key. Both indexes 18 and 262 will reset to 0 after app interruption.

So it is, in a general sense, a bug. I'd recommend reporting it on the GitHub list.

Login to post a reply

Server time is: 2024-11-22 17:04:05
Your offset time is: 2024-11-22 17:04:05