Forum Jump :

Author Message


Posts: 5
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2014-05-28 00:42        
     
Hello, I am trying to create a mission intro camera scene before the main mission starts.

Here is what I am doing:

In the editor I click on the target with the arrow "mission intro".
This cleans the map, and I set up my scene, record the camera position, etc.
Then I type into the init field of one of the men in the scene: "this exec "precut.sqf";"
This gives me the following script, which I pulled from Google searching:

showCinemaBorder False;

titlecut [" ","BLACK IN",18]
_camera = "camera" camcreate position player;
_camera cameraeffect ["internal", "back"];

// show some text
titleText ["Speed Kill", "PLAIN"]
sleep 5;


;comment "17:29:05";
_camera camPrepareTarget [-59935.20,79372.14,-28112.43];
_camera camPreparePos [3851.64,7673.11,0.77];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0


~20


titlecut [" ","BLACK OUT", 2]
//player cameraEffect ["terminate","back"];
camDestroy _camera
["END1"] call BIS_fnc_endMission;
//["END1", false, 5] call BIS_fnc_endMission;
//call BIS_fnc_endMission;
//introover=true

When in mission intro, I hit preview. The scene plays, then some music plays as it fades to black.... and then nothing. I hear sounds in the background, but the main mission never loads. I published it to Steam and ran it from the missions menu, but the same exact thing happens... how do I get it to load the main mission? As you can see from the code, I tried a ton of different methods to get it to exit and start the main mission, but was not able to.


Author Message


Posts: 1473
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2014-05-28 01:28        
     
There are a few things wrong here.

First the file is in sqf format and to call it correctly use
null=[] execvm "precut.sqf";

Every line should end with ; (there are a few exceptions)

~20 is not allowed in sqf it should be sleep 20;

I've never had any success using call BIS_fnc_endMission as it always end in black screen I use endMission "END1";


showCinemaBorder False;
titlecut [" ","BLACK IN",18];
_camera = "camera" camcreate position player;
_camera cameraeffect ["internal", "back"];

// show some text
titleText ["Speed Kill", "PLAIN"];
sleep 5;
;comment "17:29:05";
_camera camPrepareTarget [-59935.20,79372.14,-28112.43];
_camera camPreparePos [3851.64,7673.11,0.77];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0;

sleep 20;
titlecut [" ","BLACK OUT", 2];
//player cameraEffect ["terminate","back"];
//camDestroy _camera
//["END1"] call BIS_fnc_endMission;
endMission "END1";
//["END1", false, 5] call BIS_fnc_endMission;
//call BIS_fnc_endMission;
//introover=true


Advertisement


Author Message


Posts: 5
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2014-05-29 00:53        
     
Thanks so much, works like a charm now!


Author Message

SavageCDN  

Armaholics priest


Posts: 475
Rank:


Country: ca
Location: Ottawa
Occupation: Fighting with Exchange
Age: 44
In-game name: =VG= SavageCDN

 
#4 Posted at 2014-05-29 17:03        
     
I've never had any success using call BIS_fnc_endMission as it always end in black screen I use endMission "END1";


I played with this recently you need to have a cfgDebriefing section in description.ext

class CfgDebriefing
{  
	class End1
	{
		title = "Mission Completed";
		subtitle = "";
		description = "You successfully rescued our forces and neutralized the spotters, despite being forced to retreat.";
		pictureBackground = "";
		picture = "b_inf";
		pictureColor[] = {0.0,0.3,0.6,1};
	};
};


Then called by:

"End1" call BIS_fnc_endMission;

https://community.bistudio.com/wiki/Debriefing

Bless you my son.

Author Message


Posts: 1473
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#5 Posted at 2014-05-29 17:36        
     
Thanks, but it's still stuck in intro using that.


Author Message

SavageCDN  

Armaholics priest


Posts: 475
Rank:


Country: ca
Location: Ottawa
Occupation: Fighting with Exchange
Age: 44
In-game name: =VG= SavageCDN

 
#6 Posted at 2014-05-29 22:08        
     
Sorry I must have misunderstood the question :-) Not sure why it would be in an intro script anyway... but the function does work if called from trigger, etc. You get the 'closing shot' - your loadscreen.jpg image and any text you add in the cfgDebriefing section, as well as a list of kills by player.

Bless you my son.