OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: AUS_Viper on 21 Jan 2005, 09:23:48

Title: Inserting a "skippable" intro into MP
Post by: AUS_Viper on 21 Jan 2005, 09:23:48
I know intro's in MP are treated differently than SP, but I was wondering if there was a way off adding code to have the option of "skipping" the intro (cutscene), which could be selected at the server set up screen.

Ie.

in the Description file:

titleParam1 = "Skip Intro:";
valuesParam1[] = {1,2};
defValueParam1 = 1;
textsParam1[] = {"No","Yes"};

in the init.sqs file:

?(Param1 == 1) : goto "No"
?(Param2 == 2) : goto "Yes"

#No
Perform No action
goto "SkipIntroSet"

#Yes
Insert code to Skip Intro cutscene?goto "SkipIntroSet"

I know how to set up the menu box in the server screen, but not sure of the best approach to be able to "skip" the cutscene

Any ideas?
Title: Re:Inserting a "skippable" intro into MP
Post by: Zombie on 21 Jan 2005, 12:13:10
You are definately on the right track.  All you need is to put a line at the start of your cutscene script, like this:
? param 1 == 2:goto "skipintro"
then after that put your normal cutscene scripting, then at the end:
#skipintro
exit
  You can add that to disable all the cutscenes in your mission.
I have used this technique.  You do not need anything in your init.sqs to make this work.
  BTW, you are aware that intros don't work in MP?  To make an "intro" in mp you have to treat it like any other cutscene.  I usually name mine "movie.sqs"
and call it from the init.sqs or from an  anybody not present trigger.
Title: Re:Inserting a "skippable" intro into MP
Post by: AUS_Viper on 21 Jan 2005, 15:35:10
OK thanks Zombie.

Thought it was something so simple ::)

BTW - yup, understand about intro's and MP.  Nothings simple in life is it?  ;)
Title: Re:Inserting a "skippable" intro into MP
Post by: Dubieman on 21 Jan 2005, 20:57:38
Erm, where are you doing your intros?

If you are using the little menu on the side of the mission editor to switch to intro/mission/outro-win/and outro-lose then you can skip by hitting space bar or another button.

But if its a in mission cutscene (like an intro after the briefing), they can't be skipped unless you use the code above.
Title: Re:Inserting a "skippable" intro into MP
Post by: Artak on 21 Jan 2005, 23:09:08
GuiltyRoachKillar, he's talking about Multiplayer intro, which is the same as a cutscene. It's impossible to have a 'real' intro in Multiplayer.

In my time I've seen way too many MP missions with way too long 'intros'.

It always makes my day to see a mission with the option to skip intro as a starting parameter.  ;D