|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Mon Jul 07, 2003 4:37 pm
Coloring rooms on the mapper |
I've finally gotten some decent mapping triggers setup for Achaea (not perfect, but better). Now, I'm wondering if there's a way to programmatically set the color (or other properties) of a room based on triggers. If I walk into a shop, I'd like it to color that room yellow, for example.
I haven't found anything about this in the documentation, so I'm close to assuming that it can't be done but I thought I should at least ask first.
Thanks,
Larkin
P.S. I'll post my triggers for Achaean mapping here soon, too. I'm fairly certain that some of the gurus may be able to help me work a few kinks out of them yet. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Jul 07, 2003 8:29 pm |
Try using the %roomcol function.
|
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Tue Jul 08, 2003 6:58 pm |
That should have been obvious to me, but I was looking in the commands and not the functions. Thanks.
Now, I've setup a trigger to color shops, but it doesn't do the coloring. It goes off successfully, but no color.
#TRIGGER {WARES} {#noop %roomcol( %colorname( brown));#show This is a shop!} "" {case|line=6}
I made sure that the map window is opened and in map creation mode. Am I missing something else?
Thanks. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Jul 08, 2003 10:50 pm |
The first argument to %roomcol is the number of the room to change the color. If you want to perform this action on the current room, leave the first argument blank, but you still need the comma before the next argument. Example:
#NOOP %roomcol(, color)
Also, make sure that the map is either in Map mode or that it is not locked. You can change the latter one by using the %maplocked function. |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Wed Jul 09, 2003 3:33 am |
Thanks for clarifying. It successfully colors a room now.
I'm having just one problem and not sure how to solve it. My trigger seems to occur before the map position is updated so that I color the room I just left instead of the room I entered. I tried setting a variable to 1 and checking it after tagging the exits, but that's still too early to color the room. Is there a better way to go about this other than setting some arbitrary timer or cueing it off the prompt?
Thanks again. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Jul 09, 2003 11:55 am |
Are you currently mapping these rooms or are you in Follow mode?
|
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Wed Jul 09, 2003 1:24 pm |
I've been actively mapping these rooms and as they are created I want to color them.
There are other areas that I have already mapped where I would like to color existing rooms.
Is there a difference to the way these are handled or would both be colored in mapping mode? |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Jul 09, 2003 11:05 pm |
To set the color while mapping it would be best to use the onroomcreate alias. Just create an alias with this name and it will be called each time a room is finished creating. If you have this alias check a variable to see if it should color the room or not, it would do what you want.
Now, if when in Follow mode it sets the color to the wrong room, then you could try the method about having a trigger fire on the prompt and check a variable to see if it should color the room or not. |
|
|
|
|
|