|
Darkspawn Beginner
Joined: 18 Sep 2002 Posts: 15
|
Posted: Wed Oct 01, 2003 4:37 pm
Scan Based Tracking System #2 |
I while back I asked a similiar question and got a great answer, however now I am on a new mud and need some new help. I want to make a script that when I scan and it see's my target, it goes in that heading and direction. This is what my mud output looks like.
You scan north.
***** Range 1 *****
A gnome man is walking here, on his way to work.
<84/84hp 127/127m 212/218mv 754tnl> NESW You scan south.
<84/84hp 127/127m 212/218mv 754tnl> NESW You scan west.
***** Range 1 *****
A gnome man is walking here, on his way to work.
Of course there can be more then 1 range(this isn't the best example).
So I tried to make a multi-state trigger that would fire on:
#Trigger {You scan (%w)} {#var direction %1} [state 0]
#Trigger {~*~*~*~*~* Range (%d) ~*~*~*~*~*} {#var range %1} [state 1]
#Trigger {*@target*is*here} {#say @target bearing @direction range @range}
Of course as I soon found out this doesn't work because the trigger just matches (north) and then (1) everytime regardless of where the target is....any thoughts...your help is greatly appreciated. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Oct 01, 2003 6:55 pm |
Since you don't know how many ranges will be shown for a given direction, you don't know when to reset the trigger to the first state (state 0), so it's probably better to use multiple triggers.
#TR {You scan (%w)} {#VAR direction %1}
#TR {Range (%d)} {#VAR range %1}
#TR {@target * here} {#SAY @target bearing @direction range @range} |
|
|
|
|
|
|
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
|
|