|
Fate Newbie
Joined: 30 Jan 2002 Posts: 9 Location: Canada
|
Posted: Wed Jan 30, 2002 10:37 pm
Basic Trigger Help |
Ok.. just need a little help. I'm starting to use triggers and don't have extensive experience in making them. I can make basic triggers to send multiple lines to the mud and whatnot. I use a lot of variables in aliases and would like to integrate them into my triggers.
For starters (well, this will be the only one at the moment.)
Line to trigger to:
"<target> slaps you across the face"
How do I make it so that the trigger recognizes <target> and so that I can set it to "slap" this person back.
I know this question is abreeze for most of you, but hey, I gotta start somewhere.
~Fate |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
|
|
|
Fate Newbie
Joined: 30 Jan 2002 Posts: 9 Location: Canada
|
Posted: Thu Jan 31, 2002 1:03 am |
ah, thanks
~Fate |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Jan 31, 2002 3:25 am |
quote:
ah, thanks
~Fate
You presumably know what a variable looks like in code (commonly like @variablename, though it can appear as &variablename in certain situations).
If you simply want to use a variable in a trigger pattern WITHOUT altering the contents, simply insert the @variablename syntax in the position where needed:
@target just slapped you
If you want to capture the person into the target variable, you can use wildcards/special characters which will then be assigned to system variables you can in turn assign to your own variables, like so:
#trigger {(%w) slaps you} {#VAR target %1}
or you can use the reference character (&) to capture the value straight from the trigger pattern without having to later assign it to a variable, like so:
#trigger {&target just slapped you.} {}
li'l shmoe of Dragon's Gate MUD |
|
|
|
Fate Newbie
Joined: 30 Jan 2002 Posts: 9 Location: Canada
|
Posted: Thu Jan 31, 2002 4:08 am |
Yeah, I scoped out the link to the trigger and variable helps. They answered my question. I basically knew what I had to do, I just didn't know what the code was.
Example {(%W) slaps you......
I just didn't know whate character to use..
%w, %a, %s, %x and whatnot.
Thanks again. Can count on me to come up with more questions soon =P
Peace
~Fate |
|
|
|
|
|