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 / Sound when using key/doorkey, one time only messages?

Author
Message
LostSoul54
20
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 5th Mar 2005 00:58
In my test game I have scripts that show images as to what key is needed for each locked door, and when the key is picked up it shows the image of the key you received. I have a couple of questions to mkae thi smore dynamic:

1) Can I assign a script or alter the existing script that plays a "key unlocking the door" sound prior to the actual door opening sound? Can you have a "wrong key" sound play if the player doesn't have the correct key?

2) Can you have the message only appear once and not again after the correct key is found and the door has been opened? Basically turning it into a "dooruse" door.
I assume this would require an if-then structured script. Which by looking at some of the default scripts, this looks to be done in FPSC with "state" and "frame" commands.

I wanted to see if anyone else had tried any of the above and had a strightforward way of getting it into the their game, before I started the trial and error, mostly error, process

Thank you in advance for any help

It's easy not to get lost when you have no idea where you are going
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 5th Mar 2005 22:53
I find that trial and error is usually the best way to learn things. (As long as you use copies of scripts to do this with ) It's basically how I learned the scripts.

Some pointers would be:

sound={your unlocking sound} to play the relevent sound.
timerstart to reset the timer
timergreater={1/1000th seconds, e.g. 1000 = 1 second}

Work out the time it takes for the unlock sound to play (for example 1.2 seconds) and do something like:

:state=0,{conditions}:sound=audiobank\user\myunlocksound.wav,timerstart,state=1
:state=1,timergreater=1200:state=2

state=2 is the normal unlocking routines and sounds.

As to the seconds, combine the door unlocking scripts and the door use scripts. Use original door unlock script, when the door us opened, the state changes to a higher number where you put the door use script in.

Hope that makes sense.

Jas

----
"What is this talk of 'release'? Klingons do not'release' software. It escapes leaving a bloody trail of developers and quality assurance people in its wake!"
LostSoul54
20
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 6th Mar 2005 11:58 Edited at: 6th Mar 2005 12:02
Thank you for the advice. I like to get as many ideas before I start messing with the scripts, so this will help out a lot

Thanks again

It's easy not to get lost when you have no idea where you are going
Acolyte Entertainment
19
Years of Service
User Offline
Joined: 28th Dec 2004
Location: Oregon, US
Posted: 14th Mar 2005 02:00
how did you display more than one image? I can only display one. No matter how I change the script or delete the DDS file. They are always the same image.


Login to post a reply

Server time is: 2024-04-24 02:04:21
Your offset time is: 2024-04-24 02:04:21