I need the PC to be able to crawl under a table. I’ve implemented the CrawlUnder action and created tableUnderside as a separate room. (This seemed more straightforward than trying to make a remapUnder subcomponent into a Booth.) Here’s the basic code:
[code]dobjFor(CrawlUnder) {
verify() {}
action() {
"Moving with care, you get down on your knees and crawl under the table.
tableUnderside: Room ‘Beneath the Table’
"Not much is to be seen down here, other than bits of trash… "[/code]
This almost works. But note that “
” at the end of the movement description. If it’s not there, there’s not enough vertical linespace between the output “Moving with care…” and the following room name (“Beneath the Table”). But with the “
”, there’s too much space. So how do I get the standard vertical spacing between the line describing the action and the following room name?
If I don’t use lookAroundWithin, the room name and description are not printed at all. It appears adv3Lite lacks a moveIntoForTravel method…
), \n and \b? I’m not at home right now so once again I don’t have a computer to try it out on, but if I get back before you reply, I shall experiment and edit this message accordingly.
EDIT: Now back home: a quick test suggests that using <.p> (rather than just
) does the trick.
Adv3Lite’s moveInto() is pretty much equivalent to adv3’s moveIntoForTravel(), and I’m 99.99% certain you wouldn’t get a room description with adv3’s moveIntoForTravel() either. If you want to move the playerCharacter and show the new room description with a single statement you could use:
tableUnderside.travelVia(gActor);
EDIT: Combining the two we get:
dobjFor(CrawlUnder)
{
verify() {}
action()
{
"Moving with care, you get down on your knees and crawl under the
table.<.p> ";
tableUnderside.travelVia(gActor);
}
}
I did something a little like this for a “hide and seek” type mini-game though quite a bit differently than above using Postures instead. Just make custom postures of (hiding behind, hiding under and hiding in), then it will show in the room description something more interesting. ex:
That’s a nifty idea, Draxxar. Presumably if the PC has the hidingUnderTable posture, an NPC would ignore him or her, but the PC would still be able to see the room. Of course, by default adv3Lite omits postures. I think there’s an extension for restoring them, but I haven’t needed it yet.