ja klar, weiss jetzt zwar nicht genau was, du mit InventoryOn meinst, aber sowas funktioniert:
if (player.ActiveInventory == ikostom)
{
..
player.LoseInventory(ikostom);
}
das konstrukt was du da hast, würde aber normalerweise umgedreht angwendet werden, so in dieser richtung:
if(UsedAction (A_USE_INV))
{
if (player.ActiveInventory == ikostom)
{
player.LoseInventory(ikostom);
}
else if(player.ActiveInventory == iente)
{
player.LoseInventory(iente);
PlaySound(43);
}
else Unhandled();
}
else if(UsedAction (A_OPEN))
{
}