|
Love- Newbie
Joined: 10 Jun 2020 Posts: 5
|
Posted: Sat Jun 27, 2020 6:56 pm
simple trigger help |
Hi all. I'm trying to make a trigger that does something very simple. Whenever I see the text "X attacks you" (where X is any player name), I want to issue the command "insult X" Let's say James attacks me and I get the game text "James attacks you". I should issue the command "insult James"
I have tried this trigger:
%1 attacks you
insult %1
This does not seem to work. I have also tried with %w |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sat Jun 27, 2020 7:16 pm |
(%w) attacks you
Is what you want, you need to wrap a portion of the pattern in parenthesis for the anonymous variables (%1-%99) to have any value.
#HELP #TRIGGER has a link to the various pattern matching wildcards like %w. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Love- Newbie
Joined: 10 Jun 2020 Posts: 5
|
Posted: Sat Jun 27, 2020 10:31 pm |
Thanks shalimar! This works for me with (%1)
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sat Jun 27, 2020 11:07 pm |
It might work in this sample, but it is improper syntax.
I would rather teach people the right way.
What you do is on you. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|