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,
John