|
|
| Author | Message |
|---|
catventure Admin Adventurer

   Age : 56 Joined : 08 Jun 2008 Posts : 132 Location : UK Humor : Enjoys a laugh!
 | Subject: Re: The Forbidden Isle Fri Jul 25, 2008 2:55 pm | |
| | sandyrepope wrote: | [start]move mat#room=4#flag4=0[acts]create3#cmessYou move the mat and find a key.#objloc4=room#flag4=1[end]
|
Hi Sandy,
I think maybe a little error in the code:
[start]move mat#room=4#flag4=0[acts]create3#cmessYou move the mat and find a key.#objloc4=room#flag4=1[end]
"objloc4=room" is the action that is placing the sandwich (object 4) into current room and causing the problem. It should be removed from the entry.
Can you post the "door" code and I'll take a look.
Ta!
catventure _________________ http://tab.thinbasic.com ; Home of the TAB I.F. project. |
|
 | |
sandyrepope Apprentice Adventurer
   Age : 60 Joined : 10 Jun 2008 Posts : 35
 | Subject: Re: The Forbidden Isle Fri Jul 25, 2008 8:57 pm | |
| That solved the problem with the sandwich. Thanks.
Here is the door code:
| Quote: | handle front door of house if flag 50 = 0 the door will be locked and closed if flag 50 = 1 the door will be unlocked but closed if flag 50 = 2 the door will be open. [start]open door#room=4#flag50=1[acts]cmessYou open the door#flag50=2#cmessThe door is open.#else#room=4#flag50=2[acts]cmessThe door is already open!#else#room=X#flag50=0[acts]cmessI'm afraid the door is locked![end]
[start]close door#room=4#or_flag50=0#or_flag50=1[acts]cmessThe door is already closed.#else#room=4[acts]cmessThe door is now closed.#flag50=1[end]
[start]lock door/lock door with key#room=4#absent3[acts]cmessYou don't have a key!#else#room=4#flag50=0[acts]The door is already locked.#else#room=4#here4#or_flag50=1#or_flag50=2[acts]cmessYou lock the door with the key.#flag50=0[end]
[start]unlock door/unlock door with key#room=4#or_flag50=1#or_flag50=2[acts]cmessThe door is already unlocked!#else#room=4#here3[acts]cmessThe door is now unlocked.#flag50=1[end]
connect4=eastto5 : make a new connection from location 4 east to location 5
connect4=eastto0 : remove an exit from location 4 leading east to location 5
[start]open door#room=4#flag50=1[acts]cmessYou open the door#flag50=2#connect4=eastto21#cmessThe door is open.#else#room=4#flag50=2[acts]cmessThe door is already open!#else#room=4#flag50=0[acts]cmessI'm afraid the door is locked![end]
|
I got a new error message. When the key is present and player gets it then if the command 'lock door' is used it tells me:
Action "The door is already locked." is Invalid!
I'm not sure how that can be giving me an error message.
Thanks Sandy |
|
 | |
sandyrepope Apprentice Adventurer
   Age : 60 Joined : 10 Jun 2008 Posts : 35
 | Subject: Re: The Forbidden Isle Sat Jul 26, 2008 2:32 am | |
| A friend of mine stopped by today and he told me that I'm going at the door problem all wrong. He said that I should work on one command at a time. I don't know why I didn't think of that.
Right now I'm working on the 'unlock door' command. I'll keep working on it until I get it right. I imagine that I'll be spending the weekend working on the 'door'.
Thanks Sandy |
|
 | |
catventure Admin Adventurer

   Age : 56 Joined : 08 Jun 2008 Posts : 132 Location : UK Humor : Enjoys a laugh!
 | Subject: Re: The Forbidden Isle Sat Jul 26, 2008 5:10 am | |
