I have a problem with scripting an object. I want the object to dissapear upon interaction with it, and I want another inventory object to be added to the inventory.
// room script file
function oKey_Look()
{
Display("A key");
}
function oKey_Interact()
{
oKey.Visible - false;
player.AddInventory(iKey);
}
Thats the script and I get this error-message:
room1.asc(10): Error (line 10): PE04: parse error at 'oKey'
Anybody who knows what I am doing wrong?
// room script file
function oKey_Look()
{
Display("A key");
}
function oKey_Interact()
{
oKey.Visible - false;
player.AddInventory(iKey);
}
Thats the script and I get this error-message:
room1.asc(10): Error (line 10): PE04: parse error at 'oKey'
Anybody who knows what I am doing wrong?