private void IntroCutscene() { IntroState = CharIntroState.Init; //Fade out Game.FadeScreenOut(2000); Wait(2000); World.CurrentDayTime = new TimeSpan(12,30,0); Wait(1000); //Init if (Game.Player.Character.IsInVehicle()) { Game.Player.Character.Task.WarpOutOfVehicle(Game.Player.Character.CurrentVehicle); } Game.Player.Character.Position = _playerPosition; World.RenderingCamera = null; Function.Call(Hash.DISPLAY_HUD, 0); Function.Call(Hash.DISPLAY_RADAR, 0); Function.Call(Hash.SET_PLAYER_INVINCIBLE, Game.Player.Handle, true); World.Weather = Weather.Christmas; Model m = RPG.PlayerData.ModelHash; m.Request(1000); Function.Call(Hash.SET_PLAYER_MODEL, Game.Player.Handle, m.Hash); RPGMethods.LoadVariations(); Game.Player.Character.Position = new Vector3(_playerPosition.X, _playerPosition.Y, _playerPosition.Z + 200); Wait(500); Game.FadeScreenIn(2000); Wait(3000); Function.Call(Hash.SET_TIME_SCALE, 0.5f); Function.Call(Hash.SET_TIMECYCLE_MODIFIER, "phone_cam4"); //Game.PlayMusic("PROLOGUE_TEST_MISSION_START"); var bgMusic = RPG.Audio.PlayMusic("intro"); //A IntroState = CharIntroState.A; while(Game.Player.Character.HeightAboveGround > 80.0F) Yield(); Game.FadeScreenOut(500); Wait(500); //B //Game.PlayMusic("RAMPAGE_1_OS"); IntroState = CharIntroState.B; World.Weather = Weather.ExtraSunny; Function.Call(Hash.SET_TIMECYCLE_MODIFIER, ""); Game.Player.Character.Position = new Vector3(_playerPosition.X, _playerPosition.Y, _playerPosition.Z - 0.25f); SetCam(Game.Player.Character.Position + new Vector3(0, 50, 25),true); Game.FadeScreenIn(500); Game.Player.CanControlCharacter = true; Wait(5000); //C IntroState = CharIntroState.C; SetCam(Game.Player.Character.Position + Game.Player.Character.ForwardVector * 2f + new Vector3(-0.8f,0,0.8f)); Wait(5000); //D IntroState = CharIntroState.D; SetCam(Game.Player.Character.Position + new Vector3(25, 80, 25)); Wait(5000); //E IntroState = CharIntroState.E; SetCam(Game.Player.Character.Position + new Vector3(75, 25, 100)); Wait(7500); //Finished IntroState = CharIntroState.Finished; Game.FadeScreenOut(500); Wait(500); World.RenderingCamera = null; Function.Call(Hash.DISPLAY_HUD, 1); Function.Call(Hash.DISPLAY_RADAR, 1); Function.Call(Hash.SET_PLAYER_INVINCIBLE, Game.Player.Handle, false); World.Weather = Weather.ExtraSunny; Function.Call(Hash.SET_TIME_SCALE, 1.0f); Function.Call(Hash.SET_TIMECYCLE_MODIFIER, ""); //Move Player Game.Player.Character.Position = _playerPosition; Game.Player.Character.Heading = _playerHeading; Wait(500); //Give and spawn stuff:: //Give Weps RPG.PlayerData.Weapons.AddRange(WeaponRepository.Weapons); RPG.PlayerData.GetWeapon(WeaponHash.Pistol).Unlocked = true; RPG.PlayerData.GetWeapon(WeaponHash.Pistol).AmmoCount = 100; RPG.PlayerData.GetWeapon(WeaponHash.AssaultRifle).Unlocked = true; RPG.PlayerData.GetWeapon(WeaponHash.AssaultRifle).AmmoCount = 1000; RPG.SaveAllData(); Wait(500); RPG.InitCharacter(); Game.FadeScreenIn(500); RPG.GameHandler.Init(); RPG.GameLoaded = true; bgMusic.Dispose(); Wait(5000); RPG.GetPopup<TutorialBox>().Show("A new quest has started and has been added to your tracker.","Press J to open up your menu."); Enabled = false; }
public static void RestartCharCreation() { State = CharCreationState.PickMotives; IntroState = CharIntroState.Init; RPG.Audio.DisposeAll(); Initialised = false; Enabled = true; }