Problem taking object from Actor


I have run into an issue which I’ve greatly simplified here. I have an npc that has a ring:

[code]startRoom: Room ‘start room’ ‘start room’

  • me: Actor;
    +npc: Actor ‘npc’ ‘npc’;
    ++ring: Thing ‘ring’ ‘ring’;[/code]

‘npc’ will be incapacitated in some way during the game at which point I want the player to be able to take the ring. For now, I just want to take it while I put that particular quest item on hold. There’s other stuff I want to address first. But when I try, I get the following:

Start room

The npc is standing here.

take ring

The npc won’t let you have that.

How do I get around this problem?




You need to overload checkTakeFromInventory method on the npc object to allow taking specific (or all) objects from the inventory of the NPC. Here are more details and examples: [url]]



Perfect. Thanks.