|
geosmith Wanderer
Joined: 23 Apr 2005 Posts: 57
|
Posted: Sun Mar 19, 2006 6:50 am
Sorry, another mapper question |
Is it in any way possible to define an attribute for a room, and to later interract with all rooms that bear that attribute?
Basically what I'm trying to do is set an "environment type" for each room - for example "Grasslands" "Mountain" "Freshwater" - and then to later be able to enter a command such that all rooms of a particular attribute are set to a specific colour. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Mar 19, 2006 8:54 am |
If there's not a more appropriate setting (%roomflags()?), you could always make use of the %roomnote() function. Not much of a helpfile on either one, but %roomnote() seems extremely open-ended.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
geosmith Wanderer
Joined: 23 Apr 2005 Posts: 57
|
Posted: Sun Mar 19, 2006 11:46 am |
Actually starting to get a little closer with this. I've determined I can set the roomflag to whatever word describes the particular environment, and can search for the numbers of rooms matching a particular roomflag using:
%mapquery("[userstr] like 'mountains'")
What I'm struggling to do, though, is to use the numbers produced to set the colour of the rooms in question.
I've tried the following:
#noop %roomcol(%mapquery("[userstr] like 'mountains'"),red)
But thusfar with no success.
I suspect the problem results at least in part from the format in which %mapquery returns its result - which basically looks like (348|872|322). If it were possible to add each of these numbers as seperate entries to a string list variable, even that would be a great help. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Mar 19, 2006 6:30 pm |
Use a #forall loop:
#forall %mapquery("[userstr] like 'mountains'") {#call %roomcol(%i, red)} |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|