I've got a microproject on the go in an attempt to learn AGS 2.72.
The good news: everything but one works perfectly!
The one thing: you have to type the key ";" which the internet says corresponds to ASCII code 59.
This isn't in the ASCII code table supplied in the AGS help file, but keycode==59 in the global script On_Key_Press does link to that key, because I don't get the wrong key sound (i.e. keycode!=59 PlaySound) when I hit it (while every other key, including keys such as ", ] / + that are also not on the AGS ASCII table do make the sound). However, when I attempt to use (IsKeyPressed (59) ==1) in my room script it doesn't run the script (while the exact same script with IsKeyPressed(65) or (32) etc. work just fine).
Any thoughts as to why this is and/or how I can make it work?
I'd guess it's because keys not featured on the manual's ASCII reference list aren't 100% officially supported and so just mightn't work right. (Which I think you'd figured out for yourself.)
Ways around it - the most obvious is unfortunately to use a different (supported) key instead. Or, since it works in on_key_press is there a way to use that and avoid IsKeyPressed?
A possibly over-complicated workaround would be to set a variable in on_key_press and check against that - not sure how that'd handle releasing the key, though. You'd have to check against 'no key pressed' I suppose. (Like I said - overcomplicated.)
If you don't get a more definitive answer, I can shift his over to the Tech forum - might be the better place if this is a sort-of bug report.
Quotethe most obvious is unfortunately to use a different (supported) key instead
Ah, I should have explained that. I'm working with a kid that needs to learn how to type, so we kind of need the ; (although I suppose it's not of the highest priority, it will definitely speed her up when she's typing out scripts!). I'll try adapting that one bit of script to On_Key_Pressed tonight and report back.
LATER THAT DAY: Well it really didn't take that much effort to work around the problem in the global script, and the whole thing now works perfectly so I guess it's a non-issue. Thanks anyway! 8)