Conflict between PushTravelDir and asExit? (adv3Lite)

Before I email Eric Eve about this, I’d appreciate some input from others. Possibly I’m misunderstanding the situation. I have a little red wagon in my WIP, and I’ve got it working nicely, refusing to go up and down stairs, for example. However, if the player tries to pull the wagon in any direction that uses the asExit macro, I get a runtime error (nil object reference) at line 1074 of messages.t.

Hitting F5 in Workbench to start the game running again, I can see the result:
You pull the little red wagon (?) {the iobj}. There’s nothing over that way but more parking lot.
The second sentence is the one I wrote. The first one shows the library’s confusion.

Before I go through the whole blessed map and replace all of the asExit macros (probably 150 of them) with a TravelBarrier, I figured I should ask if anyone has encountered this and has a solution to suggest.

On closer inspection, if the asExit points to a real TravelConnector, there’s no problem. It only causes an error when the direction is simply a tidy substitute for “You can’t go that way” – for instance, something like, “Do you really want to confront those rabid Rottweilers?”

I’ve let Eric know about the problem, but if you happen to run into it and need a solution, there’s a workaround. (1) Write a TravelBarrier object. (2) Make the direction a TravelConnector. Here’s how:

junkyardBarrier: TravelBarrier
    canTravelerPass(t, c) { return nil; }
    explainTravelBarrier(t, c) {
        "Do you really want to confront those rabid Rottweilers? ";
    }
;

And then, among the room’s exit directions, this:

northwest: TravelConnector {
        isConnectorListed = nil
        destination = nil
        travelBarriers = junkyardBarrier
    }

isConnectorListed=nil will cause the exit not to be shown in the top bar of the interpreter, which is what you will probably want with this type of non-navigable direction.

1 Like

an interesting question, what if your beloved little red wagon is filled with bones, and pushed in the direction of the rottweilers ? That is, this bug can prevent solid solving, as above, where pushing the cart toward the travelBarrier removes said barrier, and the travelBarrier is mapped as an asExit ?

Best regards from Italy,
dott. Piergiorgio.

Jim, what a3Lite version you are using ? the 1.5 stable (in the IF Archive) or the 1.6 beta ?

from 1.6ß’s changelog:

" Fixed bug that could make an actor get out of a vehicle before travelling to a new location (instead of travelling in/on the vehicle). Note, however, that this fix does not change what happens in response to commands like ENTER that might trigger travel but are not themselves travel commands; in such cses the actor will still leave the vehicle (since this is probably the most sensible default). If you want to change this behaviour for a particular vehicle (say a bike that can be ridden into a wood in response to ENTER WOOD) the simplest way to accomplish it is almost certainly via a Doer"

perhaps is related to your issue ?

Best regards from Italy,
dott. Piergiorgio.

I’m using 1.5, but with a couple of the changes in 1.6, which Eric sent to me in emails. I was sending him reports about one or two things and he was making changes in the beta. For instance, I suggested that he add tall (list) inventory to the library, he sent me the code, I spotted an issue with it and reported it to him, and so on. Same deal with pulling the wagon. That’s working fine now, but I don’t remember exactly what changes he implemented. So I guess you could say I’m using 1.5(6).