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 / Storytellers Code-Input script + demobuild

Author
Message
The Storyteller 01
14
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 10th Aug 2012 02:10 Edited at: 15th Aug 2012 02:09
Update! The script had an error, I corrected the code here in the thread and also rebuilt the game with the correct version (new download link). I am afraid you have to re-download

I know its ANOTHER thread by me but this is no conversation and way too long for the Short Script thread - but you are going to like this one, I'm sure.

It's an old-fashioned script for entering a 4-digit code, using no variables or huds, just simple & colourful RAWTEXT:


This is not all of course. If you want to enjoy the audio and know what happens when you enter the wrong code, you'll have to download & play the demo (or read the script thourougly...)

Here is the full script:

How it works:
When the player puts the crosshair over the item, a “?” will be displayed. Pressing enter displayes the text line seen in the first pic. Pressing enter again (or waiting a few seconds) displays the green text line (second pic). The player then has to enter a 4-digit code using his keyboard's numpad. If the player removes the cursor from the object at any time, the text simply stops to display but the script remembers the state it's in, so when later the cursor is moved over the object again, only the last displayed line will be displayed instead of the script starting all over. Of course, if the player removes the cursor during entering the numbers he will get the chance to start with the first digit again next time.
Examples where to use:
Remote doors, lifts, android/robot allies (The name of the entity to be activated must be entered in the "Ifused" field of the scripted entity)
Issues:
It includes a line calling a LOOPSOUND, that cannot be stopped. There is a workaround but then the script wouldn't be standalone anymore. If you dislike the sound, simply remove the line (it's conveniently at the script's end and marked)

This is the new variant:

Difference to the original script
Instead of LOOPSOUND= this script uses MUSIC= to play the exact same alarm sound which made it scriptable, that entering the correct code turns the alarm sound off. That comes with a price however - the engine allows multiple sounds to be played but there is only one MUSIC because it provides the "background" for the whole level (like that nervwrecking humming noise that is included in the default Level Settings). Therefore the alarm sound from this script will replace any music or ambience currently running as "background" and even turning the alarm off will not restore it but leave the level in silence instead (which I personally don't mind but thats just me).

Updated link! The archive containis the demobuild, the seperate original script and the above pic for reference:http://www.mediafire.com/?r39oea18xvobl9e

In case you find my grammar and spelling weird ---> native German speaker ^^
BlackFox
FPSC Master
15
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 10th Aug 2012 02:24
Very nice work. FYI, I'm adding all your thread links into the "General Script Information" sticky so they can be easily found. These types of scripts are too valuable to get buried.


Twitter: @NFoxMedia
The Storyteller 01
14
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 10th Aug 2012 02:39 Edited at: 10th Aug 2012 02:42
You're fast! I was still busy editing my post

And thanks a lot for the compliment

In case you find my grammar and spelling weird ---> native German speaker ^^
The Nerevar
13
Years of Service
User Offline
Joined: 19th May 2010
Location: Vvardenfell
Posted: 10th Aug 2012 07:27
this is revolutionary! very cool!

I'm familiar with this, but I'm still learning!
The Storyteller 01
14
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 10th Aug 2012 10:40
Quote: "this is revolutionary!"

Thanks, but a lot of people have allready done similar scripts. Mine is just a variation with RAWTEXT display.

In case you find my grammar and spelling weird ---> native German speaker ^^
elbow
13
Years of Service
User Offline
Joined: 3rd Dec 2010
Location:
Posted: 13th Aug 2012 22:49
Thank you Storyteller 01

I have been an admirer of your scripts and game reviews for a while now. Thanks for sharing these and the shorter ones in the other thread. They are much appreciated.

Regards

Eugene
The Storyteller 01
14
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 15th Aug 2012 01:57
I discovered a variant that actually stops the alarm sound after entering the correct code - but it comes at a price.

Update in the first post!

In case you find my grammar and spelling weird ---> native German speaker ^^
Ross tra damus
3D Media Maker
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Looking to Escape London
Posted: 15th Aug 2012 15:47
Love these two scripts - very handy.

Thank you very much for sharing them.

All the best of luck.
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 15th Aug 2012 19:52
SETUPLEVEL.fpi:



CODEINPUT.fpi:



BlackFox
FPSC Master
15
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 15th Aug 2012 21:03 Edited at: 15th Aug 2012 21:15
I am in need of some clarification. I apologize Storyteller if this takes it slightly off topic, but it does relate to using music in your script.

":state=91:music=OFF"

Is this correct? The reason I ask is because in the setuplevel.fpi, we use to comment out or remove the "music" part and every time we ran a test, the game would run jerky. As soon as we put it back, it was fine. So we would then use the "mucisoverride" command to change the music after the level started.

So if my setuplevel.fpi has this:

:state=0:music=audiobank\NorthernFox\Egyptian\AT1\level_start.ogg,musicvolume=50,soundscale=25

I can then use "music=off" in a script to turn it off, or use the "musicoverride" to change it?


Twitter: @NFoxMedia
The Storyteller 01
14
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 15th Aug 2012 21:11 Edited at: 15th Aug 2012 21:19
Quote: "":state=91:music=OFF""

@Blackfox: To be honest my script is a little misleading there

MUSIC=filepath stops playing the current (background level) .wav/.ogg file and starts playing the new file. However if the filepath is 'wrong', there is no new file to be played and therefore the recent music simply stops.

I just wrote MUSIC=OFF to remind me later wth this 'faulty' line is doing in my script

@Seth Black: Welcome back to the boards and thanks again for pointing me to the mistake in the original script.

That setuplevel stuff works, sure. But as I try hard to keep my scripts self-contained only a solution that kind of 'resets' the pre-script music would completely satisfy me.

If anyone could achieve this, I would be most greatful - and a couple of other people too I guess.

In case you find my grammar and spelling weird ---> native German speaker ^^
BlackFox
FPSC Master
15
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 15th Aug 2012 21:16
Quote: "I just wrote MUSIC=OFF to remind me later wth this 'faulty' line is doing in my script"


Understood. Here I thought I just misunderstood the command parameters.


Twitter: @NFoxMedia

Login to post a reply

Server time is: 2024-04-18 20:43:47
Your offset time is: 2024-04-18 20:43:47