Jump to content
Sign in to follow this  
thetrooper

Scripting end of missions

Recommended Posts

Hi guys, does anyone know how to script an END1, END2 or Lose etc for a mission? Also with this to script any of the music tracks to play?

Share this post


Link to post
Share on other sites

Set one trigger as END 1

Another as END 2

Another as LOSE

The triggers have an option that when the trigger fires music plays.

-

Share this post


Link to post
Share on other sites

yeah fully aware of that, I wondered if there was a way you could script it within a .sqf file?

I've tried a

endMission "END1";

But does not close the game up?

Edited by TheTrooper
example added

Share this post


Link to post
Share on other sites

ok, I've got some sort of conflict going on :confused: What about to lose mission? I'm guessing

Endmission "LOSE";
Exit;

?

Share this post


Link to post
Share on other sites

Should be yes...

---------- Post added at 11:00 AM ---------- Previous post was at 10:58 AM ----------

Are you testing these out in the editor ?

Share this post


Link to post
Share on other sites

Try something like this for music:

Outro.sqf

playMusic "Short01_Defcon_Three"
30 fadeSound 0;
30 fadeMusic 0;
titleCut ["","Black Out",30];
sleep 31;
endMission "END1";

Share this post


Link to post
Share on other sites

Hi, I just took a quick peek and I notice you didn't format a Briefing.html with various endings. Ill take a look at the mission now -where do you have your attemted endings scripted?

Share this post


Link to post
Share on other sites

I figured it out

sleep 2;
tskobj_5 setTaskState "SUCCEEDED";
taskhint ["Objective Complete!\nEscape from the Russians", [0, 1, 0, 1], "taskDone"];
sleep 4;
titleCut ["","BLACK OUT",3][color="Red"];[/color]
Endmission "END1";
Exit;

You were missing that semicolon so it couldn't proceed to endmission.

Share this post


Link to post
Share on other sites

No way! I suppose the other one for when 'sister' and 'father' die is the same?

Share this post


Link to post
Share on other sites

Im not sure -I only looked at your endmission.sqf -tho if you've copy/pasted similar code -thats likely.

Share this post


Link to post
Share on other sites

it's a trigger that fires it North where you start. fires a SQF file called

fathersisdead.sqf

There is also another one for the brother who should never die called

familydead.sqf

Share this post


Link to post
Share on other sites

The trigger works fine but it's not ending and noticed you are using the "lose" ending -I don't like those so you could just make more End2/End3/End4 etc..

In the Briefing.html -you can create text/pictures etc to accompany that ending.

Edited by froggyluv

Share this post


Link to post
Share on other sites

Hmm, interesting. I'm guessing you could use and END2 for instance as a Lose? Still at the moment it doesn't close down, so what's the solution for that?

Share this post


Link to post
Share on other sites

It works -I just put

Endmission "end2";

in Fathersisdead.sqf and mission ended with 3 red X's.

Share this post


Link to post
Share on other sites

Ok, cool I'll test it out myself. Thanks for your input. have a go playing it and see what you get on and if you get into it. Feedback is always welcome. Got a good story line to develop for it.

Share this post


Link to post
Share on other sites
Should be dude. What does it say?

The webpage cannot be found

Looks like the whole mediafire sites down.

Edited by Koni

Share this post


Link to post
Share on other sites

Nope, it's as if the whole mediafire site is down, just cannot open the page, well it says it cannot be found :confused:

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×