Doors, directions, etc.

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:smile: :sad: :eek: :shock: :cool: :-x :razz: :oops: :evil: :twisted: :wink: :idea: :arrow: :neutral: :mrgreen:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Doors, directions, etc.

Re: Here's what it may be

by Ice Cream Jonsey » Wed Dec 04, 2002 1:48 pm

Kent wrote:Try:

Code: Select all

s_to
     return YourDoorHere.door_to
in your room direction and see where it gets you. I think by explicitly calling Perform(&DoGo) you're probably entering a recursive spiral. The door class's door_to property handles messages, opening and closing, and returning a valid room (if applicable), assuming you've set the 'between' property for the door up right.

Just plugged it in -- worked like a charm & was magically delicious. Thanks!

Here's what it may be

by Kent » Wed Dec 04, 2002 3:46 am

Try:

Code: Select all

s_to
     return YourDoorHere.door_to
in your room direction and see where it gets you. I think by explicitly calling Perform(&DoGo) you're probably entering a recursive spiral. The door class's door_to property handles messages, opening and closing, and returning a valid room (if applicable), assuming you've set the 'between' property for the door up right.

Re: Wait

by Ice Cream Jonsey » Tue Dec 03, 2002 9:17 pm

Kent wrote:Doesn't the basic door class in objlib.h do what you want?
I took a look at that, and by all rights it definitely should. I basically have a room setup like this:

Code: Select all

LightRoom Store "Store"
{
   long_desc
   {
     "Blah blah. There is a door to the south"
   }

s_to
 {

Perform(&DoGo,BackOffice_door)
 }
}

And I have the door setup like this:

Code: Select all

door BO_Hall1_door
{
	nouns "door" "hall" "office"
	adjective "hall" "back" 
	article "the"
	between Store, BackOffice		
	is static, not open, not locked

}

When playing through the game, if I type ">south" in the Store room there I get an out of memory error.

I should come completely correct: in the real code that I am using, I do have some Before routines in the door itself to give a custom message for opening said door which I have not included here. My next step is to rip those out and see what happens. But the whole &Perform DoGo thing ought to punch over to the door and run through it's ">enter door" routine, correct?

I have a feeling this is going to embarassing when I realize what I overlooked or did wrong. If I slink out of this thread with a gimmick handle, you'll know it's me.

Wait

by Kent » Tue Dec 03, 2002 7:40 pm

Doesn't the basic door class in objlib.h do what you want?

Doors, directions, etc.

by Ice Cream Jonsey » Tue Dec 03, 2002 4:44 pm

Not that I am trying to get anyone to do my dirty work for me, but this is one of those things that I think I have just plain forgotten: is there an easy way to get the following to happen:

Code: Select all

You are in a room. There is a door to the north. 

>north
(Opening the door first)

North Room. 
You are in the north room. There is a door to the south.
Basically, the bit I am concerned with is the whole "go north" and then have the door (which is perfectly accessible through normal door means) routines kick in. This is probably a ridiculously easy effect to get, right? I am having no luck figuring out just how to do it.

Top