Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Ludde on Tue 21/02/2012 00:26:20

Title: Problems with scripting on object- Visible - false
Post by: Ludde on Tue 21/02/2012 00:26:20
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?
Title: Re: Problems with scripting on object- Visible - false
Post by: Gilbert on Tue 21/02/2012 01:13:37
This:

oKey.Visible = false;