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
malathion
Beginner


Joined: 23 Jul 2004
Posts: 20

PostPosted: Mon Jan 09, 2006 7:12 pm   

Tick timer has an effect on another window?
 
Okay, so suppose I have two windows open simultaneously connected to the same mud. I want to be able to sync the tick timers between the windows automatically; for example, if I get a message in one window that lets me know there was a tick, I want to reset the tick timer for the other connection. Is this possible?
Reply with quote
Tech
GURU


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

PostPosted: Mon Jan 09, 2006 11:05 pm   
 
There may be a simpler or more elegant way but the most straightforward way to do it is to have the tick message from Window 1 send a special message to window to so it knows to reset it's tick.

Like this:

Code:

#TRIGGER {You are hungry} { #WINDOW MySecondWindow AAA Reset your timer AAA; #TZ}


You second window should have this trigger
Code:
#TRIGGER {AAA Reset your timer AAA} {#TZ}


That should work for you, albeit they maybe fractions of a second off from each other.

As an aside, I didn't realize multiple windows could have their own tick timers. I don't do much with them, but from what I understood of them and what I see in zMUD, I always assumed there was only one tick per connection. Maybe the wizards can clarify that.
_________________
Asati di tempari!
Reply with quote
malathion
Beginner


Joined: 23 Jul 2004
Posts: 20

PostPosted: Tue Jan 10, 2006 2:37 am   
 
Nope its one tick timer per connection. And the problem is, both connections have the same name, so I'm not sure how that will work. Can a trigger fire off something that was sent to a window?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Jan 10, 2006 5:37 am   
 
Yes. Also, you can rename the session ID of the character either by using #rename or #name (I forget which it is), or by doing so in the Character Properties. This will get rid of the same-name issue so you can tell the windows apart.
_________________
EDIT: I didn't like my old signature
Reply with quote
malathion
Beginner


Joined: 23 Jul 2004
Posts: 20

PostPosted: Tue Jan 10, 2006 5:54 am   
 
Fantastic, that's exactly what I needed. Thanks!
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue Jan 10, 2006 5:54 am   
 
See here for other ideas
http://forums.zuggsoft.com/phpbb/viewtopic.php?t=5635&highlight=session+var
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