|
Axe Software Forums
Quest Developer Forum more help ( i know thats all i ask for..)
|
Author | Topic: more help ( i know thats all i ask for..) |
kingcoaster |
posted 11-02-2002 19:40 GMT
Hi guys and gals, just like to know if anyone can tell me how to set up a hidden door whereby it will only open if the player presses CCCCDEDCCFEG on a piano? Any one got any ideas? |
Computer Whizz |
posted 11-02-2002 22:41 GMT
My idea: You have a "keypress" numeric variable that depends on where along the string of keys the player is. In the procedure when the player types "press the ## key" or whatever you want, you have it go through alot of variables saying: I'll post a cut and paste demo if you want, and you can open it in QDK to look at it easier! Computer Whizz |
MaDbRiT |
posted 12-02-2002 11:50 GMT
Hmmm How about reading each "key played" into an array using a 'for - next' loop and then build a checkable string from each array element after 12 keys have been played? Would be way neater -( I am assuming you want the player to type each key followed by [enter] here. e.g. 'play C on piano' [enter]) I feel it is going to be quite difficult to explain to the player how to actually input the keys to play mind you! Al |
MaDbRiT |
posted 12-02-2002 13:27 GMT
Thought about this for a moment and came up with a better idea than my previous one :-) I've coded up a little demo of how I'd do this, and uploaded it so's you can download and try it. I wrote in manually, but it does open O.K. in Q.D.K. 3.1 ( I made sure of that! ) I'll not post the code here, although the whole demo is only 70 lines long it will probably get re-formatted to the point where it will be unreadable. You should be able to download by clicking this link www.members.aol.com/agbampton/hidden.zip Hope it helps. Al. p.s. - Alex you might like to put this on the tips / tricks page, as it is a little unusual. |