Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Leonel
Newbie


Joined: 17 Apr 2007
Posts: 3

PostPosted: Sun May 06, 2007 10:11 pm   

Wrong room getting coloured
 
I've been trying to use triggers to get room colour assigned on the map according to certain words appearing

eg trigger WARES #CALL %roomcol( ,goldenrod)

The problem is, the room I've just left gets coloured, rather than the room containing the trigger word.

Can someone help please?
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Sun May 06, 2007 11:42 pm   
 
I've never really used the mapper myself.
But I seems to me that the #OK command that zmud uses to indicate that a successful step was taken is going off after your trigger that colors the room.
the vnum being used by vnum is then vnum of the previous room.
If the line that shows exits when you enter a room is before the room description, you could make a trigger using your exit description to send #OK.
this should update the vnum before your other trigger colours the room.


All of this is just an educated (I hope) guess.
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Mon May 07, 2007 4:51 am   
 
You've got it right... basically you have to make sure you've identified you new room before you mark it. You could use #ALARM to delay the call by a second to make sure you had time to get the room vnum updated.
_________________
Asati di tempari!
Reply with quote
Leonel
Newbie


Joined: 17 Apr 2007
Posts: 3

PostPosted: Mon May 07, 2007 11:23 pm   
 
The exits are after the room description, so I can't use them to send #OK.

I've tried delaying the call with #ALARM
eg. #ALARM +1;#CALL %roomcol( ,goldenrod)
but all that happens is that I stay in the approach room for the delay, then it is coloured, then I move. Still the same result - wrong room coloured.
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Tue May 08, 2007 12:19 am   
 
I would try using the onroomenter alias to get around it

Code:
#alias onroomenter {#if (@room_colour !="") {#call %roomcol(,@room_colour)} {}
#var room_colour ""}

in your other trigger instead of calling %roomcol, just do something like
Code:
#var room_colour goldenrod


since the onroomenter help says it called after room scripts, then that means it must be done recognizing the new room.
which means the vnum passed to %roomcol should be the correct one, thats my hope anyways.

Anyways, something like that...
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
chris-74269
Magician


Joined: 23 Nov 2004
Posts: 364

PostPosted: Tue May 08, 2007 4:04 am   
 
you could set your speedwalking settings to fast, this way you are automatically moved into the room regardless of mud output.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net