|
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Tue Sep 28, 2004 6:23 am
Walking and moving rooms |
Ok, I spent about 2 hours trying to figure this out before coming here. In Dragonrealms there are places you need to swim. It moves you, gives you round time, then you can move again. The problem is I can't figure out how to do this while I speedwalk, etc. I have tried #PAUSE, #STOP, #OK, and #STEP!
Here is the problem....
1 <----> 2 <----> 3
(you can also goto http://66.8.153.16/123.gif to see a screen shot)
There are 3 rooms. Here is what I get when I move between them
1-2
> e
Roundtime: 6 sec.
You splash east, moving sideways to the light current.
[Woodland Path, Brook]
This shallow stream would probably only come chest-high on a short Halfling. The water moves lazily southward, but the shifting, sharp rocky floor makes crossing uncomfortable.
Obvious paths: north, east, west.
2-3
> e
Roundtime: 5 sec.
You splash east, moving sideways to the light current.
[Woodland Path, Brook]
A shallow brook cuts across the path here, meandering its way toward the wide Segoltha River to the south. Delicate water hyacinths and horsetail grasses flourish along the gurgling brook's pebbled shore. Dense growths of tall trees surround the area.
Obvious paths: east.
3-2
> go brook
[Woodland Path, Brook]
This shallow stream would probably only come chest-high on a short Halfling. The water moves lazily southward, but the shifting, sharp rocky floor makes crossing uncomfortable.
Obvious paths: north, east, west.
2-1
> w
Roundtime: 5 sec.
You splash west, moving sideways to the light current.
[Woodland Path, Brook]
The brook cuts a narrow path through tall walls of stately trees. The gentle lapping of the mild current against the rocky shore gives the area a sense of peace and tranquility. Soft-blowing breezes bring fresh clean scents from the rushing waters of the Segoltha River to the south.
Obvious paths: east, west.
Now, The roundtime changes, But it is stored as 5000, 6000, etc in @RT. I can get it to pause but can never get the walk to start up again. Any help would be really really great. Thanks in advance |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Sep 29, 2004 2:43 am |
It really isn't that easy to hook right into the walking routines on wide and general basis. Even when using slow mode timing can be difficult. I use slow mode exclusively because I like my character to be able to quickly interact with changing situation while walking along. Some of the walks in my mud are long roads between 2 towns and I need to be able to drink water, eat food, and sometimes just pause and rest up movement points. So I use slow mode. I am going to post a few corners of my scripts that heavily interact with the mapper and its movement. You may be able to figure out how some of it works and apply it to your problem.
The first basic step is that all movement is delayed until my prompt comes up. Keep in mind that this is normal state for things now, but with the speed of triggers and the appearance that the mappers prompt trigger occurs before mine I just want more time. This becomes even more critical because the prompt is used in my script to time sending of many actions. When the prompt occurs my character handles any pending automatic actions and anything I set to occur on the next prompt like casting a spell, etc. It is a basic semaphore system that I won't be posting but is referenced as CharAction. The system is designed to keep a steady stream of prompts coming in during automated tasks. I try to keep these tasks down to the mundane things that get in the way of character development, everything else I do. The 'locks' are held in CharPend. The pertinent part of the prompt trigger is: comments added
#IF (%walkconfirm) { check to see that a step was completed
#DELITEM CharPend {DoorAction} remove semaphore from door script
#DELITEM CharPend {fill} remove semaphore for filling from fountain
}
CharAction
#IF (%trigger(AutomapperAll)) {WalkHandler} check that mapper is on first
Now how I actually #PAUSE. This is meant for version 7.05 it took quite the bit of tweaking during the prior betas and even then was still more tweaking in other sections.
#ALIAS onroomenter {
#IF (%inwalk) { check to see that walk is occuring
#IF (%roomcom) { room scripts might want some time to execute
#PAUSE
#ALARM {+.501} {#CR} blank lines don't hurt ensures new prompt
}
#IF (@CurMV<30) { check movement points
#PAUSE
EngageRest sleep does whole series to go to sleep
}
}
#IF (%roomnum()=0) { automated system to get vnums from mud
#IF (%inwalk) {#PAUSE} issuing #PAUSE multiple times doesn't hurt
#IF (@Class="Channeler") {
#IF (%ismember("study",@CharPend)=0) {
#ADDITEM CharPend {study}
study
}
}
}
}
Next the main WalkHandler, this gets called from that prompt trigger
#IF (%trigger(Automapper)) { this section is for map mode only
#IF (%ismember(%lastdir,"n|s|e|w|u|d")) { I do not speedwalk in map mode
#IF (%walkconfirm) { however some of my scripts work with %lastdir
#NODIR 1 and require it return valid directions
}
} {
#NODIR
}
} { not mapping might be walking
#IF (%inwalk) { %inwalk returns 1 even for single steps
#IF (%walkactive=0) { this seems to be tied to the queue
#IF (@CharPend="") { I never tested how closely, but I know
#IF (@Resting=0) { both will be 1 at all times during a speedwalk
#STEP all systems go, take a step
}
}
}
}
}
Now the way I avoid having this messed up when things like a closed door is encountered is I set the door command to "DoorAction %1 %2", I then store special information about that door in its name. DoorAction is a simple alias that checks the state of the door from the exit line and takes appropiate action. I don't pause the walking during this even if it is doing an extended action because I turned off the timeout on slow walking in the preferences. Doors that manage to close between the time exit line was received and the direction being sent are handle by other triggers that find out the state of the door, correct the exitline variable then preform the action, and finally use #SEND to resend the direction command. This keeps the mapper queue from being corrupted and eliminates the need for using #STOP.
Hopefully this gives you enough of an idea how to integrate into the mapper to handle your slowwalking. I believe you could also change modes in a roomscript by using %walkmode and the next #STEP issued would begin using the new mode. This can also be added as something to test in the onroomenter to allow faster modes in some areas and slow mode in others. Just keep in mind that you would have to use the "Pause during speedwalk" flag for those rooms that would switch into slow mode from safe or fast, and also for those that would switch from fast to safe. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Wed Sep 29, 2004 3:35 am |
I always use slow mapper too because you have to in DR. I guess one question I have is why doesn't #STEP ever seem to do anything?
|
|
|
|
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Wed Sep 29, 2004 3:54 am |
Ok, I got #STEP working when I am normally moving. I used #PAUSE to stop it and everything. But if I take that small little script and apply it to the water it doesn't work. I am thinking its because it repeats the script twice in a row....I am not sure though. This is the script I was using
#TRIGGER {You splash (*),} {
#PAUSE
#WAIT @RT
#CR
#STEP
#CR
} |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
|
|
|
|
|
|
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
|
|