Jump to content
Sign in to follow this  
acoustic

Mission intro not working for JIP.

Recommended Posts

My intro is being messed up whenever someone JIP. The intro is being executed from initplayerlocal, so shouldn't be any issues on that front. 

 

Code is posted at the bottom of the replies.

Share this post


Link to post
Share on other sites

Showing the briefing screen to JIP is not supported by the engine. So here's a workaround:

// initPlayerLocal.sqf
disableSerialization;
waitUntil {player == player};
openMap [true,true];
waitUntil {!isNull (findDisplay 12)};
_map = findDisplay 12;
_btnContinue = _map ctrlCreate ["RscButton", -1];
_btnContinue ctrlSetPosition [0.8675 * safezoneW + safezoneX, 0.934 * safezoneH + safezoneY, 0.111562 * safezoneW, 0.028* safezoneH];
_btnContinue ctrlSetText "CONTINUE";
_btnContinue buttonSetAction "openMap [false,false];";
_btnContinue ctrlCommit 0;

This forces the map for anyone joining. It creates a button which you can click just like on briefing screen. Of course it is not as nice as the briefing screen because I've spent maybe 20 minutes on this one. Also I didn't test it in MP environment. You probably have to refine it in many ways but it should give you the approximate direction.

 

Questions?

Share this post


Link to post
Share on other sites

Hmm, then maybe that isn't my issue then. 

 

My issue is that my intro gets messed up on JIP. I thought it was related to the briefing, but I guess not if it's not in by default.

 

Everything else works in the intro, except for the fade in. It kinda just skips past that for JIP. Here is the script:

 

Spoiler

playMusic "song1";
40 fadeMusic 0;
0 fadeSound 0;
cutText ["The right to revolt has sources deep in our history. \n \n - William O. Douglas","BLACK FADED",13];
sleep 15;
cutText ["The right to revolt has sources deep in our history. \n \n - William O. Douglas","BLACK IN",18];
28 fadeSound 1;
	"dynamicBlur" ppEffectEnable true;   
	"dynamicBlur" ppEffectAdjust [6];   
	"dynamicBlur" ppEffectCommit 0;     
	"dynamicBlur" ppEffectAdjust [0.0];  
	"dynamicBlur" ppEffectCommit 5;  
sleep 25;

	[ [["Operation Takistani Revolution"], ["July 2017"], ["U.S. Special Forces Unit"], ["Takistan","<t align = 'center' shadow = '1' size = '0.7' font=puristaMedium'>%1</t>", 140]] , 1, 0.75, "<t align = 'center' shadow = '1' size = '1.0'>%1</t>"] spawn BIS_fnc_typeText; 

 

 

Share this post


Link to post
Share on other sites

Update, getting weird results with JIP. Some commenting that its not showing at all.

 

Intro is executed from playerlocal init with "execVM "missionIntro.sqf";"

Share this post


Link to post
Share on other sites

Negative. However, that part is actually working for JIP. 

 

 

Usually it is at least. Getting weird results.

Share this post


Link to post
Share on other sites

here is a intro ive used a few times. (maybe you could get something from it.

executed from init.sqf

execVM "your folder\intro.sqf";

 

intro.sqf

if (!isDedicated) then {
   waitUntil {!isNull player};
       if (local player) then {
             sleep 0.0005;// these ubove lines i belive is what does the trick
             execVM "execute some code";//i used a gear script here
		     player setRank "PRIVATE"; // used for a ranking system or just to set everyone the same
			 player addrating 99999; //used so ai of the same side dont kill you (if you had killed one of them)
			 sleep 1;
//the intro 
         if (paramsArray select 4 == 1) then {
      playMusic "SABBATH";
	  [    [      [format ["%1",name player],"<t align = 'center' shadow = '1' size = '3'>%1</t><br/><br/>"],
      ["WELCOME TO","<t align = 'center' shadow = '1' size = '1' font='TahomaB'>%1</t><br/>"],
      ["KiLL ZoNe","<t align = 'center' shadow = '1' size = '1' font='PuristaBold'>%1</t><br/>"],
      ["KiLL To Rank Up","<t align = 'center' shadow = '1' size = '0.5' font='TahomaB'>%1</t><br/><br/><br/>",20],
      ["MISSION-BLOODBATH","<t align = 'center' shadow = '1' size = '0.3'>%1</t>",70]    ], 0, 0, "<t align = 'center' shadow = '1' size = '1.0'>%1</t>"	] spawn BIS_fnc_typeText;
	  sleep 30;
	  5 fadeMusic 0;
	  };
   };
};

I think you can see what you are missing

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  

×