I have several questions that are all related to implementing a dog in my game.
First question. This is maybe more general. I have
A canine has a thing called item of interest.
which is used to keep track of something the dog is interested in interacting with. But there are times when I want to clear it, like:
After a canine (called the dog) taking something:
now the item of interest of the dog is nothing;
continue the action.
But I get “*** Run-time problem P60: Attempt to set a variable to the wrong kind of object: you wrote ‘now the item of interest of the dog is nothing’, which sets the value to nothing - but that doesn’t have the kind ‘thing’.”
How do I clear a variable like that?
Second question. Making special persuasion rules. A dog can only carry one item at a time. So I want a command like “Dog, drop it” to work. However Inform makes strange inferences about what it refers to, and I can’t figure out how to change that. For the record, a command like “Dog, drop stick” works fine. Also, is there an
Third question. Again with inferences. If I type something like “Dog, sit” it will sometimes say
>Dog, sit
(on the dog)
The dog is unable to do that.
A message like there is nothing to sit on or asking what the player wants the dog to sit on would be appropriate. But I don’t understand why it would assume I’m asking the dog to sit on itself. I think it will do this if the dog is the only thing in the room but it’s still strange.
Fourth question. I understand that procedural rules are deprecated. Is there a simple way to do this that doesn’t use procedural rules?
A procedural rule while taking a small canine:
ignore the can't take other people rule.
Also, are there things I should take into consideration about carrying a person, or issues that I should be aware of?
Fifth question. What’s the best way to change text like “The small brown dog arrives from the inside.”? I’d like it to say something more like “The small brown dog arrives from inside the shack.” or “The small brown dog comes out of the shack.” But I want different messages depending on the area “arrives from inside the shack”, “arrives from inside the mausoleum”, etc.
Sixth question. Is there a way to set a rule that occurs after a successful persuasion? Basically what I want is for the dog to skip its next action after being persuaded to do something but I need to set a variable after persuasion and the action succeeds. I tried stuff like
After a persuasion with a canine (called the dog) is successful:
but that didn’t work, or I didn’t hit on the right phrasing.