Spot the scripting error!

Started by ManicMatt, Fri 02/12/2005 17:45:58

Previous topic - Next topic

ManicMatt

If EGO has both items he will not find them again in the hotspot after shutting it, and opening it again.

  // script for Hotspot 1 (Hotspot 1): Interact hotspot
if ((player.InventoryQuantity[12] == 1) && (player.InventoryQuantity[13] == 1))

object[0].Visible = true;
object[1].Visible = false;
object[4].Visible = false;
return;
}

The game just appears to ignore the check and makes the items invisible.

Please advise! Is there something wrong with this scripting? If there are conditions afterwards on the interaction menu does it just ignore them?

SSH

You missed a "{" after the "if"...
12

ManicMatt

This appears to work, thanks!


// script for Hotspot 1 (Hotspot 1): Interact hotspot
if ((player.InventoryQuantity[12] == 1) && (player.InventoryQuantity[13] == 1))
{
object[0].Visible = true;
object[1].Visible = false;
object[4].Visible = false;
return;
}
}

SMF spam blocked by CleanTalk