Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Andymedae
Beginner


Joined: 19 Jul 2004
Posts: 12
Location: Atlanta Georgia

PostPosted: Sun Aug 15, 2004 1:28 pm   

Trigger suggestion.
 
It would be very convenient to be able to have a trigger fire when the next game prompt appears.

For many of the scripts I write not all of the information required to process the trigger is available at the time of the triggering text. By waiting for the game prompt this information will be available.

I handle this now by having the original trigger set a flag varriable and then having a trigger for the game prompt execute the code if the trigger is set.

While this works it is awkward in that I have many such trigger situations leading to a busy and frequently modifed prompt trigger.

Anyway, just a thought.

What does anyone else think?
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Sun Aug 15, 2004 2:58 pm   
 
Perhaps you could offer a couple examples of when you might do this? Personally, I've turned off my prompt and don't echo commands (easier to read, and creates less scroll, IMO), and have no difficulties with any of my scripts, many of which are very complex.

Have you looked at the options for multistate triggers such as LoopLines, Duration, and Within?
_________________
.geniusclown
Reply with quote
Andymedae
Beginner


Joined: 19 Jul 2004
Posts: 12
Location: Atlanta Georgia

PostPosted: Sun Aug 15, 2004 4:19 pm   
 
The best example involves travelling. In some cases after entering a room text will indicated that there is a delay before I can move onto the next room. I may also fall down.

Sending #ok on entering the room will just generate an error. If I know about the delay (round time in dragonrealms) or that I've fallen the script can respond appropriately. This information is always available (if it occured) by the time the game prompt appears.

example:

> go poplar

You lie down on the ground.
You slip on the damp poplar as you crawl across it, nearly sending yourself plunging into the river.
[Northwall Trail, Deadfall]
A tall poplar forms a natural bridge across the swiftly moving river, its roots still entangled in a great mass of deadwood on the western riverbank. A kingfisher perched on one of the silvered branches of the felled tree calmly watches the rushing waters for the glimmer of its next meal.
Obvious paths: down.
Roundtime: 5 seconds.
>

The room entry "[Northwall Trail, Deadfall]" occurs before the delay message "Roundtime: 5 seconds." but is made by the time the game prompt appears ">". Therefore it would be very convenient if the room entry trigger could be set to delay until the time of the room entry prompt.
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Sun Aug 15, 2004 5:16 pm   
 
I suppose you're referring to needing a pause while using the automapper. One solution is to set a mutlistate trigger such as:
Quote:

#TR {^Roundtime} {#PAUSE}
#COND {@roundtime=0} {#STEP} {exp}

You may need to put some qualifiers in there so that it won't try to pause every time you get a RT, but the form should give you an idea.

A specific example that I know for a fact works (because I use it) is for all the climbing on the island of Aesry. Unlike your example, you get a long pause (no rt) before the next room appears. My trigger for the automapper looks almost the same:
Quote:

#TR {You begin climbing} {#PAUSE}
#COND {You reach the end of} {#STEP}
_________________
.geniusclown
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net