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 / Destroying a door key after use?

Author
Message
geoiv
17
Years of Service
User Offline
Joined: 23rd Jun 2007
Location:
Posted: 23rd Jun 2007 21:56
Hey, I am very new to FPS Creator and for my first big project I am creating a Sci-Fi Adventure game. I plan to implement some locked doors in the game, but I don't want to have the player grab one key and be able to go through all of the locked doors. Is there a way to have the door you use the key on be unlocked permanentley so you don't need the key again, but after the key has been used it is destroyed? Any help on this subject would be greatly appreciated.
pigs can fly
18
Years of Service
User Offline
Joined: 20th Aug 2006
Location: Luxembourg
Posted: 24th Jun 2007 11:48
erm...
actually, when you pick a key up, it's destroyed and stored in your inventory. And you can only open the locked doors with the name of this key in "use key".
So, am I right if I think that you don't want the door to show the "you need a key" hud again afteryou found the key?

then you need to modify its script...


All the free PCF Productions Stuff
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 24th Jun 2007 14:07
Quote: "erm...
actually, when you pick a key up, it's destroyed and stored in your inventory. And you can only open the locked doors with the name of this key in "use key".
So, am I right if I think that you don't want the door to show the "you need a key" hud again afteryou found the key?

then you need to modify its script..."


My script does this.

Search "Eldest Dragon's Scripts"


Mike

Call me Mike please
Thraxas
Retired Moderator
18
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 25th Jun 2007 03:28
To make a key only open one door name the key something unique like "key001"...

In the door properties tell it the use key is "key001"... Now that key can only open that door...

For other doors rename the keys as necessary i.e. key002, key003 etc...
geoiv
17
Years of Service
User Offline
Joined: 23rd Jun 2007
Location:
Posted: 25th Jun 2007 23:00
Thraxas's answer is what I was looking for, thanks a lot.

Login to post a reply

Server time is: 2024-11-23 18:35:21
Your offset time is: 2024-11-23 18:35:21