|
Logic Beginner
Joined: 30 May 2002 Posts: 17 Location: Denmark
|
Posted: Sun Jul 07, 2002 6:03 pm
Trigger |
Hi
I want to make a trigger that’s capture the output when I cast
a spell, the spell can have 2 variants:
cast 'fly' logic
cast 'word of recall'
Some of the spell have a target and some don’t.
Here is what I have try to do, but it wont work :(
#TR ^cast '(%w)' (%w)
#UNV target
#VAR spell %1
#VAR target %2
Logic |
|
|
|
iljhar GURU
Joined: 10 Oct 2000 Posts: 1116 Location: USA
|
Posted: Sun Jul 07, 2002 6:26 pm |
%w will only capture 1 word. You'll probably want to have 2 triggers, 1 with targets and 1 without.
#trigger {cast '(*)'$} {#var spell %1;#var target ""}
#trigger {cast '(*)' (%w)$} {#var spell %1;#var target %2}
You could just do it in 1 trigger, but this is easy too.
Iljhar |
|
|
|
Logic Beginner
Joined: 30 May 2002 Posts: 17 Location: Denmark
|
Posted: Sun Jul 07, 2002 7:06 pm |
Hi agian
Thanks for the fast reply :)
But non of the trigger will capture all the words in the spell like cast 'word of recall'
only the first word is capture.
Else they work fine, but..
Logic |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Jul 07, 2002 8:08 pm |
If you want to include more than one word in a variable-value, you need to enclose it in braces {} or other delimiters. Otherwise, the spaces are interpreted as delimiters so the first word becomes the value, the second becomes the default value, the third becomes the class, and anything after that is ignored.
#trigger {cast '(*)'$} {#var spell {%1};#var target ""}
#trigger {cast '(*)' (%w)$} {#var spell {%1};#var target %2}
LightBulb
Senior Member |
|
|
|
|
|