Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
waitUntil {!isNil ("dayzLoginRecord")};
//intro move
showCinemaBorder true;
camUseNVG false;
_camera = "camera" camCreate [(position player select 0)-100*sin (round(random 359)), (position player select 1)-100*cos (round(random 359)),(position player select 2)+60];
_camera cameraEffect ["internal","back"];
_camera camSetFOV 2.000;
_camera camCommit 0;
waitUntil {camCommitted _camera};
_camera camSetTarget vehicle player;
_camera camSetRelPos [0,0,0];
_camera camCommit 8;
waitUntil {camCommitted _camera};
_camera cameraEffect ["terminate","back"];
camDestroy _camera;
if (!isDedicated) then {
//Conduct map operations
0 fadeSound 0;
waitUntil {!isNil "dayz_loadScreenMsg"};
dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
//Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "camera_init.sqf";}];
_playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
_nul = [] execVM "camera_init.sqf";
I'm looking for the same thing. Not that into replacing things though. Would you mind explaining further Iport3?camera_init.sqf
mpmission init.sqfCode:waitUntil {!isNil ("dayzLoginRecord")}; //intro move showCinemaBorder true; camUseNVG false; _camera = "camera" camCreate [(position player select 0)-100*sin (round(random 359)), (position player select 1)-100*cos (round(random 359)),(position player select 2)+60]; _camera cameraEffect ["internal","back"]; _camera camSetFOV 2.000; _camera camCommit 0; waitUntil {camCommitted _camera}; _camera camSetTarget vehicle player; _camera camSetRelPos [0,0,0]; _camera camCommit 8; waitUntil {camCommitted _camera}; _camera cameraEffect ["terminate","back"]; camDestroy _camera;
Code:if (!isDedicated) then { //Conduct map operations 0 fadeSound 0; waitUntil {!isNil "dayz_loadScreenMsg"}; dayz_loadScreenMsg = (localize "STR_AUTHENTICATING"); //Run the player monitor _id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "camera_init.sqf";}]; _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf"; _nul = [] execVM "camera_init.sqf";
One last thing.
The script seems to be working for some players but not for others (me being one of the others). Is it disabled under certain graphics settings?
Thanks
camera_init.sqf
mpmission init.sqfCode:waitUntil {!isNil ("dayzLoginRecord")}; //intro move showCinemaBorder true; camUseNVG false; _camera = "camera" camCreate [(position player select 0)-100*sin (round(random 359)), (position player select 1)-100*cos (round(random 359)),(position player select 2)+60]; _camera cameraEffect ["internal","back"]; _camera camSetFOV 2.000; _camera camCommit 0; waitUntil {camCommitted _camera}; _camera camSetTarget vehicle player; _camera camSetRelPos [0,0,0]; _camera camCommit 8; waitUntil {camCommitted _camera}; _camera cameraEffect ["terminate","back"]; camDestroy _camera;
Code:if (!isDedicated) then { //Conduct map operations 0 fadeSound 0; waitUntil {!isNil "dayz_loadScreenMsg"}; dayz_loadScreenMsg = (localize "STR_AUTHENTICATING"); //Run the player monitor _id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "camera_init.sqf";}]; _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf"; _nul = [] execVM "camera_init.sqf";
private [ "_camera", "_welcomeMessage", "_camDistance" ];
_welcomeMessage = format["Welcome to AlienX's UK130 Server %1, Enjoy your stay!",format["%1", name player]];
_camDistance = 60;
waitUntil {!isNil ("dayzLoginRecord")};
//intro move
showCinemaBorder true;
camUseNVG false;
_camera = "camera" camCreate [(position player select 0)-2, position player select 1,(position player select 2)+_camDistance];
_camera cameraEffect ["internal","back"];
_camera camSetFOV 2.000;
_camera camCommit 0;
waitUntil {camCommitted _camera};
_camera camSetTarget vehicle player;
_camera camSetRelPos [0,0,2];
_camera camCommit 8;
cutText [_welcomeMessage, "PLAIN DOWN"];
waitUntil {camCommitted _camera};
_camera cameraEffect ["terminate","back"];
camDestroy _camera;
/*
INITILIZATION
*/
startLoadingScreen ["","RscDisplayLoadCustom"];
cutText ["","BLACK OUT"];
enableSaving [false, false];
//REALLY IMPORTANT VALUES
dayZ_instance = 1; //The instance
dayzHiveRequest = [];
initialized = false;
dayz_previousID = 0;
dayzLoginRecord = nil; //New line is here!
~~~ Rest of file ~~~
if (!isDedicated) then {
//Conduct map operations
0 fadeSound 0;
waitUntil {!isNil "dayz_loadScreenMsg"};
dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
//Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "camera_init.sqf";}];
_playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
_nul = [] execVM "camera\loginCamera.sqf";
};
Hello all,
I saw this and instantly wanted it - however it was bad to see that it didnt work upon next login until the server is rebooted.
However, i have fixed this now, and also i have made some small changes to the script.
This is how its setup on my mission:
1) create a folder called Camera inside your mission folder
2) create a file called loginCamera.sqf and paste the following code into it:
Code:private [ "_camera", "_welcomeMessage", "_camDistance" ]; _welcomeMessage = format["Welcome to AlienX's UK130 Server %1, Enjoy your stay!",format["%1", name player]]; _camDistance = 60; waitUntil {!isNil ("dayzLoginRecord")}; //intro move showCinemaBorder true; camUseNVG false; _camera = "camera" camCreate [(position player select 0)-2, position player select 1,(position player select 2)+_camDistance]; _camera cameraEffect ["internal","back"]; _camera camSetFOV 2.000; _camera camCommit 0; waitUntil {camCommitted _camera}; _camera camSetTarget vehicle player; _camera camSetRelPos [0,0,2]; _camera camCommit 8; cutText [_welcomeMessage, "PLAIN DOWN"]; waitUntil {camCommitted _camera}; _camera cameraEffect ["terminate","back"]; camDestroy _camera;
You can modify the _camDistance and _welcomeMessage all you want (This camera flies from above the player down towards his/her position making quite a nice effect)
Save this file.
Now, modify the init.sqf:
Near the top of the file, enter the line: 'dayzLoginRecord = nil;'
Code:/* INITILIZATION */ startLoadingScreen ["","RscDisplayLoadCustom"]; cutText ["","BLACK OUT"]; enableSaving [false, false]; //REALLY IMPORTANT VALUES dayZ_instance = 1; //The instance dayzHiveRequest = []; initialized = false; dayz_previousID = 0; dayzLoginRecord = nil; //New line is here! ~~~ Rest of file ~~~
Then at the bottom of the file enter the line: '_nul = [] execVM "camera\loginCamera.sqf";'
Code:if (!isDedicated) then { //Conduct map operations 0 fadeSound 0; waitUntil {!isNil "dayz_loadScreenMsg"}; dayz_loadScreenMsg = (localize "STR_AUTHENTICATING"); //Run the player monitor _id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "camera_init.sqf";}]; _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf"; _nul = [] execVM "camera\loginCamera.sqf"; };
This works for me, i hope it works for you!
p.s.
The problem was always due to the 'dayzRecordLogin' variable, this seemed to never be reset to nil after the mission was unloaded. - Forcing it to nil allows the camera (and other things that rely on it) to correctly execute when the player has logged in.
I'm looking for this too. Only on fresh spawns - first time logging in after death.Awesome. Any way to limit this to fresh spawn only? So that it doesn't happen for every player that logs in?
how to add music?