Create a keycode lock
Moderator: Core Staff
Create a keycode lock
how would I make a keycode lock? similar to the one on ib_glass_v3
Re: Create a keycode lock
On my map I used this script, I've already forgot how to do the radiant part though so you would have to ask someone else about that.
Code: Select all
CombinationLock()
{
lockTriggers = getentarray("trigLock","targetname");
for(i=0;i<lockTriggers.size;i++)
{
lockTriggers[i] thread saveInput();
}
unlockTrigger = getent("trigUnlock","targetname");
unlockTrigger thread unlock();
level.code = "CODE HERE";
level.input = "";
}
saveInput()
{
for(;;)
{
self waittill("trigger",user);
level.input += self.script_noteworthy;
user iprintln(level.input);
}
}
unlock()
{
door_02 = getent("door_02","targetname");
for(;;)
{
self waittill("trigger",user);
if(level.input == level.code)
{
user iprintlnbold ("^7Password ^2CORRECT");
wait(0.10);
level.input = "";
wait(0.10);
door_02 moveX (-97,1.5);
door_02 waittill ("movedone");
wait(0.5);
door_02 moveX (97,1.5);
door_02 waittill ("movedone");
}
else
{
user iprintlnbold ("Password ^1INCORRECT");
level.input = "";
}
}
}
Partnered Channel:
http://www.youtube.com/user/RaCeY2k8
Tutorials:
http://www.youtube.com/TheTutGuyHD
Twitter:
http://www.twitter.com/RaCeY2k8
http://www.youtube.com/user/RaCeY2k8
Tutorials:
http://www.youtube.com/TheTutGuyHD
Twitter:
http://www.twitter.com/RaCeY2k8
Re: Create a keycode lock
Thanks for the script.
I tried the radiant part but kept getting these errors when activating the triggers
I tried the radiant part but kept getting these errors when activating the triggers
Re: Create a keycode lock
script is good!
make your keypad in radiant, then on every button place trigger damage!
place these values for the keys from 1 to 0
key = targetname
value = trigLock
key = script_noteworthy
value = 1
(for script_noteworthy value for every key on keypad put it's number 1 2 3 ...)
place these values for Enter key
key = targetname
value = trigUnlock
now, i don't know if you made a door and brush next to it and placed ORIG ORIG ORIG tool on that brush,
but that is what you need to make, then make the door and that ORIG brush script_brushmodel
and as i see on that first picture, for main problem, when you make a separate .gsc like that,
put main() instead of CombinationLock()
now it should work!
make your keypad in radiant, then on every button place trigger damage!
place these values for the keys from 1 to 0
key = targetname
value = trigLock
key = script_noteworthy
value = 1
(for script_noteworthy value for every key on keypad put it's number 1 2 3 ...)
place these values for Enter key
key = targetname
value = trigUnlock
now, i don't know if you made a door and brush next to it and placed ORIG ORIG ORIG tool on that brush,
but that is what you need to make, then make the door and that ORIG brush script_brushmodel
and as i see on that first picture, for main problem, when you make a separate .gsc like that,
put main() instead of CombinationLock()
now it should work!
Re: Create a keycode lock
Keycode should be random-generated on each map start. Those who use a constant keycode are noobs.
For my map, I provided two ways on getting to know the code to the sercret room. The first way was solving a quadratic equation, and the second one was doing a long strafe jump.
For my map, I provided two ways on getting to know the code to the sercret room. The first way was solving a quadratic equation, and the second one was doing a long strafe jump.
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Create a keycode lock
Not much of a secret if the password could be accessed by jumping. I would call it a bonus at most (the whole quadratic equation thing stinks of a form of unimpressive elitism).megazor wrote:Keycode should be random-generated on each map start. Those who use a constant keycode are noobs.
For my map, I provided two ways on getting to know the code to the sercret room. The first way was solving a quadratic equation, and the second one was doing a long strafe jump.
A password should not be created on the start of a level, the password should be created on-the-fly and should be attached per person. This stops people from sharing the solution and also allows you to create puzzles where the answers to each digit of password is given to those who suceed.
Very simple to implement and effectively impossible to crack on a live server.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: Create a keycode lock
Any secret will die sooner or earlier, unless you bind it to certain guids, but thats slightly a different thing.
Why not let only pro jumpers get to the secret room? It is fair, isn't it? As for my map, no one would solve equations, people would only try to access it by jumping. Quadratic equations turned to be too hard, even knowing that you could easily get the answer by googling. Any way, after someone entered the room, the code would change, so people who didn't have time to enter would have got to do that jump again. That system was much better than constant code in other jump maps.
Why not let only pro jumpers get to the secret room? It is fair, isn't it? As for my map, no one would solve equations, people would only try to access it by jumping. Quadratic equations turned to be too hard, even knowing that you could easily get the answer by googling. Any way, after someone entered the room, the code would change, so people who didn't have time to enter would have got to do that jump again. That system was much better than constant code in other jump maps.
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Create a keycode lock
I do not know what your area holds, so I cannot say if it is or is not fair.megazor wrote:It is fair, isn't it?
---
My take on what a hidden room should/could (+) contain and what it should not (-):
+ Credits, Images, Hidden Messages, Access to exta jumps, Soundtracks, Teleports
- Weapons, Kill switches, punishments to others
Bonus rooms should be accessible to anyone and should be accessible by completing a puzzle(s) or by finidng a hidden entrance and should not be GUID lockedor impossible.
Idea:
Map 20+ hidden (hard to find) locations on your map.
When map is started, a random 4 locations are unlocked (this stops players from simply going to the same locations).
The 4 locations provide a local message containing a character+digit to a code [A0].
Once all 4 are found the player can locate the enter pad.
This pad can provide an 'order' sequence using the letter characters. This forms the entrance code.
This is incredibly easy to code and forms a bonus that is both rewarding and challenging.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: Create a keycode lock
i used guided keypads before on my maps only for clan members, now i just put guided teleport, much easier!
and for secret room that everyone can enter i just make a non-colliding wall or something like that!
and for secret room that everyone can enter i just make a non-colliding wall or something like that!
Who is online
Users browsing this forum: No registered users and 5 guests