|
optimus101 Newbie
Joined: 12 May 2002 Posts: 0 Location: USA
|
Posted: Sat Apr 13, 2002 1:02 am
String Variables and Triggering |
Ok, I've created a variable called @vENEMIES and placed a lot of different names into it. How would I set up a trigger for when they arrive/fly in to check if the name is in the variable and execute a command if they are?
Person arrives syntax:
Player arrives.
Player flies in.
I'd want the trigger to highlight/caps the name if they are on the list, and do nothing if they arent..
Right now I have it all set up as seperate triggers for each person on the list, both arriving, and flying in, and I think the string variable might cut down on processing a bit so it doesnt have to search through 400+ triggers.
-Brak |
|
|
|
Muorshai Newbie
Joined: 20 Jan 2002 Posts: 3
|
Posted: Sat Apr 13, 2002 1:16 am |
The way I use the stringlist for multiple whatever detection is using the %ismembercommand.
trigger to the line "(%w) flies in."
#IF (%ismember(%1,@enemieslist) {highlight commands}
(actually I get a little fancy in the highlight using MXP...but then again I'm different) |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Sat Apr 13, 2002 2:32 am |
#TRIGGER {^({@vENEMIES}) {arrives|flies|stumbles|enters|falls from above}} {#CW 71;#ECHO Entered %1}
Doesn't cap it but highlights and echos to you.
Ton Diening |
|
|
|
|
|