Page 1 of 1

Building a Clues Screen with Keyguard

PostPosted: Sun Nov 06, 2011 12:36 am
by Sedani Studio
Hello everyone!

I haven't posted for a while, but had some time today to work on my current project (hopefully I'll have an announcement before too many months!)

In my game, I have created a HINTS frame with the Keyguard plugin. By pressing the H button, the player goes to a HINTS frame. Because the hints frame will have links to other picture frames, such as pictures the player has taken during the game, I created a FRAMEVAR variant variable. When the player presses the H button, the current frame name is stored in FRAMEVAR, and this allows for the player to click on a "return" hotspot on the HINTS screen and return back to FRAMEVAR.

Some of you have already figured out the problem. If the player presses H while in the HINTS frame, then it stores the HINTS frame as the current frame. When the player then clicks on the RETURN hotspot, it simply links back to itself and there's no way out.

Is there a way to turn off the keystrokes function of Keyguard while in certain frames? Perhaps there is some additional code that could be added to the particular frame itself. Thus far, I've tried modifying the code in the universal procedures to have the keystrokes only work if the player isn't in certain frames, but it doesn't seem to be working.

I'd like to turn it off in the HINTS frame, but also on the startup frame.

Thank you in advance!

- Ian

Perhaps a solution

PostPosted: Sun Nov 06, 2011 12:49 am
by Sedani Studio
Ok, here I am answering myself again. I think I've figured it out by using an IF, THEN statement in the coding that only allows it to work on certain frames (... if the currentframe <> HINTS then process keystrokes).

Nonetheless, if anyone else has a good, elegant suggestion, I love learning new techniques!

PostPosted: Sun Nov 06, 2011 4:07 pm
by ShadowHunter
Hi,

I sent you an email with two suggestions:

1. Select Case for an exclusion list (like If Then but more easy)
2. Resume and Pause methode of KeyGuard

With best regards,

ShAdOwHuNtEr