Hello, and good day to you all. I'm wondering if it is possible to toggle an object's visibility from within a character's script. My first effort was this:
// script for Character 2 (man): Talk to character
oThing.Visible = false;
When I try to test the game, I receive the following error:
"Error (line 408): Undefined token 'oThing'"
I presume this is because the object in question isn't local to the character script. Perhaps there's a way to call a room function from within this character's script, and then change the object's visibility from the room script?
If the character is only ever in one room, you can just use object[WHATEVERNUMBER].Visible
And there's CallRoomScript(); (http://www.adventuregamestudio.co.uk/manual/CallRoomScript.htm)
And you can check the current room using player.Room (http://www.adventuregamestudio.co.uk/manual/Character.Room.htm).
Great, that works perfectly. The script now uses a player.Room check, then sets object[number].Visible = false. I'm going to mess with CallRoomScript() as well, I'm sure that will come in handy in a lot of situations. Thanks for the help, I wasn't having any luck finding answers to that question via the usual means.