Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Sun 09/11/2003 20:49:52

Title: Help with a room.
Post by: on Sun 09/11/2003 20:49:52
I want to make a room where a pad with numbers is showed and you must put a combination of numbers in order to open de door. How can i do this?
Title: Re:Help with a room.
Post by: on Sun 09/11/2003 21:13:47
Have hotspots on the buttons, set up with anyclick or interact with and then run script

on the first one put:

if (button==0){
PlaySound (");
//Do stuff
button=1;
}
else {
Display ("thats not right");
}

then on the second make sure the button ==1 and so on....
Make sure to declare the int button at the very start of the room script like this

int button;

That should work, seems to simple though....maybe I'm missing something...
Title: Re:Help with a room.
Post by: Ishmael on Mon 10/11/2003 05:56:48
See teh demo game... see it throuhg big time...