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 / Door Close Question

Author
Message
Armageddon Games
15
Years of Service
User Offline
Joined: 29th Apr 2009
Location: Im In my Little bubble, Find your own...
Posted: 4th Feb 2015 20:44 Edited at: 4th Feb 2015 20:45
Hello, I have tried to toy with this script and ended up with this, it works but the door closes too quickly before i am able to enter. i have the action keyy switched to Press F to open, but the scripts original key is the standard Enter key, could anyone please help me put this together correctly?

My version:



Heres the script that closes and locks the door behind player after entering


Heres the F to Open Script


I guess im asking if anyone could fuse these two scripts together to make the F to Open work, while the door closing script acts as it should. I have tried without success more than my patience can handle at the moment lol.

http://uimg.ngfiles.com/banners/3880/3880701.jpg
Mriganka
10
Years of Service
User Offline
Joined: 16th Jun 2014
Location: Virtuality
Posted: 5th Feb 2015 01:56
To incorporate the press F to open door, you can use the commands scancodekeypressed=x or keypressed=x 1/0. You will have to replace plrusingaction=0/1 with any of the commands above.

But the thing is, your script is perfectly ok, but when you test the game the controls revert to default, so the script doesn't seem to work. You will notice it working for your built game.

Your script is recommended if you would like to make changeable controls for your built game.

BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 5th Feb 2015 04:48 Edited at: 5th Feb 2015 04:51
Here you go... Displays the "press F" and when "F" is pressed, door opens. When player passes through door and is 100 units from door, it will close.



To make the distance lower, change the ":state=2,plrdistfurther=100" to what you need. Since you are using 60 units to be in distance, I would suggest 70 is the lowest you want.

Second, if you want the script to loop so the door can be opened, use as above. If you want it one time only, use this:



These work in both test game and a build...

There's no problem that can't be solved without applying a little scripting.
Armageddon Games
15
Years of Service
User Offline
Joined: 29th Apr 2009
Location: Im In my Little bubble, Find your own...
Posted: 6th Feb 2015 01:06
Thankyou guys so much, such a major headache relief. BlackFox, Dude youre a god, i appreciate the help!

http://uimg.ngfiles.com/banners/3880/3880701.jpg
Armageddon Games
15
Years of Service
User Offline
Joined: 29th Apr 2009
Location: Im In my Little bubble, Find your own...
Posted: 6th Feb 2015 20:53
Heres another one i need help with if you wouldnt mind terribly,

I dont even know how to start this script, but it involves changing the stock switch.fpi to incorporate F to use instead of enter, the switch activates once only then becomes unusable. Ill provide a sound effect in exchange.

http://uimg.ngfiles.com/banners/3880/3880701.jpg
Sinister Spoon
16
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 9th Mar 2015 21:55
Interesting I could use some sfx.

Well you can use;

:scancodekeypressed=x

Where x is the scan code key as defined in the user manual/complete syntax pdf (search for that)

but you need a break action as that condition is true as long as the key is pressed so if the player holds the key it locks the script in that current state performing the action repeatedly til the player lets go

something like

:state=1,scancodekeypressed=23:state=2
:state=2:setifused=Flight,activateifused=1,Destroy

(I think 23 is like the 'p' key or something)

Theres a script for a light that can be turned on and off somewhere, so just name it Flight or whatever you changed that ifused field to, put that code in the main of a dynamic entity somewhere outside the main level so the player doesnt see it, when they press f it will activate the light then destroy itself.

The destroy command destroys the entity with that script in its main, removing it and the script from the level so it cant be triggered again

smoke em if you got em

Login to post a reply

Server time is: 2024-11-23 09:35:10
Your offset time is: 2024-11-23 09:35:10