Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Keypad Script (Kinda like xplosys', but more complex!)

Author
Message
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 26th Nov 2006 00:03 Edited at: 26th Nov 2006 00:04
What's funny is I didn't even realize xplosys did one until I went to post this

The advantage mine has over his though is (despite being more complicated) you can enter the wrong number and it will reset It will do 4 numbers which you'll have to configure, and you'll have to edit several things about the script so this isn't exactly noobie-scripting. I'll post the script and a How-To-Use it later (or prehaps just e-mail it to people who I think deserve it, since I rarely get any comments ) but for now check out the video I made

EDIT: Also, when you get the right number, it plays the entitiy's first sound (Sound 0) and when it is wrong it plays the entity's second sound (Sound 1)

Attachments

Login to view attachments
Unknown Truth
19
Years of Service
User Offline
Joined: 16th Feb 2005
Location: Hell
Posted: 26th Nov 2006 00:07
that's awsome but do you need empty's mod to run it?

The truth is still unknown... or is it!
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 26th Nov 2006 00:17
that's awsome but do you need empty's mod to run it?.

I doubt it. Airslide is an RC1.04 man!

Airslide, can I get a copy of this? I wouldn't mine making a Emptys Version for it. Keypads are something I've meant to get around to programming, but never have...

Thanks for putting in the effort and doing something for the community.

Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 26th Nov 2006 00:25
Butters is right! It's all about 1.04 now!

@Butters: I'll send you the script as soon as I finish my mini tutorial on making a camera spawn guards, I already put together the script and everything. All you really need to do I think is change the 'scancodekeypressed' command to whatever Empty's mod uses.

filya
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location: USA
Posted: 26th Nov 2006 02:02
oh wow Airslide! This is nice!
But I do hope TGC gets the update out of beta soon, since I am a little hesitant towards using the updates right now.

-- game dev is fun...but taking up too much time --
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 26th Nov 2006 02:20
Again, yet another extremely useful script! Could I also place this one in the guide?


Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 26th Nov 2006 03:49
Erm - what is there to put in the guide? It's a video, I haven't yet released the script

Silent Thunder
18
Years of Service
User Offline
Joined: 6th Feb 2006
Location: The Ship
Posted: 26th Nov 2006 04:19
wow, sweet script, nice work!

Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 26th Nov 2006 04:28
I've decided it will be part of my Free Script Pack Beta 4, which will come out sometime later this week (or next week)

Silent Thunder
18
Years of Service
User Offline
Joined: 6th Feb 2006
Location: The Ship
Posted: 26th Nov 2006 05:07
I never even saw a "Beta 3" though.

MK83
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN
Posted: 26th Nov 2006 05:42 Edited at: 26th Nov 2006 05:42
Silent Thunder, Go to the showcase forum, I did the same thing.


http://www.mk83productions.com http://www.freewebs.com/mk83
Silent Thunder
18
Years of Service
User Offline
Joined: 6th Feb 2006
Location: The Ship
Posted: 26th Nov 2006 05:51
really?

I looked all over it, Airslide mentioned it but I couldn't find it anywhere. Oh well, it doesn't matter, ill wait for Beta 4.

Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 26th Nov 2006 06:33
In the Showcase, it's Airslide's Script Pack (Or AI pack, whatever I called it)

Credz_42
17
Years of Service
User Offline
Joined: 26th Nov 2006
Location: in front of the comp
Posted: 12th Dec 2006 14:49
looks kool airslide

p.s wots up with the link to your stargate tribute game can't get site to load up
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 18th Dec 2006 05:43
I've decided to release the script. As you can see, there is a bit of work involved for diffrent combos:



When you give it to an entity, make Sound0 the sound it plays when the user presses the right key, and Sound1 the sound it plays after the wrong key.

@Crexz_42 - My webhost is down, I'm getting a new one and I haven't transfered yet.

Locrian
19
Years of Service
User Offline
Joined: 21st Nov 2005
Location: Burton Mi.
Posted: 18th Dec 2006 07:04
Nice Airslide. I don't normaly come to this section of the forum so I wanted to make sure and say thanks now.

Great work man.
Loc
Candle_
18
Years of Service
User Offline
Joined: 29th May 2006
Location: kindergarten
Posted: 18th Dec 2006 08:12 Edited at: 18th Dec 2006 08:12
Thanks Airslide for releasing the script,


DJ Professor K
18
Years of Service
User Offline
Joined: 19th Dec 2005
Location: Somwhr in front of a brokn kyboard.....
Posted: 18th Dec 2006 15:07
Interesting, really interesting.

Congratz on another great job.

My love is seperated in 2 parts, 1 of them is 3ds Max 7, the other; FPSC.
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 18th Dec 2006 15:54
No problem

For those who don't get it here, my next script pack will probally have a special version with more instructions to set it up.

Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 18th Dec 2006 18:28
:state=500:state=2
:state=2,scancodekeypressed=49:state=500
:state=2:state=3

I hate numerics...

Okay, you have a 'sound' therom... just list every scancode there is and then return if it is NOT the correct one... However, you are overusing the scancodekeypress's, just have them and reset activate at the end.

basically, if state=correct then incstate
if state != correct then terminate state

:state=11,scancode:activate=1,incstate
:activated=0,scancode:state=0

::activate=0


although, I ask, wouldn't NOT having a 'while pressed' loop cause problems?

If you fear speaking for yourself, make use the words of others while discovering your own voice.
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 19th Dec 2006 00:26
The problem I see with your idea is that if the user doesn't immidently press the right button next (which is, needless to say, nearly impossible) it would reset.

s4real
VIP Member
18
Years of Service
User Offline
Joined: 22nd Jul 2006
Location:
Posted: 19th Dec 2006 05:26
Nice work on the script Airslide and thanks for the release, welcome to my world of no comments.

Best s4

Im a wizz at texturing toilets
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 19th Dec 2006 05:50
Ya, I've started to get used to that.

Too bad we can't have a new forum feature that only enables the download if you post, then we'd have hundreds of comments

Thraxas
Retired Moderator
18
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 19th Dec 2006 23:13
Thanks Airslide...

'Dawn of the Fallen Angel' coming soon(ish)...
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 19th Dec 2006 23:29
Quote: "Too bad we can't have a new forum feature that only enables the download if you post, then we'd have hundreds of comments "


Yeah, I can see the posts now.....

tks
yo
ty
lol
t

And probably some not so nice for making me post. lol

I'm sorry, my answers are limited. You must ask the right question.

Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 19th Dec 2006 23:59
Another great script from another great scripter! And of course I'm going to ask... Can I include it?


Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 20th Dec 2006 00:14
Nickydude - In your guide? Sure.

Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 20th Dec 2006 00:15
Yes, Thanks and... done


Swhale aka The FPS Creator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: My computer chair, no zip code sorry
Posted: 20th Dec 2006 18:18
Thank you AirSlide, much appreciated!

Your signature has been erased by a mod because it's larger than 600x120
Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 21st Dec 2006 06:00 Edited at: 21st Dec 2006 06:01
Quote: "The problem I see with your idea is that if the user doesn't immidently press the right button next (which is, needless to say, nearly impossible) it would reset."


no it wouldn't... ahh, saw your key pressed loops in there.

If you fear speaking for yourself, make use the words of others while discovering your own voice.
Mr Makealotofsmoke
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: BillTown (Well Aust)
Posted: 24th Mar 2007 04:22
sorry for the bump but did you ever release the script pack 4 with a tut??

once again, sorry for old therd bump


flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 26th Mar 2007 04:11
hey. uh . airslide. are you still making the decal maker?


"these shoes are 300 hundred dollars"-Shoes by Kelly http://smallgroup.be/
Arska
18
Years of Service
User Offline
Joined: 28th Jul 2006
Location: Finland
Posted: 26th Mar 2007 18:07
I make them. But for both of number series of keyboard.

Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 28th Mar 2007 00:59
Quote: "I make them. But for both of number series of keyboard."


Huh? You mean you made another version to use both sets of numbers? I specificly didn't do that - you would be switching weapons as you put in the code.

Quote: "hey. uh . airslide. are you still making the decal maker?"


Yes....slowly....

Quote: "sorry for the bump but did you ever release the script pack 4 with a tut??

once again, sorry for old therd bump "


The script pack is still WIP, though I don't remember mentioning a tut. Of course, I could do one anyways. I've been away from FPSC for awhile and it may take awhile for me to get back in, so most of my stuff if either going really slow or is on hold.

Mr Makealotofsmoke
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: BillTown (Well Aust)
Posted: 28th Mar 2007 11:28
Quote: "For those who don't get it here, my next script pack will probally have a special version with more instructions to set it up."


Quote: "I'll post the script and a How-To-Use it later"


i thought u meant a tut, whoops
well its close enough

Your signature has been erased by a mod because it's larger than 600x120
DOMRAY
20
Years of Service
User Offline
Joined: 5th Aug 2004
Location: boston
Posted: 28th Mar 2007 14:23
nice work ty vm


It's better to Burn Out than to Fade away.Victor Kruger/The Kurgan
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 16th Apr 2007 22:31
I couldn't thank xplosys for his original script because the thread was locked, however, I will do so here as well as a big thanks to airslide. I was just about to revise xplosys' script when I decided to check out the subject again and found this. Exactly what I wanted to do -- a reset if wrong key pressed. Thanks saved me some time.

I do have a question -- not regarding this script -- but the fact that even using the keypad, if there are more than one weapon taken or picked up, it will change weapons when the corresponding number is pressed. Now the question. Is there a way to disable this? Or is this hard-coded in the engine? I tried looking to see if this was available to revise in one of the many "init" fpi's for game play but couldn't find it. Just the kepresses for player navigation. If not possible, then this is just one more thing to add to my ignore list of annoying fpsc quirks. Oh, BTW, I just wanted to revise it so that the keypad doesn't do that but the top row of the keyboard will still be available for changing weapons. Not everybody has a wheel on their mouse for doing that.

As opposed to Highlander.
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 17th Apr 2007 02:44
It already uses the keypad on the right of your keyboard. Thought that out ahead of time

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 17th Apr 2007 05:23
Airslide, when you use the keypad on the right of the keyboard in your games, do your weapons become selected on each press of a numeric key? For example, I have an access code of 7346. When I pressed the 3 and 4 the weapon would pop up which was assigned to those numbers. I would just as well not have them pop up but can't find a way to prevent it from happening. I guess that was my question.

As opposed to Highlander.
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 17th Apr 2007 06:17
Did you try num-lock?

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 17th Apr 2007 06:37
Hmmmm? Let me try that. Numlock is always on for me so I assume you probably mean turning it off.

As opposed to Highlander.
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 17th Apr 2007 07:00
40+ years of Main Frame experience and 30+ years PC experience. I am ROFL at myself. Thanks airslide, turning off numlock works. Will have to make sure I get it into my game instructions.

As opposed to Highlander.
incense
18
Years of Service
User Offline
Joined: 25th Nov 2005
Location:
Posted: 7th May 2007 18:06 Edited at: 7th May 2007 20:53
Airslide,

I have read all posts in this thread. I have been trying to get the key pad script to function. you said that it used 4 numbers for the combo. I looked at the script and there is only three numbers for the combo, they are "347". I added a door to a level and gave it the key pad script for the main. I tried to open the door using "347" and the sounds played that said I used the right combo. The door did not open. I have the "Num Lock" turned off. I have V105RC2 installed. Were there changes that dont allow the script to run anymore?

Edit:
Duh!!

I applied the script to the door and not a switch. Now I have applied to a switch and it works great.

Im still confused about the combo though.

I only see 3 numbers for the combo in the script "347" where does the "1" come in?

I like the voodoo you do well.

Edit the sequel:
Stared at the script for a while and it came to me.
I know now where the 1 comes into play. AWSOME!!!

Thanks a million.

Now all I have to do is figure out how to change the combo. That will take a long while by the look of it. I tried to change the first number in the combo and it rendered the rest of the numbers useless.

It seems that the following should make the combo 1202. I got a tone that said that the first number was right. The other numbers made no tones and the door did not open.



I have tried several combonations and only "3471" seems to work.

Any thoughts on this?


Edit:
Once again I sat and stared at the script and the answer came to me. I can now change the combo.

Superb work Airslide. I love it!!

The person that now knows the most started with many questions. Patients and tolorance are the keys to the passage of knowledge. FPSC is Getting better. Now if we can just keep the ball rolling.
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 8th May 2007 01:08
Glad you like it. And glad you figured out how to change it in 3 edits

MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 11th May 2007 10:18
Hey Airslide, I just thought of something to add.
It would require a few extra huds to be made, but I think it would be a good idea, especially if your level has more than one keypad, or if the keypad is a long way away from the piece of paper.

Ok.
Make the piece of paper pickupable and make it so it is the switch's key (change the hud from "you picked up a key" to "you found a keypad code").

Now, If you walk up to the switch and don't have the code, It should just show a picture of the keypad. If you walk up and you DO have the code (using plrhaskey) then it would show a picture of the keypad with the code ontop.



You would need the "picked up code" hud
A "not found key" hud
A "found key" hud

The found key hud would just be the not found key hud with a piece of paper just above it .

I may bother to script this sometime soon, but I only woke up about 3 minutes ago.


E.D.

Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 11th May 2007 16:51
3 minutes and you're on the computer? Takes at LEAST half-an-hour before I'll get on/can get on...lol

Anyways, sounds interesting, though I don't have alot of time to do it. You can if you like, and if you do please post it here for me to see

MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 11th May 2007 17:04
Ok.... I just need to ask some thing....

If I put a "state 500" line, would that be constantly running or not??

Because I've seen a few codes that seemed to have single digit, double digit etc., and I wandered how that worked.

Because I don't fancy adding the show hud command to every single line in the script :?.

E.D.

Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 12th May 2007 01:00
'state=500:' would only run if the state is equal to 500...I'm guessing that's not what you want. For each section (each block of code) you'd need something like this (this is for the first block):



You have to have that in each block, but not for each digit entry. That clear enough?

MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 12th May 2007 10:07
Yeah that's cool, thanks.

I'll start working on that once I've woken up (I'm sleep-typing right now )


E.D.

Jock
17
Years of Service
User Offline
Joined: 14th May 2007
Location: UK
Posted: 15th May 2007 01:05
Love the script . Only got FPSC a couple of days ago...the tutorials on basic scripting are OK, but reading through decent script like this is 10x better for getting your head round it.

Chaining together the input and reactions, to step from activating the "success" sound $0 to the next code digit progression, is so logical and simple it's downright elegant...it's a shame FPSC scripting is itself rather restrictive - running through all the other scancodekeypressed options to force the re-set must have been tedious (and repetitive...and repetitive...and repetitive!)

Login to post a reply

Server time is: 2024-11-23 23:00:08
Your offset time is: 2024-11-23 23:00:08