|
nazzireth Beginner
Joined: 26 Jun 2007 Posts: 12
|
Posted: Sat Jul 13, 2013 1:52 am
using a defined variable in a trigger patteren? |
HI guys,
lets say i made a trigger for:
[ Joe ] [ Chuck ] [ Pete ]
where Joe is %1, Chuck is %2, and Pete is %3
#var groupmemeber1 (%1)
#var groupmemeber2 (%2)
#var groupmemeber3 (%3)
Now I can make a trigger using the in game group member prompt:
[Chuck ][CLE][ lv 22| 396/ 396hp 695/ 695m 530/ 530mv]
which i made into a trigger:
(*)~[(*)~]~[(*)~]~[ lv (%n)~|(%s)(%n)/(%s)(%n)hp(%s)(%n)/(%s)(%n)m(%s)(%n)/(*)(*)
this matches of course.
but can i make this work?:
(*)~[(@groupmember2)~]~[(*)~]~[ lv (%n)~|(%s)(%n)/(%s)(%n)hp(%s)(%n)/(%s)(%n)m(%s)(%n)/(*)(*)
And have it only trigger if Chuck is groupmemeber2?
I just am not sure how or if it works this way?
I tried using {@groupmemebr2} instead of (*) but it didn't work.
Thanx in advance for any help =) |
|
|
|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Sun Jul 14, 2013 12:35 am |
The general pattern:
Code: |
*~[ (@groupmember2) ~]*~[ lv (%n)~|(%s)(%n)/(%s)(%n)hp(%s)(%n)/(%s)(%n)m(%s)(%n)/(*)(*)
|
should work. Notice that since you don't care about the first or third name the parentheses are removed from the trigger. You do have to include the blanks surrounding the second name because you don't have them in the variable. Also, if you are looking for the match you really don't need the parentheses around the second name either since you already know what it is. You would only use the parentheses if this was a capture pattern not a matching one. |
|
_________________ Sic itur ad astra. |
|
|
|
|
|