Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: Ashen on Sat 03/12/2005 16:55:59

Title: MODULE: Hotspot ComboLock
Post by: Ashen on Sat 03/12/2005 16:55:59
MODULE: Hotspot ComboLock
by Nik 'Ashen' Mallon.


Yet another Passcode Lock Module, specifically designed to use hotspots and objects, rather than a GUI. A module-ified version of the code I posted in this thread (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23748.0), partially based on SSH's Combination Lock Keypad (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23566.0) module, and compatible with both 2.7 and 2.71 (as far as I can tell).

Everything should be explained in the README, let me know if it isn't (documentation isn't my strong suit).

Example:

// room script

function room_a() {
  // script for Room: Player enters room (before fadein)
  HotspotLock.SetCode(1,9,7,9, 5,0);
}

function hotspot1_a() {
  // script for Hotspot 1 (Hotspot 1): Any click on hotspot
//Button '1'
  HotspotLock.EnterCode(1);
}

function hotspot2_a() {
  // script for Hotspot 2 (Hotspot 2): Any click on hotspot
  //Button '2'
  HotspotLock.EnterCode(2);
}

// Etc, etc ...

function hotspot12_a() {
  // script for Hotspot 2 (Hotspot 12): Any click on hotspot
  // Button 'Enter Code'
  if (HotspotLock.CheckCode() == eCodeCorrect) {
    //Code entered correctly
    Display("Well Done!");
    player.ChangeRoom(10, 120, 200);
  }
  else if (HotspotLock.CheckCode() == eCodeWrong) {
    // Wrong code entered.
    Display ("Code Invalid");
    HotspotLock.ResetCode();
  }
}


Download here:
Hotspot ComboLock Module (http://www.geocities.com/whoismonkey/HotspotCombLock.zip)
Title: Re: MODULE: Hotspot ComboLock
Post by: jamesreg on Wed 04/11/2009 18:25:31
I tried to download this but it says invalid archive tyoe or bad file when I try to open it.

I have a combination lock sequence I need to do which will involve using hotkeys
I will have a six digit code as the combination a player will be clicking on color coded hotkeys
to enter the sequence once they have clicked all six color buttons in the right order they will
hit a seventh button to test if the code was right or wrong and then the resulting action will happen.

It looks like your hotspot thing will work here but I could probably code it without a module

based on what I said here how would you do it or could you point me in the right direction
of another module or thread that might work there seems to be several out there but I been confused
about this part.
Title: Re: MODULE: Hotspot ComboLock
Post by: monkey0506 on Thu 05/11/2009 04:45:03
Geocities got eaten by a Vermicious Knid I believe. ::)

If Ashen (or someone else) doesn't respond with a mirror/updated link in the next few days it might be worth PMing him and ask if he still has a copy of it. It's also been since 2005 so there is also the possibility the module may be out of date and could potentially not work. Never used it so I don't know for sure, but just something to keep in mind.

Good luck.
Title: Re: MODULE: Hotspot ComboLock
Post by: TerranRich on Thu 05/11/2009 07:41:41
Geocities was shut down by Yahoo. It would be sad if Geocities-hosted AGS files were just gone.

Use ShutUpload (http://shutupload.com) to upload files, guys. ;) I own and run it, and it's unlimited.
Title: Re: MODULE: Hotspot ComboLock
Post by: Dualnames on Fri 06/11/2009 08:49:45
Quote from: monkey_05_06 on Thu 05/11/2009 04:45:03
Geocities got eaten by a Vermicious Knid I believe. ::)

If Ashen (or someone else) doesn't respond with a mirror/updated link in the next few days it might be worth PMing him and ask if he still has a copy of it. It's also been since 2005 so there is also the possibility the module may be out of date and could potentially not work. Never used it so I don't know for sure, but just something to keep in mind.

Good luck.

Always know where your modules are. I have probably a list of all the modules on the forums, so yes, I do have a linky, so wait up, till i fetch it eh!