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 / A light switch script

Author
Message
FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 2nd Oct 2006 06:44
How many of you have ever been building,testing or playing an FPSC game and you pressed ENTER to open a door and the light turned on/off at the same time?
Since most light switches are next to the door when you go into a room probably a lot.
With this light switch script that I modified you can use it as your main AI script for a light switch and instead of pressing ENTER you press L (for light) to turn the light switch on/off.
You have to have fairly basic knowledge of FPSC to use this script.
I have included instructions on how to make the script work
as well as instructions on how to change the key to turn the light on and off.

Attachments

Login to view attachments
stormboy
19
Years of Service
User Offline
Joined: 8th May 2005
Location:
Posted: 2nd Oct 2006 11:40
Useful script, thanx.
FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 2nd Oct 2006 15:36
You're welcome,stormboy.

Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 2nd Oct 2006 15:43 Edited at: 2nd Oct 2006 15:44
I take it we need the update beta for this to work?

I haven't downloaded because I already had a slightly different solution, but I just wanted to know, with this one, does the user need to add the scancode and key to the buildgame.txt or whichever one it is that you place the recognised keys in?

butters

*Edit*

Tut Tut
what was I thinking.
I didn't even say "thanks Fred, smart thinking with the light switch!"
cheers bud.

s4real
VIP Member
18
Years of Service
User Offline
Joined: 22nd Jul 2006
Location:
Posted: 2nd Oct 2006 15:55
Nice work fredp many thanks.
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 2nd Oct 2006 16:20
Excellent! Thanks.

The forum provides a means to hide our true identity. Too bad we always screw up and let it be seen.

FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 2nd Oct 2006 16:33
You're welcome,guys.
Now that we have the whole keyboard to work with we can come up with all sorts of crazy ideas since we aren't limited to the ENTER key anymore.
This script should work with empty's mod or 1.03 (I forgot to mention that).
I have been using it with 1.03.
The keypress is part of the script so you shouldn't have to add it to the setupfile.fpi.

Login to post a reply

Server time is: 2024-11-23 01:20:36
Your offset time is: 2024-11-23 01:20:36