Trouble modifying the 'drop' action

Hi, in the game I’m making I have a banner window that displays a player inventory. When the player picks up an item, the inventory reflects this with a relevant graphic.

I’ve written some code to modify the ‘drop’ action so that the graphic for the inventory reflects this but it is not working and I can’t figure out why!

Can anyone please help? I can’t see anything wrong with the code but when I drop the key in-game the inventory graphic does not update:

modify DropAction execAction() { switch(gActor.getDobj) { case cellKey: inventoryWindow.updateContents('<img src="img/emptyInventory.jpg">'); break; default: "You drop it on the floor at your feet."; break; } } ;

Thanks for your help,


I use adv3Lite exclusively and am not that conversant on adv3 library conventions, but don’t you need a current command argument in the execAction() call? Like i[/i]…

execAction(curCmd) { ...etc. }


You don’t say exactly what problem you’re having, but shouldn’t you have a call to inherited() in there? If you do it this way, I would expect the player to be unable to drop anything, ever. I haven’t tested this – I’m guessing.

BTW, Jerry is guessing wrongly. execAction () takes no argument in T3.