![](templates/Classic/images/spacer.gif) |
emnaki Wanderer
Joined: 12 May 2007 Posts: 59
|
Posted: Sun Nov 11, 2007 12:51 pm
temp trigger variable in trigger |
I've been trying to put in wildcards in my temp trigger created in a trigger. I've tried the two ways syntax methods below but have not been able to get them to work:
Code: |
#TEMP tempfleeattack {^@enemy %w ($dir).} {$dir;%concat(@attack," ",@enemy)}
#TEMP tempfleeattack {^@enemy %w (%1).} {%1;%concat(@attack," ",@enemy)}
|
The first one just does not compile, the second one I cannot make %1 not expand prematurely. now that %%1 does not work anymore, how would one do this? |
|
|
![](templates/Classic/images/spacer.gif) |
Vijilante SubAdmin
![](images/avatars/7230815434153eca6be3ad.gif)
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Nov 11, 2007 2:37 pm |
What youare looking to do is to go around the normal expansion rules. This is generally accomplished using a combination of #EXECUTE and %concat. I would suggest that in this instance it is better to use #Tą, 1 more variable, and a fixed trigger.
#TRIGGER "FleeAttack" {^@enemy %w @dir} {#SEND {@dir};#SEND {%concat(@attack," ",@enemy)};#T- FleeAttack}
Then where you curreently have the #TEMP
dir=%1
#T+ FleeAttack |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
![](templates/Classic/images/spacer.gif) |
emnaki Wanderer
Joined: 12 May 2007 Posts: 59
|
Posted: Sun Nov 11, 2007 9:08 pm |
Thanks, your solution works great.
|
|
|
![](templates/Classic/images/spacer.gif) |
|
|