Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: SSH on Thu 17/11/2005 16:59:38

Title: MODULE: Combination Lock Keypad v1.01 (new dl site)
Post by: SSH on Thu 17/11/2005 16:59:38
I feel prolific, oh so prolific, I feel witty and prolific and straight....

Here's another module from my mighty pen, for doing combination locks.

Very simple: Download, read the readme, import the GUE and module and Bob's your builder:


// room script

function room_a() {
  // script for Room: Player enters room (before fadein)

  ComboLock.Combination = "1337";
  gKeypad.Centre();
  gKeypad.Visible = true;

}

function room_b() {
  // script for Room: Repeatedly execute

  if (ComboLock.Status() == eLockStatusCorrect) Display("Woot!");
  else if (ComboLock.Status() == eLockStatusWrong) Display("You die!");

}


Download here (http://ssh.me.uk/modules/ComboLock.zip) (Requires AGS v2.71!)
Documentation (http://ssh.me.uk/moddoc/ComboLock)
Download here (http://www.lumpcity.co.uk/~ssh/ComboLock.zip) (Requires AGS v2.71!)
Mirror (http://www.2dadventure.com/ags/ComboLock.zip)

Title: Re: MODULE: Combination Lock Keypad 1.0
Post by: Candle on Thu 17/11/2005 17:34:49
Wow great, going to look at it right now.
Sorry to bug you but how would you use it with hotspots?
Title: Re: MODULE: Combination Lock Keypad 1.0
Post by: SSH on Thu 17/11/2005 19:32:16
Candle: For the hotspot for button marked "1" you'd make its interaction do:

ComboLock.Press("1");

etc for button 2, 3, 4. Combinations can be letters instead of numbers if you prefer...
Title: Re: MODULE: Combination Lock Keypad 1.0
Post by: Candle on Thu 17/11/2005 21:42:26
Thank you SSH I got it working now . this is better then sliced bread.
Anyway to fix this? with it in the  // script for Room: Repeatedly execute
When it plays the sound 4 it keeps playing it and it did the samething with the woot? had to Alt+x to quit the game as it was in a loop with the woot or sound?
if (ComboLock.Status()==eLockStatusCorrect) Display ("Woot!");
else if (ComboLock.Status()==eLockStatusWrong) PlaySound(4);
Title: Re: MODULE: Combination Lock Keypad 1.0
Post by: monkey0506 on Fri 18/11/2005 03:57:32
It looks like the Status() function is returning the same value repeatedly causing the code to be run over and over.

Try setting and checking a global variable:

if ((ComboLock.Status() == eLockStatusCorrect) && (GetGlobalInt(300) != 1)) {
  Display("Woot!");
  SetGlobalInt(300, 1);
  }
else if ((ComboLock.Status() == eLockStatusWrong) && (GetGlobalInt(300) != 2)) {
  PlaySound(4);
  SetGlobalInt(300, 2);
  }


Then in the code for the interaction you may want to put:

SetGlobalInt(300, 0);

I hope this helps (Seeing as I should be doing my English homework and then going to bed).
Title: Re: MODULE: Combination Lock Keypad 1.0
Post by: Candle on Fri 18/11/2005 04:15:53
Thanks , that worked .
Title: Re: MODULE: Combination Lock Keypad 1.01
Post by: Maverick on Wed 30/11/2005 19:41:37
Great module but unfortunately it doesn't solve the issue I'm stuck with.
Thanks!
Title: Re: MODULE: Combination Lock Keypad v1.01 (new dl site)
Post by: Ruben654 on Mon 27/04/2009 19:46:27
how you use the gue file
Title: Re: MODULE: Combination Lock Keypad v1.01 (new dl site)
Post by: Trent R on Mon 27/04/2009 21:26:19
Gue files are old, so you need to do a few steps:

1)load it into 2.72
2) upgrade the project to 3.1
3) (if needed) export to .guf file


~Trent
Title: Re: MODULE: Combination Lock Keypad v1.01 (new dl site)
Post by: HaReL on Fri 22/05/2009 14:35:27
Hi.
Can you tell me how to export the moudle?
I upgraded it from 2.72 to 3.1.2, but I didnt understsand how to export it..
(when you said "load it into 2.72" you meant to open it inside a game, and then upgrade the game. right?)

Thanks alot...
Title: Re: MODULE: Combination Lock Keypad v1.01 (new dl site)
Post by: strangeDetective on Wed 02/11/2016 14:36:29

I tried to download this module but they're all dead links. I'm trying to find a module where I can implement a password/combo lock/dial phone type puzzle using the latest version of AGS. Was hoping to find a module I could try to adapt, rather than code one from scratch, as I'm not that familiar with the intricacies of scripting yet.

Ideally, I'd like a GUI with buttons to pop up, player enters a sequence of correct letters/numbers and it runs a script. I looked for a telephone module and/or a combo-lock passcode module and this link was all I could find. Does anyone know of a place where I can download this, and will it work in the latest version of AGS?
Title: Re: MODULE: Combination Lock Keypad v1.01 (new dl site)
Post by: Snarky on Wed 02/11/2016 21:24:32
There seems to be an active link here: http://americangirlscouts.org/agsresources/modules.html

(The module is pretty old, though, so no guarantees that it'll work with the current version of AGS without modification.)