Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: shaungaryevans on Wed 29/10/2008 11:53:27

Title: How to make a object appear by clicking a GUI button?
Post by: shaungaryevans on Wed 29/10/2008 11:53:27
I have built a question is my game but I have got a problem. I want it when you get it right a object appears in the same room. Can anybody explain to me how would i do this please?.
Title: Re: How to make a object appear by clicking a GUI button?
Post by: RickJ on Wed 29/10/2008 15:31:34
You just have to turn the objects Visible property on or off.


*** Room Script ***

String Answer;
String Correct;

function SomeFunction() {

   if (Answer==Correct) {
      oMyObject.Visible = true;
   }
}
Title: Re: How to make a object appear by clicking a GUI button?
Post by: shaungaryevans on Wed 29/10/2008 22:11:54
What do you mean by string. and do you put it in the Room or the GUI script please?
Title: Re: How to make a object appear by clicking a GUI button?
Post by: shaungaryevans on Wed 29/10/2008 23:15:12
Doesn't matter now. Done it myself