void insteantTravel(Delorean delorean, effects worm)
        {
            Vehicle DMC = delorean.getDelorean();

            DMC.DirtLevel = 12;
            Function.Call(Hash.SET_CLOCK_TIME, ((delorean.fh1 * 10) + delorean.fh2), ((delorean.fm1 * 10) + delorean.fm2), 0);
            if (delorean.refilltimecurcuits)
            {
                Sounds.sparksfeul.Stop();
            }
            Script.Wait(10);
            delorean.timetravelentry();
            Script.Wait(10);
            Sounds.Timetravelreentery.Play();
            Script.Wait(10);
            if (!delorean.RCmode)
            {
                removePedsandVehicles(DMC);
            }
            else
            {
                TTTFmenu.RCmode  = false;
                TTTFmenu.rcmodel = "";
                mainsystem.TTTF.setmenu(true);
                delorean.ToggleRCmode();
            }
            Script.Wait(10);
            Game.Player.WantedLevel = 0;
            Script.Wait(10);
            delorean.refilltimecurcuits = false;
            Script.Wait(10);
        }
        public override void runningCircuits(Delorean delorean, effects worm)
        {
            if (delorean != null)
            {
                Vehicle Deloreancar = delorean.getDelorean();
                #region functions

                #endregion
                int tempspeed = (int)((Deloreancar.Speed / .27777) / 1.60934);
                if (delorean.toggletimecurcuits)
                {
                    worm.wormhole(Deloreancar, tempspeed, delorean.refilltimecurcuits);

                    if (tempspeed > 84)
                    {
                        worm.below84 = true;
                    }
                    if (tempspeed >= 88)
                    {
                        to88(tempspeed, delorean, worm);
                    }
                    else if (tempspeed < 84)
                    {
                        errorbool = false;
                        below88(delorean, worm);
                    }
                }
                else
                {
                    resetTravel(tempspeed, delorean, worm);
                }
            }
        }
        public override void runningCircuits(Delorean delorean, effects worm)
        {
            if (delorean != null)
            {
                Vehicle Deloreancar = delorean.getDelorean();
                int     tempspeed   = (int)((Deloreancar.Speed / .27777) / 1.60934);
                #region functions
                if (Deloreancar.DirtLevel > 0)
                {
                    Deloreancar.DirtLevel -= 0.001f;
                }

                if (Deloreancar.Model == new Model("BTTF3rr"))
                {
                    if (Game.IsKeyPressed(System.Windows.Forms.Keys.W))
                    {
                        if (tempspeed < 45)
                        {
                            Deloreancar.ApplyForceRelative(new Vector3(0, 0.5f, 0));
                        }
                    }
                    if (Game.IsKeyPressed(System.Windows.Forms.Keys.S))
                    {
                        if (tempspeed < 45)
                        {
                            Deloreancar.ApplyForceRelative(new Vector3(0, -0.5f, 0));
                        }
                    }
                    Deloreancar.FuelLevel = 0;
                }
                #endregion

                if (delorean.toggletimecurcuits)
                {
                    displaymodelOnOff(delorean, delorean.toggletimecurcuits);
                    worm.wormhole(Deloreancar, tempspeed, delorean.refilltimecurcuits);
                    if (tempspeed > 64)
                    {
                        worm.below84 = true;
                    }
                    if (tempspeed >= 88)
                    {
                        to88(tempspeed, delorean, worm);
                    }
                    else if (tempspeed < 64)
                    {
                        errorbool = false;
                        below88(delorean, worm);
                    }
                }
                else
                {
                    resetTravel(tempspeed, delorean, worm);
                }
            }
        }
 void resetTravel(int speed, Delorean delorean, effects worm)
 {
     if (speed < 84 && delorean.timeTraveled && !worm.below84)
     {
         Sounds.sparksbttf3.Stop();
         Sounds.sparksfeul.Stop();
         worm.resetwormhole();
         delorean.timeTraveled = false;
     }
 }
 void below88(Delorean delorean, effects worm)
 {
     stoponce = false;
     if (worm.below84)
     {
         Sounds.sparksbttf3.Stop();
         Sounds.sparksfeul.Stop();
         worm.resetwormhole();
     }
 }
        void cutScene(Delorean delorean, effects worm)
        {
            Vehicle DMC = delorean.getDelorean();

            DMC.IsInvincible = true;
            if (delorean.refilltimecurcuits)
            {
                Sounds.sparksfeul.Stop();
                Sounds.sparksbttf3.Stop();
            }
            effects.make_effect("scr_rcpaparazzo1", "scr_rcpap1_camera", DMC);
            Sounds.Timetravelreenterycutscene3.Play();
            if (!stoponce)
            {
                DMC.FreezePosition = true;
                DMC.HasCollision   = false;
                stoponce           = true;
            }
            DMC.IsVisible     = false;
            DMC.EngineRunning = false;

            // TODO - replace flame trail effects for bttf3 and bttf3rr
            if (Game.Player.Character.IsInVehicle(DMC))
            {
                if (Game.Player.WantedLevel > 0)
                {
                    Game.Player.WantedLevel = 0;
                }
                delorean.timetravelentry();
                CharacterTravel(delorean);
                reentry(DMC);
            }
            else
            {
                delorean.timetravelentry();
                delorean.refilltimecurcuits = false;
                Script.Wait(10);
            }
        }
 void to88(int speed, Delorean delorean, effects worm)
 {
     if (delorean.refilltimecurcuits)
     {
         double time = 0;
         time = Sounds.sparksfeul.gettime();
         if (time < 3000)
         {
             worm.wormholeAndTravel(delorean.getDelorean(), speed, delorean.refilltimecurcuits);
         }
         else
         {
             delorean.timeTraveled = true;
             if (Function.Call <int>(Hash.GET_FOLLOW_VEHICLE_CAM_VIEW_MODE) == 4)
             {
                 insteantTravel(delorean, worm);
             }
             else
             {
                 cutScene(delorean, worm);
             }
         }
     }
 }