| Hi Sandy.
OK. There is a couple of mistakes in the code. Here are the corrected entries. Also I think maybe you misunderstood me or perhaps I didn't make it all that clear - only ONE entry is needed for OPEN DOOR... I've just added in the "connect" action where it is supposed to be.
handle front door of house if flag 50 = 0 the door will be locked and closed if flag 50 = 1 the door will be unlocked but closed if flag 50 = 2 the door will be open.
[start]open door#room=4#flag50=1[acts]cmessYou open the door#flag50=2#connect4=eastto5#cmessThe door is open.#else#room=4#flag50=2[acts]cmessThe door is already open!#else#room=4#flag50=0[acts]cmessI'm afraid the door is locked![end]
[start]close door#room=4#or_flag50=0#or_flag50=1[acts]cmessThe door is already closed.#else#room=4[acts]cmessThe door is now closed.#flag50=1#connect4=eastto0[end]
[start]lock door/lock door with key#room=4#absent3[acts]cmessYou don't have a key!#else#room=4#flag50=0[acts]cmessThe door is already locked.#else#room=4#here4#or_flag50=1#or_flag50=2[acts]cmessYou lock the door with the key.#flag50=0#connect4=eastto0[end]
[start]unlock door/unlock door with key#room=4#or_flag50=1#or_flag50=2[acts]cmessThe door is already unlocked!#else#room=4#here3[acts]cmessThe door is now unlocked.#flag50=1[end]
This should work correctly.
It is actually one of the more difficult puzzles to implement in a game for a newcomer to TAB coding so well done on persevering with it!
catventure. _________________ http://tab.thinbasic.com ; Home of the TAB I.F. project. |
|
 | |
sandyrepope Apprentice Adventurer
   Age : 60 Joined : 10 Jun 2008 Posts : 35
 | Subject: Re: The Forbidden Isle Sat Jul 26, 2008 12:29 pm | |
| | Quote: | | Also I think maybe you misunderstood me or perhaps I didn't make it all that clear - only ONE entry is needed for OPEN DOOR... |
I'm sure that it's me and not you. It's just taking me a while to understand everything.
Thanks Sandy |
|
 | |
sandyrepope Apprentice Adventurer
   Age : 60 Joined : 10 Jun 2008 Posts : 35
 | Subject: Re: The Forbidden Isle Sat Jul 26, 2008 9:14 pm | |
| So far, everything having to do with the door is working properly.
I have a question. When the player gets the door open and enters the house, is it ok that from that new location the player can't do anything with the door? I don't know if this is standard behavior or not. How is this handled in other adventure games?
Thanks Sandy |
|
 | |
catventure Admin Adventurer

   Age : 56 Joined : 08 Jun 2008 Posts : 132 Location : UK Humor : Enjoys a laugh!
 | Subject: Re: The Forbidden Isle Sun Jul 27, 2008 5:25 am | |
| | sandyrepope wrote: | So far, everything having to do with the door is working properly. I have a question. When the player gets the door open and enters the house, is it ok that from that new location the player can't do anything with the door? I don't know if this is standard behavior or not. How is this handled in other adventure games?
|
Hi Sandy,
I am pleased to hear that the door puzzle is working.
I personally think that the main puzzle with the front door would be sufficient (how to get into the house) but others might not. In any case it is but simple matter to enter a similar entry code block referring to location 5 using the same flag (50) Just make sure that the exit connection west for Location 5 (Location Editor) is initially set to 4.
[start]open door#room=5#flag50=1[acts]cmessYou open the door#flag50=2#connect4=westto4#cmessThe door is open.#else#room=5#flag50=2[acts]cmessThe door is already open!#else#room=5#flag50=0[acts]cmessI'm afraid the door is locked![end]
[start]close door#room=5#or_flag50=0#or_flag50=1[acts]cmessThe door is already closed.#else#room=5[acts]cmessThe door is now closed.#flag50=1#connect5=westto0[end]
[start]lock door/lock door with key#room=5#absent3[acts]cmessYou don't have a key!#else#room=5#flag50=0[acts]cmessThe door is already locked.#else#room=5#here4#or_flag50=1#or_flag50=2[acts]cmessYou lock the door with the key.#flag50=0#connect5=westto0[end]
[start]unlock door/unlock door with key#room=5#or_flag50=1#or_flag50=2[acts]cmessThe door is already unlocked!#else#room=5#here3[acts]cmessThe door is now unlocked.#flag50=1[end]
Regards, Phil. _________________ http://tab.thinbasic.com ; Home of the TAB I.F. project. |
|
 | |
sandyrepope Apprentice Adventurer
   Age : 60 Joined : 10 Jun 2008 Posts : 35
 | Subject: Re: The Forbidden Isle Tue Aug 12, 2008 1:42 pm | |
| My project is coming along. The door now has sound effects when it is opened or closed. I think it adds a little something extra. There is also a sound when the score changes.
Thanks Sandy |
|
 | |
|