Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
emnaki
Wanderer


Joined: 12 May 2007
Posts: 59

PostPosted: 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?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: 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
Reply with quote
emnaki
Wanderer


Joined: 12 May 2007
Posts: 59

PostPosted: Sun Nov 11, 2007 9:08 pm   
 
Thanks, your solution works great.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net