how to trigger a room description?

Post Reply
kakku
Posts: 42
Joined: Tue Feb 22, 2011 12:03 pm

how to trigger a room description?

Post by kakku »

how do i grab the room description part from the following:
Middle of a Wide Boulevard
This is the middle of a wide boulevard that runs east and west across Caemlyn.
The boulevard is bisected by a strip of grass and a row of trees which run its
length. The sheer noise of crowded Caemlyn is overwhelming, almost a dull
roar. To the north is a paved road which leads into the Inner City. To the
south is an open square and a cluster of shops.
[ obvious exits: N E S W ]
An oil lamp, set in a steel cage, hangs from a high wooden pole.
A wild stallion bucks madly, being ridden by you.
i know how to get the room title, but the description doesnt have anything specific to trigger on.
only thing stable is that it is between the room title and the room exists..

anyone any idea how to do this?

User avatar
Omit
Posts: 190
Joined: Sun Aug 01, 2010 10:54 pm
Location: Middle Earth
Contact:

Re: how to trigger a room description?

Post by Omit »

need a multi-line trigger.... capture the room title.... capture all lines... capture exits and turn off the trigger.... (I think multi-line triggers are explained in the manual.... is simaliar to capturing comm messages... like in the tabed chat example that is posted on the forums.)

Yetzederixx
Posts: 186
Joined: Sun Nov 14, 2010 5:57 am

Re: how to trigger a room description?

Post by Yetzederixx »

Omit's correct you'll need a multi-line trigger.

First trigger off the room name, hopefully it's colored and you can check the color somehow. I'm not familiar with the process so maybe someone else can explain that. Make it multi-line for....10-20? lines. This will also need to enable the next sub-trigger.

Next make your sub-trigger for the room description text, depending on what you are trying to do.

Lastly, make a sub-trigger off the exit line to disable the previous sub-trigger, and do anything else you want it to do.

Unless you're mud has a specific number of lines in all their room description you'll need to toggle the middle trigger on and off I believe, if not I have no idea how to do it.

kakku
Posts: 42
Joined: Tue Feb 22, 2011 12:03 pm

Re: how to trigger a room description?

Post by kakku »

i think the problem is that i cant see clearly what im doing.
Screen shot 2011-02-28 at 5.13.23 PM.png
i cant see the line delta. how do i change the size of that thing ??

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: how to trigger a room description?

Post by Heiko »

1. Get the very latest MAC snapshot of the Mudlet-2.0-rc series. The invisible line delta thingy on some Mac books should be fixed there if I remember correctly.

2. In your case you don't know the exact line delta i.e. you don#t know how many lines the room description has. You could simply set up a high enough line delta and let the multi state machine do the magic. However, you shouldn't use insanely high line deltas here because the state machines will create a ton of unnecessary partial match states and that'll slow things down at some point. Use reasonable values if possible. This is an OK solution normally, but not ideal in this very case because you hit a lot of room descriptions when playing and thus get a ton of superfluous partial match states as you need to chose a very high line delta to make up for very long room descriptions.

A better solution in this very case is to use an auto closing trigger chain. You set up your room description trigger conditions as a trigger chain and allow access to the chain until the next condition is reached (-> high value on "fire length" to cater for the longest possible room description). Once the final condition is fulfilled you close the chain (->setTriggerStayOpen()).

Iocun
Posts: 174
Joined: Wed Dec 02, 2009 1:45 am

Re: how to trigger a room description?

Post by Iocun »

The line delta bug isn't fixed in the 2.0 snapshot for me. You can still set it however:
- Check the multiline/AND checkbox.
- Right click on the small white line that's supposed to be the line delta field.
- Click on "Select All". The contents of the box are now selected, even if you can't see it.
- Then enter your desired number with your keyboard.

That sets your line delta, even though you don't see it. If you want to check what the field contains, again right click, Select All, rightclick again and "Copy" (or command+C) and then paste it to somewhere else to see what the field contains. Quite tedious, but at least it works.

Post Reply