You are now a dog: rulebook and inventory questions

Okay I’ve got a scene where the player winds up with paws instead of hands.

I’m struggling with two aspects of this. First I want all the inventory of the player to wind up on the ground. Here’s the latest attempt:

[code]Now the carrying capacity of the player is 1;
let ca be the list of objects held by the player;
say “[ca in brace notation]”;
let IListnum be the number of entries in ca;
repeat with IList running from 1 to IListnum:
Now the location of entry 1 of ca is the room enclosing the player;
rotate ca;

[/code]

I’ve tried various things to make this work. try drop all or try drop entry 1 of ca. didn’t work. Help?

Secondly I want to have a step of rules to govern the way the player interacts with objects with out hands but looking over the documentation I’m not how to toggle a rule book on or off. Or do I have build lots of instead rules that check the player’s dog status and then pass it back to the standard rules if the player isn’t a dog?

Thanks!

I’m not sure why you’re rotating ca when you’ve already got a repeat-loop. It’s simpler to do it this way:

let ca be the list of objects held by the player;
					say "[ca in brace notation]";
					let IListnum be the number of entries in ca;
					repeat with IList running from 1 to IListnum:
						Now the location of entry IList of ca is the room enclosing the player;

but there’s language to do this more quickly in any case:

now everything carried by the player is in the location of the player;

(I’m not sure what’s up with ‘enclosing’ here. You shouldn’t be able to do ‘the room enclosing the player’ - it should be ‘a random room enclosing the player’. But that turns out to always be ‘nothing’. Hm.)

Kinds of action are probably the way to do this.

Unlocking something with something is uncanine behaviour. Inserting something into something is uncanine behaviour. (etc, etc.)

Instead of uncanine behaviour when the player is doglike:
say "That's really not something you can do without opposable thumbs."

Thanks again. I knew there had to be a simpler way.

Not specifically apropos of your problem, but your general situation reminds me of another dog-protagonist Inform game, shared as source code: gamingafter40.blogspot.ca/2010/1 … -bugs.html

One way you can achieve this, if you have a relatively short list of things a dog can do, is this:

Instead of doing anything other than looking, examining, or going when the player is a dog: say "Woof."

You might also consider, rather than mutating the player object, having a separate dog-player to switch to.

This is sorta what I did. I had to use before instead of instead and a stop the action to prevent more specifically defined actions from taking priority.