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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
rakasha681
Newbie


Joined: 08 Dec 2009
Posts: 9

PostPosted: Wed Dec 16, 2009 6:33 pm   

Problem sending variables from one session to another
 
What i want, is for my status window to show hp/mana for several sessions logged in at once. I have a trigger set up for the prompt on each session:
^<R> (&RakHP)/(&RakMaxHP)hp (&RakMana)/(&RakMaxMana)m (&RakMv)/(&RakMaxMv)mv ~$(&RakGold) ~[(&RakXP1)~] (&RakTargCond)

I know the pattern is matching and all that, since it assigns &RakHP and all the rest of the variables on the local session. For the script on the trigger i have:
#all {#var RakashaHP @RakHp}
#all {#var RakashaMaxHP @RakMaxHp}
#all {#var RakashaMana @RakMana}
#all {#var RakashaMaxMana @RakMaxMana}
#gag

I would think that every time Rakasha gets a new prompt line, it should update every open session with the variables for his mana/hps. But it doesnt. Its like the #all command doesnt get sent.
Am i missing something obvious, or is there an easier way to send the variables to other sessions? Thanks!
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Dec 16, 2009 7:00 pm   
 
There's an easier way, use a module to store the variables. This way, everyone can see the variables all the time instead of having to maintain copies in each window.

If you can change your prompt on the server side, you might also want to put something unique in it to identify which character it came from (as far as I know, CMud doesn't yet have a way to identify which window's text caused the match). This will allow you to identify which prompt line is being processed with just one trigger, and can then properly update the right variables.
_________________
EDIT: I didn't like my old signature
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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