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 / Video after after pressing the lever

Author
Message
The masters
14
Years of Service
User Offline
Joined: 18th Aug 2010
Location:
Posted: 3rd Oct 2010 01:13
Hello, I need script:
I have got swift and I want to start a video after press this swift (lever). Have you got some script or ideas?

Thank you
Norion
14
Years of Service
User Offline
Joined: 14th Jun 2010
Location: The Netherlands.
Posted: 3rd Oct 2010 03:21
http://forum.thegamecreators.com/?m=forum_view&t=176304&b=23

maybe he can help you


NORION

The universe is everything around this but you are everything around the universe.

by Norion.
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 3rd Oct 2010 04:52
You can add a video to play when a switch is pressed by editing the switch's fpi script and adding the following into the script:

video=videobank\<path\video_file_name>

For example, let's look at the script in the scriptbank called switch.fpi.



To understand how the script and switch work, we need to know where the action occurs when the switch is pulled. Look at this line:



This line shows when the player walks up to the switch and "presses Enter to use it" (plrusingaction=1), then it activates the If Used field (usually a door) and continues to state 1, etc.

To play a video when they pull the switch, you can insert the video= line in the following way:



Or you can put the video= line in the state=2 line:



It depends on how you want to do it, but that is how to do it effectively.

For future reference, you might want to look at some of the switch scripts and learn how the commands fit and what they do. Such as the plrusingaction=1, activateifused=1, etc. This will help you get an idea of how the scripts work. Sometimes it is a trial and error when making a script. You may have one where commands are in the wrong place, either a comma instead of a colon, etc.

Regarding the video=command I used above, replace your_video_file_name_extension with something like this:

videobank\ww2_bf\intro_video.wmv

or

videobank\ww2_bf\cutscene_video01.avi

Hopefully this makes some sense and helps get you into the right track. I've attached a pdf called FPI Scripting Language, which lists the various commands,etc of scripting. Study it, learn it. It will help you.

- BlackFox

RPG Mod- Create a world full of adventure

Attachments

Login to view attachments
The masters
14
Years of Service
User Offline
Joined: 18th Aug 2010
Location:
Posted: 3rd Oct 2010 19:37
I can not this script language. I know Java and Pascal, but this no...Please I need script for video apper after press a switch.

Thank you!
zeza
16
Years of Service
User Offline
Joined: 27th Jun 2008
Location:
Posted: 3rd Oct 2010 21:06
Quote: "I can not this script language. I know Java and Pascal, but this no"

Then learn, there are plenty of places and tutorials that can help you learn, such as the manual in the Docs folder. At least try to script it before asking for help.

I'd change the world, but I don't have the source code
R.I.P. heltor, we will miss you
Mr illusionest
15
Years of Service
User Offline
Joined: 5th Mar 2009
Location: Cairo , Egypt
Posted: 3rd Oct 2010 22:42
@norion:

Lol man , Thanks for advertise !
But the thread you posted is not for requests , it's for looking for script problems only , It's no so popular anyway

@zeza:

Totally agree with you , FPI language is one of the easiest languages ever seen , And the tutorials are flowing everywhere in the forum , not to mention the community guide .
Anyway BlackFox answered it very clear , You only need to learn the language , the master . and I think it's much easier than Java .

Cheers

"I am the night visitor when everyone is sleep , and when the last light fades"
The illusionest

Login to post a reply

Server time is: 2024-11-24 19:24:35
Your offset time is: 2024-11-24 19:24:35