|
patryn Apprentice
Joined: 26 Sep 2001 Posts: 124
|
Posted: Sat Jan 15, 2005 3:07 am
%destroom in an expression trigger |
I would like to update the colour of %destroom, whenever the value of %destroom changes.
Expression trigger would be my first thought buty i can't get the %destroom function to work within an expression trigger.
Second thought was to set up the trigger as a 'command input' trigger and then test it to see if the %destroom has changed. This does not work because the 'command input' trigger is processed _before_ the %destroom is updated in the automapper.
So finally, i made the trigger into an alarm that goes off every 1 second.
This does the job but 'really' slowly. Its just too slow to be of any use, with 1 second intervals before updating room %destroom.
Some help please.
I need to either get the syntax for using %destroom in an expression trigger (IDEAL but i doubt its possible).
Or, i need a way to make the trigger fire after the automapper has updated %destroom
Any ideas? |
|
_________________ That which does not kill us, makes us stronger. |
|
|
|
Vorax Apprentice
Joined: 29 Jun 2001 Posts: 198 Location: USA
|
Posted: Sat Jan 15, 2005 6:19 am |
See if something like this will work for you.
#FUNCTION DestRoom {%destroom()}
#TRIGGER {@DestRoom} {do color changes here} |
|
|
|
patryn Apprentice
Joined: 26 Sep 2001 Posts: 124
|
Posted: Sun Jan 16, 2005 7:01 am |
Love the idea, and it _almost_ works.
The bit where it fails is the expression trigger doesnt check itself when the %destroom changes.
Infact (while testing this offline) it seems to only checkitself if i click on the MAP button up in the menu.
While online, it only tests itself if a line is recieved from the mud.
I dont see a way around this :)
ONINPUT fires the trigger too early
Expression fires the trigger too late :/
What i really need is an expression trigger that fires just after the automapper has processed something :)
There's an idea for the next version of ZMud :) |
|
_________________ That which does not kill us, makes us stronger. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Jan 16, 2005 4:46 pm |
What overall are you trying to do. %destroom should either be 1 step away or a long ways away depending on whether you are walking a path or just wandering. If you are just wandering I can not see the point in coloring the room. If you are walking a path then the path is highlighted. So I guess I am getting at how you are looking to use this. Generally when zMud falls short in 1 place there are six ways to script around it, but I have to know the situation you want the script to work with.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
patryn Apprentice
Joined: 26 Sep 2001 Posts: 124
|
Posted: Mon Jan 17, 2005 12:10 pm |
What i want to do is have a red marker which shows my 'virtual' room position whenever i queue to move into a room.
Basically i want this to work just like the blue marker does when the automapper is in FAST walk mode, except that i would now have two markers. One red, one blue. The red represents my current destination, while the blue represents where i currently am on the mud.
This means that i can wander around easier by queueing commands manually.
(Im not much of a fan for speed walking about the place, i like to do it manually and i am used to doing this in FAST mode with older versions of Zmud)
So. For this to work comfortably the red marker needs to be updated exactly when the %destroom changes.
Using zMapper ive made a red-marker roomtype and ive simply been changing the roomtype of %destroom and then changing it back again whenever %destroom changes.
The only bit im having trouble is triggering this event to happen whenever %destroom changes. |
|
_________________ That which does not kill us, makes us stronger. |
|
|
|
Pega Magician
Joined: 08 Jan 2001 Posts: 341 Location: Singapore
|
Posted: Mon Jan 17, 2005 3:33 pm |
There are other ways of updating a function/variable besides using an (1)Oninput Trigger or (2)Text Parsing Trigger. You could run a (3)one-second Alarm Trigger using '-1' as the alarm pattern. When I need to execute a variable evaluation even more frequently, I hide it in the (4)status bar where I have tons of variables being updated all the time.
|
|
|
|
|
|