|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Thu Feb 15, 2007 12:31 am
Trigger condition |
Why can't I get triggers to work such as this?
#Trigger {You suddenly perceive the vague outline of an aura of rebounding around} {#cw magenta}
#Condition {(%w).} {#cw magenta;#if (%1=@target) {#echo target rebounding is up}} {within|param=1} |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Feb 15, 2007 2:44 am |
Works fine for me pasting it on the command line. What's it not doing that you want it to?
Also, a much, much easier way to do stuff like this is to set your server-side word wrap column to 0 so the server does no word wrapping. You can set up word wrapping in CMUD if it looks weird, but the key thing is that CMUD executes triggers before it does the word wrapping. It'll save you a lot of multiline triggers like this. Makes capturing things like channels and tells a hell of a lot easier too. |
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Fri Feb 16, 2007 6:21 pm |
Fang Xianfu wrote: |
Works fine for me pasting it on the command line. What's it not doing that you want it to?
Also, a much, much easier way to do stuff like this is to set your server-side word wrap column to 0 so the server does no word wrapping. You can set up word wrapping in CMUD if it looks weird, but the key thing is that CMUD executes triggers before it does the word wrapping. It'll save you a lot of multiline triggers like this. Makes capturing things like channels and tells a hell of a lot easier too. |
Well for one it will not color the second line and will not even recognize it.
I just went with the screenwidth 0 and to hell with it. Tired of messing around with them. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Feb 16, 2007 6:40 pm |
It honestly worked fine when I pasted those two commands on the command line and then did
#say You suddenly perceive the vague outline of an aura of rebounding around
#say Bob.
Have you tried it yourself? |
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Fri Feb 16, 2007 6:44 pm |
Fang Xianfu wrote: |
It honestly worked fine when I pasted those two commands on the command line and then did
#say You suddenly perceive the vague outline of an aura of rebounding around
#say Bob.
Have you tried it yourself? |
Yes I have and it doesn't work. It doesn't color the second line. In fact none of the triggers I have like this will color the second line. The problem with that one I gave an example to is that I need to distinguish between the target person and everyone else putting up rebounding in the middle of giant bunch of screen scrolling. So I just went with the screenwidth 0 so none of the lines wrap and I won't have to worry about it, although not sure why it won't work. |
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Fri Feb 16, 2007 6:46 pm |
Fang Xianfu wrote: |
It honestly worked fine when I pasted those two commands on the command line and then did
#say You suddenly perceive the vague outline of an aura of rebounding around
#say Bob.
Have you tried it yourself? |
By the way, I have noticed that you seem to never have problems...not sure why that is. I have a clean install and still have nothing but problems. I mean come on thats a simple ass trigger whats the deal. Why does it work for you and not me? |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Feb 16, 2007 6:53 pm |
I have no idea. I wouldn't say I never have any problems, though. I was writing a system whereby any loaded packages would add themselves to a list on startup so I could check which packages were loaded in scripts. I had no end of trouble with events choosing to not fire for no particular reason. And not to mention that lovely bug where if you try to replace the value of a variable in another package it creates a new variable with the same name. I ended up having three events that ping-pong back and forth to get it working =/
|
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Fri Feb 16, 2007 6:56 pm |
Do the two triggers have consecutive priority numbers? Consecutive meaning a space of 10 between them. I've noticed that if for whatever reason the priority numbers are too far apart the condition will not fire.
Something to try. Delete the original trigger and create a new one from scratch.
Fang probably opened up a blank session, created your trigger, and tested it. While your trigger was more likely imported from your old mud file. (am I right?)
If deleting and recreating your trigger doesn't work. Try creating it in a blank session.
We get a blank session by hitting escape at the sessions window. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Fri Feb 16, 2007 7:17 pm |
Arminas wrote: |
Do the two triggers have consecutive priority numbers? Consecutive meaning a space of 10 between them. I've noticed that if for whatever reason the priority numbers are too far apart the condition will not fire.
Something to try. Delete the original trigger and create a new one from scratch.
Fang probably opened up a blank session, created your trigger, and tested it. While your trigger was more likely imported from your old mud file. (am I right?)
If deleting and recreating your trigger doesn't work. Try creating it in a blank session.
We get a blank session by hitting escape at the sessions window. |
Wrong. I created it brand new and yes the priority numbers are 10 apart. Doesn't matter now anyway I guess. I did away with all of my wrapped line triggers like this with setting the screenwidth to 0 in the game because none of them work, which now I realize was causing me a lot of problems I didn't realize. |
|
|
|
|
|