Jump to content
Sign in to follow this  
nickk13579

Adding a Short mission intro help.

Recommended Posts

Ive noticed in the Evolution and in Berzerkers multiplayer missions there are short introductions before you are able to play. I want to be able to add a small amount of sound and the title of my mission across the screen... i just dont know how to do it. can anyone help me?

Share this post


Link to post
Share on other sites

you mean when its loading the map? just make a "description.ext" file and put inside of it this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

onLoadMission="whatever you want it to say";

for music you will need your music file in .OGG format. then in your description.ext file you have to tell the game that its in your mission folder by putting this in it:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgMusic

{

tracks[]=

{

<name of ogg file>

};

class <name of ogg file>

{

name = "<name of ogg file>";

sound[] = {\music\<name of ogg file>.ogg, db+0, 1.0};

};

};

for example:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgMusic

{

tracks[]=

{

music

};

class music

{

name = "music";

sound[] = {\music\music.ogg, db+0, 1.0};

};

};

now depending where you want it to play you either make a trigger that plays the music by going to EFFECTS and under the music menu your file should show up as long as you correctly inputed the information into your description.ext file.

you could also make a script play the music by putting in this command:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

playsound "music"

or if someone was singing it then you could use this command:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

unitname say "music"

you might want to take a look at this: http://community.bistudio.com/wiki/Description.ext

Share this post


Link to post
Share on other sites

Additionally, you must create intro.sqs file with camera script.

I'll show you an example with hints and tips. Put in editor few objects:

- trigger called camera1

- trigger called camera2

- a playable soldier (far far away from place where cutscene takes place)

- a AI soldier called "player"

- vehicle (Humvee for example) called "Target1"

- vehicle called "Target2"

Now read this code below. sentences after ";" is script description (it's not necessary to put it on sqs file, but it helps to understand a whole tutorial). Create "intro.sqs" file in mission folder, copy that code and then you should put "[] exec "intro.sqs"" line to init of any unit on map.

:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

;Intro.sqs

;by eJay - next 2 lines will create camera

_Camera = "CAMERA" CamCreate [0,0,0]

_Camera CameraEffect ["INTERNAL","BACK"]

;Next line will set camera on target called Target 1 - it can be, a vehicle, soldier or game logic called Target1

_Camera CamSetTarget Target1

;We have target, but we need a position for camera. Create a small trigger called camera1

_ox = GetPos camera1 Select 0

_oy = GetPos camera1 Select 1

;CamSetFov is some kind of zoom. Default is 0.700

_Camera CamSetFov 0.700

;CamSetPos will put camera on desired height. Number in [] i value of height.

_Camera CamSetPos [_ox,_oy,1]

;CamCommit is time of move between A and B point (triggers or game logic)

;In first line there should be a value 0

_Camera CamCommit 0

;next line is a time when next script will start

~5

;Camera  set a new target called Target2.

_Camera CamSetTarget Target2

;Camera will move form trigger called camera1 to camera2.

_ox = GetPos camera2 Select 0

_oy = GetPos camera2 Select 1

_Camera CamSetFov 0.700

_Camera CamSetPos [_ox,_oy,1]

;... in 5 seconds of course:)

_Camera CamCommit 5

;next script will start in 5 seconds.

~5

;camera will set a new target called "Player".

_Camera CamSetTarget Player

;camera is on position called camera2

_ox = GetPos camera2 Select 0

_oy = GetPos camera2 Select 1

;nice zoom;)

_Camera CamSetFov 0.100

_Camera CamSetPos [_ox,_oy,1]

;zoom in 5 seconds.

_Camera CamCommit 5

;next script in 8 seconds.;)

~8

;Screen goes black

CutText ["", "BLACK Out", 2]

~2

;Text on screen.

TitleText ["This is how camera script works", "PLAIN", 3]

~5

;Destroying camera

_Camera CameraEffect ["TERMINATE","BACK"]

CamDestroy _Camera

;Screen turns to normal

TitleText ["", "PLAIN"]

CutText ["", "BLACK In", 2]

;exit script.

Exit

Now, last problem is music or sound. Just follow smoke52 tip and then create a trigger with desired activation (for East or west). In effects menu choose your track/sound.

Share this post


Link to post
Share on other sites

Thanks for all the help guys. I got both those scripts working. Thanks again... I have one more question regarding the intro thing... is there any way to get a picture to apear? such as a clan logo or anything? thanks in advance. smile_o.gif

Share this post


Link to post
Share on other sites

hmm thats a tough feature to implement i guess then huh? Ill keep looking around, that Wiki was a little bit vague, but thanks for the help Smoke smile_o.gif. Any other answers anyone? Thnks.

Share this post


Link to post
Share on other sites

Has anyone mastered this yet? I would like display a picture during beginning and one at the End of my Multi-player Mission.

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  

×