Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Candle on Fri 09/12/2005 17:04:33

Title: ComboLock.Combination help
Post by: Candle on Fri 09/12/2005 17:04:33
I have this in the Player enters screen(before fadein)

ComboLock.Combination="96328";
I have in the
Ã,  // script for Room: Repeatedly execute
if ((ComboLock.Status() == eLockStatusCorrect) && (GetGlobalInt(300) != 1)) {
Ã,  character[EGO].ChangeRoom(32, 100, 50);
Ã,  SetGlobalInt(300, 1);
Ã,  }
else if ((ComboLock.Status() == eLockStatusWrong) && (GetGlobalInt(300) != 2))
SetGlobalInt(300, 2);
{


And on the htospots for each number I have
ComboLock.Press("1");Ã,  Ã, one thru 10
But it isa not working?
The other one I have is working but I have objects with it so I just deleted the objects part in this code .

if ((ComboLock.Status() == eLockStatusCorrect) && (GetGlobalInt(300) != 1)) {
Ã,  PlayVideo ("ug.avi", 1, 1);
Ã,  character[EGO].ChangeRoom(58, 100, 50);
Ã,  SetGlobalInt(300, 1);
Ã,  }
else if ((ComboLock.Status() == eLockStatusWrong) && (GetGlobalInt(300) != 2)) {
Ã,  object[5].Visible = false;
Ã,  object[4].Visible = false;
Ã,  object[3].Visible = false;
Ã,  object[2].Visible = false;
Ã,  object[1].Visible = false;
Ã,  object[0].Visible = false;
Ã,  SetGlobalInt(300, 2);
Ã,  }

Title: Re: ComboLock.Combination help
Post by: SSH on Fri 09/12/2005 17:19:40
In which way is it "not working"?
Title: Re: ComboLock.Combination help
Post by: Candle on Fri 09/12/2005 17:26:55
Well the room does not change/.
I even added the objects back to the was it was on the other lock but still will not go to the next room 32
Thats ok just went with this way.
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23541.msg291341#msg291341