|
|
| Author | Topic: I don't understand |
| Shadow |
I have been experimenting with different texts and such, trying to figure quest out (and I really really want to understand or I wouldn't be posting so much!). I am not sure but I think this code is right: ' "practice" define game <practice> define synonyms define room <room> define object <door> end define define text <intro> end define define text <win> end define define text <lose> end define
Shadow* (I think I am stupid, how about you?) |
| Computer Whizz |
No, you're not stupid.... Just a simple human error. Again, I'm not 100% confident but perhaps if you try swapping "< door = #thing# >" to "< #thing# = door >" then that might work... Try it and get back to the forums... Computer Whizz |
| Shadow |
*cries* it didn't work....*turns around and goes back to the drawing board yet again* |
| MaDbRiT |
Hi, Here is a very basic working example of an openable door that creates an exit when opened. In this case trying to open the door a second or third time tells you "it is already open"
quote: This is ONE way to do it, and relatively simple, but it is not the best. Ideally you should create an openable type and have open / close actions with traps for repeated use, messages when things are opened and closed, varying descriptions etc.. All the above features are included in the 'openable' type that is part of my Q3EXT library, which might be worth looking at to see how it works even if you don't use it. Al p.s. a MUCH better version of my library is almost ready for release now, after having a major re-write over Xmas. |
| Shadow |
*hugs Al and goes off in search of the library for further study* Thankyou so much :D Shadow |
| Shadow |
*ish so proud of herself* I have realized that if you type it out by hand instead of using the editor it works so much better. I defined the same two types one in editor and one by hand but only the one by hand worked :-s I don't know if that is a glitch or if I just did it wrong. But I can make an opening and closing door now, with a command for the whole game and an openable closeable type door :) *does a happynekkidpagandance back to the drawing board* |
| Shadow |
Well, everything was just going fine and dandy until I tried to use a close command and I haven't the slightest idea what is wrong with my coding. I did everything exactly the same with my open command but once I open the door and then try to close it it tells me the door is already closed. *is going insane*. What am I doing wrong? ' Created with QDK 3.12 define game <> define type <door> define synonyms define room <Character Creation: The Border of Reality> define object <a plain wooden door> end define define text <intro> end define define text <win>
define text <lose> end define |
| MaDbRiT |
Hi Shadow A simple syntax error is preventing your code working as expected. The line: quote: needs to be re-written as: quote: That'll cure it! Al |
| Shadow |
Al, will you marry me? (and teach me all of your coding genius?) Thankyou so much :D The newest message board pest, Shadow |