Jump to content
Sign in to follow this  
Bulldog72

JIP troubles...

Recommended Posts

When exactly does the player start to "see" terrain through his toon's eyes and how can I pinpoint this moment?

My init works with one little problem: for less than a second or so but clearly too long the JIP player can see himself standing in the location where the unit was placed on in the editor; then the jip spawn script moves him into a parachute as it should be.

Below are the relevant parts of my init.sqf:

...
[] execVM "briefing.sqf";
finishMissionInit;

//non-JIP
if (!(isNull player)) then
{
player switchMove "amovpercmstpslowwrfldnon_player_idlesteady03";
};

//JIPs
if (!isServer && isNull player) then
{
 cutText ["JIP spawn...","BLACK",0];
 waitUntil {!isNull player};
[] execVM "scripts\JIP_spawn.sqf";
};

As soon as I know I have a JIP I black out the screen so he would'nt see the "wrong" location. The jip_spawn.sqf creates the parachute, moves the player in it and then I restore his vision.

But I'm not fast enough obviously because for half a second or so, he still can see himself standing in the wrong location waiting for the jip script to move him... how can I get rid of that?

Share this post


Link to post
Share on other sites

Put this in init.sqf:

if (!isDedicated) then {
   onPreloadFinished {
       // player can now see the 3D world
       // Execute whatever you want but be aware this is executed in a eventhandler environment
       onPreloadFinished {};
   };
};

In your code snippet above remove finishMissionInit (absolutely not needed) and execute briefing.sqf once the player object is not null anymore (important for JIP).

Xeno

Share this post


Link to post
Share on other sites

You can also cover the screen black from the very beginning in the init.sqs and then fade in the screen after one or a few seconds:

Put into init.sqs at its VERY END:

if (isDedicated) then {exit};
0 fadesound 0;
0 fademusic 0;
0 cutText ["","black faded",0];
~1.0
1 fadesound 1;
1 fademusic 1;
0 cutText ["","plain in",1];

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  

×