![](templates/Classic/images/spacer.gif) |
umdbandit Wanderer
Joined: 31 Oct 2004 Posts: 94
|
Posted: Fri Nov 11, 2005 7:19 pm
custon slowwalk with automapper |
Ok I had an earlier thread about this, and have since made a lot of progress on it. However, I am currently at a roadblock.
A quick summary of what i'd doing: Creating a custom slow walk feature, because when i use the #WALK command on an automap, it clears the slowwalk path. SO basically i use a path to scan all the rooms in an area, but when i am walking back to sell some stuff, i use #WALK to get the direct route.
So here's what i have so far. I have the path i want saved in a string list. I have a variable that i use as an index to keep my place on the path. What i am having trouble with is the confirmation system. I do not really care about what happens if it is a null travel, because all these paths will be tailored to go in rooms that exist and so forth. I am trying to do this based on the prompt.
so i have a path like this @path e|e|e|e|n|n|n
and then an index @pathindex
rooms look essentially like this:
short desc(exits)
prompt>
here's a sample room
The Plains(n, w, s, e)
HP:200 EP:200>
so how i've been trying to do this is make an alias like this
#ALIAS steppath {%exec(%item(@path,@pathindex);@pathindex = %eval(@pathindex + 1)}
and an alias to start it
#ALIAS startpath{@pathindex = 1;%exec(%item(@path,@pathindex);@pathindex = %eval(@pathindex + 1)}
and then a trigger to push it forward
#TRIGGER {HP~:%d EP~:%d}{steppath}
now i realise i need to make a flag for when it should use that trigger to walk forward and when i want it to stay, but thats for later, after it actually walks. Anyways, as you may have guessed by the fact that i'm posting.... This all isnt working. So any advice on a confirmation system would be greatly appreciated. |
|
_________________ Rufus- Winner of Stuff |
|
|
![](templates/Classic/images/spacer.gif) |
umdbandit Wanderer
Joined: 31 Oct 2004 Posts: 94
|
Posted: Fri Nov 11, 2005 7:26 pm |
Ok so specifically here's what happens.
I hit startpath, it moves in one direction, and then hangs. However, if another line comes on the screen below it, it works!. SO I have no idea whats going on |
|
_________________ Rufus- Winner of Stuff |
|
|
![](templates/Classic/images/spacer.gif) |
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Fri Nov 11, 2005 7:30 pm |
Whichever trigger signals a successful movement you'll need to change so that it triggers on prompt as well as newline.
That's what got the mapper working for me at least.
(edit: You set this in the properties for the trigger) |
|
|
![](templates/Classic/images/spacer.gif) |
nexela Wizard
![](images/avatars/3549517644153b10a6a2fb.jpg)
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Fri Nov 11, 2005 7:57 pm |
#TRIGGER {HP~:%d EP~:%d} {steppath} "" {prompt|nocr}
|
|
|
![](templates/Classic/images/spacer.gif) |
umdbandit Wanderer
Joined: 31 Oct 2004 Posts: 94
|
Posted: Fri Nov 11, 2005 8:10 pm |
So it works now, but i dont really understand what you mean Guinn. Also nexla, what is "" {prompt|nocr} doing besides making it work :)
Sorry i'm so much trouble. I just have to understand it all so i can modify and customize.
_UMDBANDIT_ |
|
_________________ Rufus- Winner of Stuff |
|
|
![](templates/Classic/images/spacer.gif) |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Nov 11, 2005 10:30 pm |
Quote: |
what is "" {prompt|nocr} doing besides making it work
|
"" -- does nothing visible (it's the class name where the trigger is found, so if it's in the System folder it would appear as "System")
{prompt|nocr} -- code version of the Trigger On options as found in the Options tab of the Edit window for triggers in the Settings Editor GUI. "prompt" means the trigger on prompt option is checked (the trigger fires as soon as the match is made rather than waiting for the next return character), while "nocr" means the trigger on newline option is unchecked (when checked, this means the trigger will delay execution until the next return character is found). |
|
_________________ EDIT: I didn't like my old signature |
|
|
![](templates/Classic/images/spacer.gif) |
umdbandit Wanderer
Joined: 31 Oct 2004 Posts: 94
|
Posted: Sat Nov 12, 2005 7:57 pm useful |
thats a really useful piece of knowledge
thansk a lot
_UMD |
|
_________________ Rufus- Winner of Stuff |
|
|
![](templates/Classic/images/spacer.gif) |
|
|