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 / Timed doors?

Author
Message
TMS
17
Years of Service
User Offline
Joined: 9th Feb 2009
Location:
Posted: 24th Nov 2009 05:25
Okay, let's say I have a voice-acting file of a robotic voice (a-la Portal) that will speak to you once the player enters a trigger zone (or the start of a level). After the voice sound file has played all the way through, a remote door is triggered.

I have almost no knowledge of FPI scripting. Any ideas here?
JRH
20
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Stirling, UK
Posted: 29th Nov 2009 00:55
You need the length of time of the sound file, throw it in a script and vwella!



I know you can work it out from there, just edit a few scripts.

TMS
17
Years of Service
User Offline
Joined: 9th Feb 2009
Location:
Posted: 29th Nov 2009 04:52
No, I mean, no matter what kind of guides I read, they're all obscure--I have no idea what I'm doing here. -_-

At the very least, I just need a script that opens a door after a certain amount of time... I can associate a sound with a trigger zone.
JRH
20
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Stirling, UK
Posted: 29th Nov 2009 18:04 Edited at: 29th Nov 2009 18:04
Stop being useless, I know you can script.

This is untested.


TMS
17
Years of Service
User Offline
Joined: 9th Feb 2009
Location:
Posted: 29th Nov 2009 19:08
Rather than call me useless, it'd be nicer if someone could point me to a guide on how to script--Google fails me--it's the state system that is confusing me.

However, thanks for the script. I'll try that out.
Nbt
16
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 30th Nov 2009 12:02
Go here http://www.lanningsoftware.com/ then scroll down and download "X-Plain"

Now fire up X-Plain, open up existing scripts with it and learn what they do. It's a little out of date with newer commands (and won't be much good for extended FPSc Mod commands), but it's still very good and should help you understand scripting.

I only use this for fun and have no interest in making commercial games ^_^
xplosys
20
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 30th Nov 2009 15:39
First of all you have to understand that FPS Creator's claim to fame is that you don't need to know any scripting to make a game, therefore there is no official scripting guide or tutorial. There are however a few good ones in the Official Community Guide, one of which (by me) explains the basics and about "states". States are nothing more than a means to navigate the lines in the script.

In each script, state starts at zero.(:STATE=0)It is parsed by the engine because the engine knows to start at 0.

The engine starts at the top of the script and checks each line to see whether or not to read it. When the engine gets to the line that says :STATE=0, it reads and processes that line. If the condition in that line is true, it executes the action in the line. If that action is STATE=1, then the STATE for this script is now changed to 1, and the engine will no longer read or execute a line that starts with :STATE=0, or anything else. It will only execute the lines that say STATE=1 until the state is again changed by another action.

There are exceptions to this rule, but not for this explanation.

In this way, we can tell the engine what conditions to check and actions to perform in relation to what it already knows and what has already happened.

Brian.

Login to post a reply

Server time is: 2026-07-23 08:36:33
Your offset time is: 2026-07-23 08:36:33