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 Product Chat / ocfpscguide question

Author
Message
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 2nd Apr 2013 22:29
For the first keypad script where does the script goto? the keypad or the door? and what keypad should I use for the script?
Anybody?
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 4th Apr 2013 21:48
@riccetts,

1st change the door's main to remote and name the door something special Doorremote1 for example. Then change the keypad scipt to what you'd like. Then in the ifused field add the name of the door.
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 11th Apr 2013 05:13
@Troutflies

Can I use a remote door? And I used the keypad code with a key pad and used the door name in the if used spot. It didn't work.
Can you help with this problem?
Tomahawk
13
Years of Service
User Offline
Joined: 16th Dec 2012
Location: Where do you think I live?
Posted: 11th Apr 2013 05:40
Quote: "Can I use a remote door?"

It has to be a remote door

riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 11th Apr 2013 06:00
Ok I used a remote door still nothing. Do I have to relate the door with the keypad? Like if used for the door?
BlackFox
FPSC Master
18
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 11th Apr 2013 06:07 Edited at: 11th Apr 2013 06:08
Quote: "Ok I used a remote door still nothing. Do I have to relate the door with the keypad? Like if used for the door? "


No. The script is assigned to the keypad. In the If Used field for the keypad, you put the name you use for the door. Check the door properties and ensure the name listed matches the name you gave in the If Used field of the keypad.

If it is not working, then either the keypad does not have the correct name in the If Used field, the door name does not match, the keypad is static, or the script is missing the "activateifused=1" command.


There's no problem that can't be solved without applying a little scripting.
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 11th Apr 2013 06:21
I have the script here:


The door matches The keypad so maybe it's in the script.
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 12th Apr 2013 19:52
@riccetts,

A tip: I like to make a 1 room map say 4x4 then when I want to test a script like this or any other script. to ensure it's working the way I want, before I put it in the game I am working on. The smaller map will load faster and it won't take as long to get the script working the way you want.

***note: Keep in mind that though your script may work perfectly in your test room. When you put it into a map that has other scripts running, the script may not run as it did in your test room. But using the test room gives you that sterile enviorment to get your custom script working right to begin with. That way when you do insert it in the game and it doesn't work right it'll be way easier to figure out why.
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 12th Apr 2013 21:36
@Troutflies

Thanks for the tips. I reinstalled fps and it seems to be working now.
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 14th Apr 2013 19:04
It was working but now again it's not anybody with suggestions please.
I did everything previously stated and it worked after re-installment but now... It doesn't.
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 15th Apr 2013 18:42
Do you have any other remote doors on the level?

Be sure the names are exactly the same.
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 15th Apr 2013 22:58
@Troutflies

No I just have the one door. I named it door1. The keypad ifused door1.
But nothing happens.
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 17th Apr 2013 01:40
Riccetts

Check this line of code
:state=14:state=1,plrsound=$0,activateifused=1,alttexture=1 :state=1,plrusingaction=0:state=2

You have state=1 twice.
BlackFox
FPSC Master
18
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 17th Apr 2013 01:56
Quote: "Check this line of code
:state=14:state=1,plrsound=$0,activateifused=1,alttexture=1 :state=1,plrusingaction=0:state=2"


A few mistakes. Too many colons, going to state=1 twice and state=2 once, a space in the "alttexture=1" and the ":state=1".

Perhaps it is suppose to be:




There's no problem that can't be solved without applying a little scripting.
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 17th Apr 2013 03:39
@riccets try this



Its generic but it should get you started. the keys are U,L,H,J
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 18th Apr 2013 17:49
@Blackfox
I tried yours and that didn't change a thing.

@Troutflies
I tried your and all I got was press enter prompt only.
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 18th Apr 2013 18:00
@Troutflies
:state=14:state=1,plrsound=$0,activateifused=1,alttexture=1 :state=1,plrusingaction=0:state=2 :state=2,plrdistwithin=50,plrusingaction=1:state=3,plrsound=$1,activa
teifused=0,alttexture=0
:state=3,plrusingaction=0:state=10
;End of Script

This is the original script for the keypad code in the ocfpscguide.
so from :state 14 and on please instruct me on what to do.
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 18th Apr 2013 18:02
Riccetts,

Which version are you running?

It worked on my test map V1.19.

Checklist to be sure it's set up right.

1. place door and change main to remote
2. change the name of the door to door1
3. place key pad, I use the keypad from the scifi pack
4. add my script to the main of the keypad
5. change the name in the ifused field to what you named the door.

It should work.
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 18th Apr 2013 18:14
I am using V1.19 also

The door I'm using is a remote door and I named it "door1".
I am using scifi switch 5
I added your script to main
I have ifused on switch "door1"
I get "press enter to use" when I approach the keypad.
Nothing happens when I press enter.
The door shows nothing when I approach it.
Any suggestions?
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 18th Apr 2013 18:51
@Troutflies
Never mind it works. I was expecting a keypad to show to enter numbers. How can I get that to happen?(the keypad)
Thanks for your help though
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 18th Apr 2013 18:51
Oh ok,

What you need to do is change this line
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=useswitchprompt,hudhide=1,hudmake=display,state=10

You need to change the hud image to what you want(enter code or whatever). I just had the file path point to a stock hud. You should still be able to walk up tot he key pad and press the keys on your keyboard U,L,H,J and the door will open
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 18th Apr 2013 19:11
Well there are a few things to do. You can create some huds that will show the numbers as you punch them in. You could also use the fpgcrawtext commands that work like huds but are, in my opinion easier to work with when trying to do something like this.
To get the #'s to actually apear on the keypad as you punch them in would require a bit more work to edit the exisiting textures. Then you'd have to come up with a script to change the texture everytime you press a key. Way too much work.

Download the script herehttp://forum.thegamecreators.com/?m=forum_view&t=196813&b=23

Look at how the FPGCRAW text is used and how the etimers are used to show the correct text at the correct time. This chould give you a good starting point to figure out the rest of your script.
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 18th Apr 2013 19:24
Thanks, I'll have a look Troutflies
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 19th Apr 2013 20:46
@Troutflies

One more question,on your generic script can you add in a enter command after the code?
Thanks
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 19th Apr 2013 20:59
@Troutflies

Never mind I figured it out.
:state=1,scancodekeypressed=28:activateifused=1,plrsound=$0

I hope that's right,it seem to work.
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 20th Apr 2013 04:19
There you go. Glad to help.
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 23rd Apr 2013 18:15
How is it working Riccetts.
riccetts
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 3rd May 2013 01:57
@Troutflies

It works great! Thanks for the help.

Login to post a reply

Server time is: 2026-07-03 05:00:32
Your offset time is: 2026-07-03 05:00:32