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?

Author
Message
LostSoul54
20
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
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
Les Horribres
18
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
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...
Les Horribres
18
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
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

;Header

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
:plrhaskey=1,state=10,plrdistwithin=60:hudshow=usedoorprompt,hudfadeout=usedoorprompt
:plrhaskey=0,state=10,plrdistwithin=60:hudshow=keydoorprompt,hudfadeout=keydoorprompt

: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
LostSoul54
20
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 30th Nov 2005 23:09
Thank you for replying

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
Les Horribres
18
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 30th Nov 2005 23:22
Yo estoy un IDIOTO
(translation) I am an Idiot.

;Artificial Intelligence Script

;Header

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

:plrhaskey=1,state=10,plrdistwithin=60:hudshow=usedoorprompt,hudfadeout=usedoorprompt
:plrhaskey=0,state=10,plrdistwithin=60:hudshow=keydoorprompt,hudfadeout=keydoorprompt

: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...
LostSoul54
20
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
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

Login to post a reply

Server time is: 2024-04-23 12:02:29
Your offset time is: 2024-04-23 12:02:29