 |
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Fri Dec 07, 2007 2:22 am
extracting "Other Com" field from room properties |
Does anyone know how one might pull the contents out of the "other com" field in the room properties for a given exit?
Lets say that I have
| Code: |
| #show Nope this exit wont work |
in the other com field for the north exit of room 3153...???
I guess I can get most of it, I'm most specifically looking for the specifi function that would grab that info. |
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Dec 07, 2007 4:35 am |
What you are asking for isn't possible via zScript room functions. Room X,Y,Z position is not exposed to the mapper scripting interface, so you can't compare coordinates of linked rooms to determine where a destination might be. Directional position of a non-standard exit (ie, go door = north) is also not revealed.
You'll have to go with COM (if it works) to peek into the map database directly, but I've no idea on how to do the steps. |
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Dec 07, 2007 6:35 am |
You can actually do this pretty simply with %roomexit - exits with an "other com" will appear in the list as a string version of that command, so remove the cardinal directions from the list and bob's your uncle.
|
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Dec 08, 2007 12:21 am |
Yes, but he's not asking merely if an NSE exists in the room's exit list, he's asking how to determine the direction it's set to.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Dec 08, 2007 3:45 am |
I have a room with two exits - nw and e. The e exit has its other com field set to "enter portal". While in that room, entering #say %roomexit gives the ouput h|enter portal. His original post seems to be asking for a way to get the contents of an exit's other com field, and that's done it.
|
|
|
|
 |
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Sat Dec 08, 2007 9:43 pm |
Fang is correct. I've used the %roomexit as hes suggested, and gotten the output that I'm looking for. Thanks both for the replies.
|
|
|
|
 |
|
|
|