On Tue, 4 Apr 1995, Ryan wrote: > > > On Tue, 4 Apr 1995, Scott Francis wrote: > > > Hey I'm sure this is kinda trivial, but I have a question. I'm trying to > > make a multiroom scan command and am having trouble accessing rooms past > > those that are immediately connecting to the character. > > > > I am trying to do something similar to > > EXIT(ch,(EXIT(ch,door))->to_room)->to_room) to get there..but it doesn't seem > > to work....any suggestions would be greatly appreciated..... > > > > Hmm.. I just woke up, ut lemme give this a shot :) > > ok, well ch->in_room is the current room, now if I'm not mistaken you are > trying to access the room 2 rooms east of this? ie o-o-o <- this room? > > sh_int cur_room, count; > > for (cur_room = ch->in_room, count = 0; cur_room && count < 2; > cur_room = EXIT(ch, door)->to_room, count++) { > sprintf(buf, "%d", cur_room); /* just for testing */ > log(buf); /* purposes :) */ > } > > Not sure if this will work, like I said, I'm still wiping the crust out > of my eyes (euk). > > Ryan > > I tried this out....and it the code seems to get me to the next adjacent room, but will not take me to the room next to that one....if there are any suggestions I'll be all ears..... Thanks in advance again, Scott Francis sfrancis@janus1.cs.trinity.edu
This archive was generated by hypermail 2b30 : 12/07/00 PST