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 / Key door Hud appear till unlocked how to.

Author
Message
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 22nd Sep 2011 23:17
Ok I am feverishly trying to finish the level I have been working on for a few weeks now. Everyone on here has been a huge help with questions as they present themselves.

The question that presented itself to me last night was how do I make the door locked need key hud (which I have customized) to appear only until I have found the key and unlocked the door?

My player starts in a room that he must find an object to jimmy the lock (I am using a knife with a pick up key script attached) in his search he walks by the door several times and in the course of the level he passes by the door a few times. I just want to keep the hud from appearing everytime he comes close to the door after it has been unlocked.

I know there is a script out there but i can't seem to find it.
BlackFox
FPSC Master
18
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 22nd Sep 2011 23:42 Edited at: 22nd Sep 2011 23:44
If you are using a script that is similar to the script "doorkey.fpi" that the Door (key) would use, then all you have to do is modify the script so it will not return to the state that displays the hud when you "unlock and open" the door.

For example, if you look at the doorkey.fpi script, you will notice this line:

:state=3:decframe=0
:state=3,frameatstart=0:state=10,setframe=0

This state will close the door and then returns the script back to state 10, which will display the hud when the player is within a distance of 60 units. In your case, I would alter the state=3 line to something like this:

:state=3:decframe=0
:state=3,frameatstart=0:state=20,setframe=0

Since the door has been unlocked, I can pass through it and once through the door closes after I am 60 units away (state=2 line). As the door closes (state=3), the script will go to a state=20 line, which there is nothing left to process and therefore the script ends. The hud will not reappear when you pass the door, and remember that since the script ends you will not be able to open the door again.

There are other alternatives, but this is the simplest method.


Twitter: @NFoxMedia
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 24th Sep 2011 03:27
Who's the man? Who's the man BlackFox is the man. That worked perfectly. I tell you what when I make my billions in the new buisness venture I am involved in......Selling icecubes to Eskimos I'll throw you a billion for helping me out.

Login to post a reply

Server time is: 2026-07-01 10:45:30
Your offset time is: 2026-07-01 10:45:30