Exemplo n.º 8
0
        public override void runningCircuits(Delorean delorean, effects worm)
        {
            if (delorean != null)
            {
                Vehicle Deloreancar = delorean.getDelorean();
                #region functions
                if (timecurcuitssystem.effectProps[Deloreancar.NumberPlate.Trim()].ice.Alpha > 0)
                {
                    timecurcuitssystem.effectProps[Deloreancar.NumberPlate.Trim()].ice.Alpha -= 1;
                }

                if (Deloreancar.Model == new Model("BTTF2") && flyingison)
                {
                    if (Deloreancar.HeightAboveGround > 1)
                    {
                        Deloreancar.ApplyForce(new Vector3(0, 0, 0.17f));
                    }
                    else
                    {
                        flyingison = false;
                    }
                }
                else if (Deloreancar.Model == new Model("BTTF2F"))
                {
                    if (Deloreancar.IsDoorBroken(VehicleDoor.BackLeftDoor) && Deloreancar.IsDoorBroken(VehicleDoor.BackRightDoor))
                    {
                        if (Deloreancar.EngineHealth > 0)
                        {
                            Deloreancar.EngineHealth--;
                        }
                    }
                    else if (Deloreancar.IsDoorBroken(VehicleDoor.BackLeftDoor) || Deloreancar.IsDoorBroken(VehicleDoor.BackRightDoor))
                    {
                        if (Deloreancar.EngineHealth > 500)
                        {
                            Deloreancar.EngineHealth--;
                        }
                        else
                        {
                            Deloreancar.EngineHealth = 500;
                        }
                    }
                    flyingison = true;
                }
                #endregion
                int tempspeed = (int)((Deloreancar.Speed / .27777) / 1.60934);

                if (delorean.toggletimecurcuits)
                {
                    displaymodelOnOff(delorean, delorean.toggletimecurcuits);
                    worm.wormhole(Deloreancar, tempspeed, delorean.refilltimecurcuits);
                    if (tempspeed > 84)
                    {
                        worm.below84 = true;
                    }
                    if (tempspeed >= 88)
                    {
                        to88(tempspeed, delorean, worm);
                    }
                    else if (tempspeed < 84)
                    {
                        errorbool = false;
                        below88(delorean, worm);
                    }
                }
                else
                {
                    resetTravel(tempspeed, delorean, worm);
                }
            }
        }
 public virtual void runningCircuits(Delorean delorean, effects worm)
 {
 }
        void cutScene(Delorean delorean, effects worm)
        {
            Vehicle DMC = delorean.getDelorean();

            DMC.IsInvincible = true;
            if (delorean.refilltimecurcuits)
            {
                Sounds.sparksfeul.Stop();
            }
            int temp = effects.make_effect("core", "veh_exhaust_spacecraft", "", "", "", new Vector3(0f, 0f, 0f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);

            Sounds.Timetravelreenterycutscene.Play();
            if (!stoponce)
            {
                DMC.FreezePosition = true;
                DMC.HasCollision   = false;
                stoponce           = true;
            }

            DMC.IsVisible     = false;
            DMC.EngineRunning = false;
            timecurcuitssystem.effectProps[DMC.NumberPlate.Trim()].wormholeHide(DMC);
            float fireY = -0.1f;

            flameTrails[0] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(1f, fireY, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);
            flameTrails[1] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(-1f, fireY, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);

            flameTrails[2] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(1f, fireY + 1.5f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);
            flameTrails[3] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(-1f, fireY + 1.5f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);

            flameTrails[4] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(1f, fireY + 3f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);
            flameTrails[5] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(-1f, fireY + 3f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);

            flameTrails[6] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(1f, fireY + 4.5f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);
            flameTrails[7] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(-1f, fireY + 4.5f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);

            flameTrails[8] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(1f, fireY + 6f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);
            flameTrails[9] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(-1f, fireY + 6f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);

            flameTrails[10] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(1f, fireY + 7.5f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);
            flameTrails[11] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(-1f, fireY + 7.5f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);

            flameTrails[12] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(1f, fireY + 9f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);
            flameTrails[13] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(-1f, fireY + 9f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);

            flameTrails[14] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(1f, fireY + 10.5f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);
            flameTrails[15] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(-1f, fireY + 10.5f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC);

            //if (Function.Call<bool>(Hash.IS_VEHICLE_EXTRA_TURNED_ON, new InputArgument[] { DMC, 10 }))
            //{
            //    Function.Call(Hash.SET_VEHICLE_EXTRA, new InputArgument[] { DMC, 10, -1 });
            //}
            effects.reseteffects(temp);
            if (Game.Player.Character.IsInVehicle(DMC))
            {
                if (Game.Player.WantedLevel > 0)
                {
                    Game.Player.WantedLevel = 0;
                }
                delorean.timetravelentry();
                CharacterTravel(delorean);
                reentry(DMC);
            }
            else
            {
                delorean.timetravelentry();
                delorean.refilltimecurcuits = false;
                Script.Wait(10);
            }
        }