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
Tech
GURU


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

PostPosted: Fri Sep 28, 2007 8:53 am   

[1.34] Setting Variables in another module from Trigger Pattern
 
I know this is probably a silly question, and I could swear it was asked and answered before, but I can't find it.

Is it possible to set a variable in another module from the trigger pattern?

In other words instead of doing this
Code:
#TR {HP: &%d{Health}} {}


I want to do this
Code:
#TR {HP: &%d{//Status/Health}} {}


That second option doesn't work but I'm not sure if I got the syntax wrong or if it can't be done.

(P.S. I also tried this on 2.03)
_________________
Asati di tempari!
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Fri Sep 28, 2007 11:40 am   
 
It has been asked, I'm sure, and the answer was simple: No. The trigger pattern parser doesn't do that.

Luckily, it doesn't matter. Just set them in the script using the current syntax.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Thinjon100
Apprentice


Joined: 12 Jul 2004
Posts: 190
Location: Canada

PostPosted: Fri Sep 28, 2007 2:02 pm   
 
Yeah, wouldn't it be possible to assign the value to a local-scope variable, and then in your first line of execution script, assign it to the proper module?
_________________
If you're ever around Aardwolf, I'm that invisible guy you can never see. Wizi ftw! :)
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Fri Sep 28, 2007 4:39 pm   
 
You don't even need to do that.

#trig {OMG: (*)} {//Module/class/something = %1}
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Tech
GURU


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

PostPosted: Fri Sep 28, 2007 8:08 pm   
 
Yeah.. I know that way would work and that would've have been the plan. But I have a bunch of the first kind of triggers (thought I was being efficient) but now I want the variables off in a separate module and I was looking for a short cut.

It's no biggie.
_________________
Asati di tempari!
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