|
Ash Novice
Joined: 17 Nov 2000 Posts: 31 Location: USA
|
Posted: Thu Aug 29, 2002 7:19 am
Question About making a Path-Runner |
I was wondering about making a path-runner. What this would do is automatically move you from room to room as long as theres only one exit (like n,s,). When it would get to an intersection (like n,s,e) it would pause, allowing you to make a decision. This would also pause if you got attacked or something like that.
Just in case you need this the Exits shown on the mud I play is like this.
Exits: e nw se
Any help in creating such a system would be great. Im using the newest version not the Beta though.
Thanks, -Ash |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Aug 29, 2002 3:28 pm |
This should follow a path with standard directions.
#VAR directions {u|n|ne|e|se|d|s|sw|w|nw};#VAR revdirections {d|s|sw|w|nw|u|n|ne|e|se}
#AL revdir {#VAR revdir %item(@revdirections, %ismember(%1, @directions))
#TR {Exits: (%w) (%w)$} {#IF (%1 <> @revdir) {revdir %1;%1} {revdir %2;%2}
It won't pause, for that you'll need other triggers.
#TR {No way! You are fighting for your life}
{revdir @revdir;#VAR dir @revdir;#T+ combatdelay}
#CLASS combatdelay disable
#TR {is killed} {#T- combatdelay;revdir @dir;@dir}
#CLASS 0
It would probably be easier to just map out the area you are interested in, create a path to take you through it, and use the "safe" or "slow" speedwalking speed.
LightBulb
Senior Member |
|
|
|
Ash Novice
Joined: 17 Nov 2000 Posts: 31 Location: USA
|
Posted: Thu Aug 29, 2002 8:26 pm |
I put in the triggers and they do move me in reverse to where I came from. But they dont pause, when I come to an intersection, it just chooses a direction and moves me. It only seems to stop when I come to a dead end.
Sometimes if I switch directions while its going it'll do a jump thing and go back and fourth in between rooms, is there any way to fix this as well? I dont really want to map anything, just want a road runner so to speak to run me around on roads that only have two exits one that you came from and one you can move to, stoping at intersections, which would be helpful when getting chased by scarey things. Itd be cool if I could disable/enable it with a macro to, I think I can set that up myself though. Thanks for all the help bytw.
Heres how all the exits layout on the mud.
Exits: n e s w u d ne nw se sw |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Aug 30, 2002 12:11 am |
The triggers aren't supposed to move you in reverse. They are supposed to move you forward. The reverse directions are only there to determine which of the two exits is the forward direction.
Did you include the $ at the end? The trigger I provided should fire only on lines having exactly two words following Exits:. Intersections would have more than two, and thus would not trigger it. Dead ends would only have one, and thus would not trigger it.
If you interfere with the movement by issuing your own movement commands, you can expect the results to be unpredictable.
And yes, it would be an excellent idea to put all the triggers (at least) in a separate class which would normally be disabled and would only be enabled when you want to use the pathrunner.
#CLASS pathrunner disable
#CLASS 0
#AL pathrunner {#T+ pathrunner}
#AL normal {#T- pathrunner}
LightBulb
Senior Member |
|
|
|
|
|
|
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
|
|