Game authors and players, please read this thread!

Author Topic: Problems with scripting on object- Visible - false  (Read 157 times)  Share 

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?

Iceboty V7000a

  • Local Moderator
  • * KILL* * KILL * * KILL *
    • Lifetime Achievement Award Winner
    •  
Re: Problems with scripting on object- Visible - false
« Reply #1 on: 21 Feb 2012, 01:13 »
This:

oKey.Visible = false;