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 / scancodekeypressed without selecting weapons?

Author
Message
gm1
15
Years of Service
User Offline
Joined: 25th Feb 2009
Location:
Posted: 1st Mar 2009 19:24
When I use some of the example pincode scripts (say to enter a code to open a door) it works fine if I have no weapons. But if I do have weapons in slots, and I press that number for the keycode, then the weapons start to change. (The code still works)

Is there a way to block out what the keys normally do while the pincode is being entered?
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 2nd Mar 2009 02:11
just use letters instead of numbers


xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 2nd Mar 2009 02:16
Use the number pad instead.

Best.

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 2nd Mar 2009 04:38
Use the number pad as xplosys said but make sure Num Lock is OFF. The user/player will also need to know this so make sure it is in the instructions.


__________________________________________________________
Make life a little easier and use FPI Editpad for your sctripting needs.
Now with Line Numbers. V3.3.8 is now available.

The past has a lot of memories to hold onto; but, today is chock full of new adventures, and, the future shouts out, "The best is yet to come!" -- TerryC
gm1
15
Years of Service
User Offline
Joined: 25th Feb 2009
Location:
Posted: 2nd Mar 2009 17:06
Thanks all!

If I wanted to use letters instead, then could I freeze the player to avoid movement when pressing "w,a,s,d"?

(I know --- don't use "w,a,s,d", lol, but I have some ideas in mind that would require the full alphabet throughout a level.)
gm1
15
Years of Service
User Offline
Joined: 25th Feb 2009
Location:
Posted: 2nd Mar 2009 21:04
Actually, I think I have answered it somewhat. Here is the code. It is the pin code script by xplosys, which I added to.

I used a variable to control the visibility of my custom hud. The keycode is the word "zap" and I also added huds for each letter so you can see them when you type.

I freeze the player and disable weapon/mouselook once the first letter is pressed, and then when the code is complete, the player unfreezes and the letters disappear after 1.5 seconds.

It's a noobish hack, but it works, maybe someone will find it useful

Thanks for your help, this is such a cool program.

Mark


Login to post a reply

Server time is: 2024-11-24 20:37:19
Your offset time is: 2024-11-24 20:37:19