3 protected bool m_IsCharFemale;
4 protected int m_LastPlayedCharacterID;
14 protected ref IntroSceneCharacter m_Character;
15 protected Camera m_SceneCamera;
17 protected Object m_Clutter;
18 protected vector m_CharacterPos;
19 protected vector m_CharacterDir;
38 m_MenuData =
g_Game.GetMenuData();
40 m_LastPlayedCharacterID = m_MenuData.GetLastPlayedCharacter();
41 m_CharacterPos =
"0 0 0";
42 m_CharacterDir =
"0 0 0";
45 if ( m_MenuData.GetCharactersCount() == 0 )
47 m_LastPlayedCharacterID = -1;
50 if ( m_LastPlayedCharacterID > -1 )
52 m_MenuData.GetCharacterName(m_LastPlayedCharacterID,
g_Game.GetPlayerGameName());
57 camera_position[0] = 1323.0;
58 camera_position[1] = 1.0;
59 camera_position[2] = 1590.37;
60 float camera_rotation_h = 100;
61 float camera_rotation_v = -3;
62 float camera_fov = 0.85;
63 float camera_focus_distance = 0.0;
64 float camera_focus_streght = 0.0;
67 float character_distance = 2.25;
70 m_SceneCamera = CameraCreate(camera_position, camera_rotation_h, camera_rotation_v, camera_fov, camera_focus_distance, camera_focus_streght);
71 m_SceneCamera.SetActive(
true);
76 vector cam_dir = m_SceneCamera.GetDirection();
77 m_CharacterPos = camera_position + ( cam_dir * character_distance );
78 m_CharacterPos[1] =
GetGame().SurfaceY(m_CharacterPos[0], m_CharacterPos[2]);
79 m_CharacterDir = (camera_position - m_CharacterPos);
81 float overcast = 0.42;
85 m_Weather =
g_Game.GetWeather();
86 m_Weather.GetOvercast().SetLimits(overcast, overcast);
87 m_Weather.GetRain().SetLimits(rain, rain);
88 m_Weather.GetFog().SetLimits(fog, fog);
90 m_Weather.GetOvercast().Set(overcast, 0, 0);
91 m_Weather.GetRain().Set(rain, 0, 0);
92 m_Weather.GetFog().Set(fog, 0, 0);
94 m_Character =
new IntroSceneCharacter();
95 m_Character.LoadCharacterData(m_CharacterPos, m_CharacterDir);
97 m_TimerParticle.Run(0.1,
this,
"SetupParticles",
null,
false);
101 vector clut_pos = SnapToGround( m_CharacterPos +
"-1 0 0" );
102 m_Clutter =
GetGame().CreateObject(
"ClutterCutter2x2", clut_pos,
true );
105 CheckXboxClientUpdateLoopStart();
107 g_Game.SetHudBrightness(
g_Game.GetHUDBrightnessSetting());
121 if ( m_TimerParticle )
123 m_TimerParticle.Stop();
124 delete m_TimerParticle;
125 m_TimerParticle =
null;
136 CheckXboxClientUpdateLoopStop();
138 GetGame().ObjectDelete( m_SceneCamera );
142 m_MenuData.ClearCharacters();
152 protected void SetInitPostprocesses()
154 PPERequester_MenuEffects requester;
155 Class.CastTo(requester,PPERequesterBank.GetRequester(PPERequester_MenuEffects));
157 requester.SetVignetteIntensity(0.3);
158 PPERequesterBank.GetRequester(PPERequester_IntroChromAbb).Start();
164 IntroSceneCharacter GetIntroCharacter()
172 void SetupCharacter()
174 if ( m_Character.GetCharacterObj() )
176 vector v = m_Character.GetCharacterObj().GetOrientation();
178 m_Character.GetCharacterObj().SetOrientation(v);
185 void SetupParticles()
190 SEffectManager.PlayInWorld(m_FXParticleCarSmoke,
"1331.52 2.34052 1593.55");
192 vector pos = m_SceneCamera.GetPosition() + m_SceneCamera.GetDirection() * 1.5;
193 vector dir = m_SceneCamera.GetDirection();
198 vector pos_right = pos + (dir * 1.5);
199 vector pos_left = pos + (-dir * 1.5);
220 void CheckXboxClientUpdateLoopStart()
222 if ( CheckXboxClientUpdate() )
224 m_TimerClientUpdate.Run(30,
this,
"CheckXboxClientUpdate",
null,
true);
231 void CheckXboxClientUpdateLoopStop()
233 if ( m_TimerClientUpdate )
235 m_TimerClientUpdate.Stop();
236 delete m_TimerClientUpdate;
237 m_TimerClientUpdate =
null;
244 bool CheckXboxClientUpdate()
252 protected Camera CameraCreate(
vector cam_pos,
float cam_rot_h,
float cam_rot_v,
float cam_fov,
float cam_focus_dist,
float cam_focus_strg)
254 Camera cam =
Camera.Cast(
g_Game.CreateObject(
"staticcamera", SnapToGround(cam_pos),
true));
255 cam.SetOrientation(
Vector( cam_rot_h, cam_rot_v, 0) );
256 cam.SetFOV( cam_fov );
257 cam.SetFocus(cam_focus_dist, cam_focus_strg);
267 return m_SceneCamera;
273 void ResetIntroCamera()
281 void SetCharacterFemale(
bool fem)
283 m_IsCharFemale = fem;
289 bool IsCharacterFemale()
291 return m_IsCharFemale;
297 void CreateRandomCharacter()
299 string character_name;
302 m_IsCharFemale =
Math.RandomInt(0, 2);
306 character_name = m_CharPersonalityFemaleList.GetRandomElement();
310 character_name = m_CharPersonalityMaleList.GetRandomElement();
316 void UpdateSelectedUserName()
322 BiosUser user = user_manager.GetSelectedUser();
325 g_Game.SetPlayerGameName( user.GetName() );
332 void UpdateCharacterPos()
334 if (m_Character.GetCharacterObj())
336 m_Character.GetCharacterObj().SetPosition(m_CharacterPos);
337 m_Character.GetCharacterObj().SetDirection(m_CharacterDir.Normalized() );
341 void SaveCharName(
string name )
343 GetDayZGame().InitCharacterMenuDataInfo(m_MenuData.GetCharactersCount());
347 m_MenuData.SetCharacterName(m_LastPlayedCharacterID,
name);
349 if (m_Character.IsDefaultCharacter())
351 GetGame().GetMenuDefaultCharacterData().SetCharacterName(
name);
353 m_MenuData.SaveCharactersLocal();
359 float pos_x = pos[0];
360 float pos_z = pos[2];
361 float pos_y =
GetGame().SurfaceY(pos_x, pos_z);
363 tmp_pos[1] = tmp_pos[1] + pos[1];