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 / Locked Door Question?

Message
Posted: 30th Nov 2005 21:59
Is it possible to have a locked door, requiring a specific key, to show different images/text based on the player having the key or not.

I want the door to show image1/text stating the door is locked and a key is needed(and locked door sound is possible). If the player has the key, show image2/text stating the door is unlocked(and unlock door sound)

Can this be done. I haven't found a solution as of yet

Thank you

It's easy not to get lost when you have no idea where you are going
Posted: 30th Nov 2005 22:05
I'll see what I can do...
You can probally try using both the lock hud and the open hud and put them in the same FPI...
Posted: 30th Nov 2005 22:13 Edited at: 30th Nov 2005 22:13
Why doesn't this work? I think I am doing everything right, but what is the matter?

;Artificial Intelligence Script

desc = Key Door (Open 'With Key' and Close)

;Triggers

:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecoretextpressentertouse.tga,hudname=usedoorprompt,hudhide=1,hudmake=display,state=10
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecoretextlockeddoor.tga,hudname=keydoorprompt,hudhide=1,hudmake=display,state=10

:state=10,plrdistwithin=60,plrhaskey=1,plrusingaction=1:state=1,setframe=0,sound=$0 :state=1:incframe=0 :state=1,frameatend=0:state=2,coloff :state=2,plrdistfurther=60:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=10,setframe=0

;End of Script
Posted: 30th Nov 2005 23:09

That is very similar to what I tried myself. I couldn't get it to work either. I have been pulling my hair out with what I thought would be simple. I will keep messing with it. Please post again if you figure anything out

Thank you again for your input

It's easy not to get lost when you have no idea where you are going
Posted: 30th Nov 2005 23:22
Yo estoy un IDIOTO
(translation) I am an Idiot.

;Artificial Intelligence Script

desc = Key Door (Open 'With Key' and Close)

;Triggers

:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=usedoorprompt,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\lockeddoor.tga,hudname=keydoorprompt,hudhide=1,hudmake=display,state=10

:state=10,plrdistwithin=60,plrhaskey=1,plrusingaction=1:state=1,setframe=0,sound=$0 :state=1:incframe=0 :state=1,frameatend=0:state=2,coloff :state=2,plrdistfurther=60:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=10,setframe=0

;End of Script

This appears to work, but the forum has a way of changing things...
Posted: 1st Dec 2005 05:42 Edited at: 1st Dec 2005 05:48
I'm not sure what I was doing wrong, but your script works perfectly. Thank you very much for your help

It's easy not to get lost when you have no idea where you are going