|
Cly Newbie
Joined: 20 Dec 2002 Posts: 2 Location: USA
|
Posted: Fri Dec 20, 2002 1:51 am
Problem with #LOOP in triggers. (v6.40) |
I had written a beautiful, loop-dependent set of triggers in 6.16. It seems now that they will not work in 6.40 :( When a #LOOP command is used in a trigger now, the MUD seems to ignore the next several lines of text. For instance, if I made the trigger:
#ACTION {&buffer} {#ECHO @buffer}
(and disabled Trigger on Trigger), it would echo every line received. However, if the body of the trigger were instead:
{#LOOP 2 {#ECHO @buffer}}
it will only echo the first line of the last "block" of text received. I use #LOOPs to add mobiles' keywords to a string list, and when there is a group of mobs in a room in addition to any other mobs, anything after the first group fails to be triggered (unless I take out the #LOOP part of the trigger, in which case, of course, it doesn't add the right number of mobs).
Does anyone know a way for me to use the #LOOP command in a trigger without disabling the rest of my triggers for several lines every time said trigger fires?
-Cly |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Dec 20, 2002 7:27 am |
quote:
I had written a beautiful, loop-dependent set of triggers in 6.16. It seems now that they will not work in 6.40 :( When a #LOOP command is used in a trigger now, the MUD seems to ignore the next several lines of text. For instance, if I made the trigger:
#ACTION {&buffer} {#ECHO @buffer}
(and disabled Trigger on Trigger), it would echo every line received. However, if the body of the trigger were instead:
{#LOOP 2 {#ECHO @buffer}}
it will only echo the first line of the last "block" of text received. I use #LOOPs to add mobiles' keywords to a string list, and when there is a group of mobs in a room in addition to any other mobs, anything after the first group fails to be triggered (unless I take out the #LOOP part of the trigger, in which case, of course, it doesn't add the right number of mobs).
Does anyone know a way for me to use the #LOOP command in a trigger without disabling the rest of my triggers for several lines every time said trigger fires?
-Cly
enable Trigger on Trigger. When that's disabled, that kills any chance of the other triggers firing while this particular trigger is executing.
li'l shmoe of Dragon's Gate MUD |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Fri Dec 20, 2002 2:03 pm |
This is due to some changes Zugg made regarding processing of other triggers while in a loop. You could trying messing around with the #PRIORITY commands to see if you can get the results you want. However, it seems to me like what you are trying to do is best accomplished in another why. Try posting some more info, with sample MUD output and stuff and we may be able to help you develop another method of accomplishing the same thing.
Kjata |
|
|
|
Cly Newbie
Joined: 20 Dec 2002 Posts: 2 Location: USA
|
Posted: Sat Dec 21, 2002 5:33 am |
I ended up using an array instead of a string list...that way I could add a number of mobs in one command, instead of having to loop to add a keyword to a string list multiple times. So, problem fixed, until a future update causes the use of arrays to interfere in the same way ;)
So, problem solved, but thanks for the responses. I can post more info if you're interested in the way the script works.
-Cly |
|
|
|
|
|
|
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
|
|