Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: homelightgames on Thu 02/11/2006 17:41:04

Title: changing object properties from character script? [Solved]
Post by: homelightgames on Thu 02/11/2006 17:41:04
Is is possible to change the property of an object (in this case visibility) from a different room or character script?  Preferrably without the use of variables.

For this example I the situation is:  I need to remove an object after talking with a character.  The script is in the character properties.  I'd like to be able to do this without using variables or repeatedly_executes.

I'd also like to know if it's possible to change an objects property from a different room.

thanks everyone

visionmind
Title: Re: changing object properties from character script?
Post by: Khris on Thu 02/11/2006 18:07:17
There's a plugin/module called OtherRoom. A forum search for the name should point you to the download location.

Changing the state of an object in the current room from a character script is possible, current objects can be accessed from the global script by using object[X], so if the object was number 3, you could put object[3].Visible=false; in the character's script. Works with hotspots, too.
Title: Re: changing object properties from character script?
Post by: homelightgames on Thu 02/11/2006 18:46:04
That's exactly what I was wondering. 

Thank you very much KhrisMUC.

visionmind