|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: 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! |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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. |
|
|
|
Thinjon100 Apprentice
Joined: 12 Jul 2004 Posts: 190 Location: Canada
|
Posted: 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! :) |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Sep 28, 2007 4:39 pm |
You don't even need to do that.
#trig {OMG: (*)} {//Module/class/something = %1} |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: 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! |
|
|
|
|
|