Ejemplo n.º 1
0
        public async Task Start()
        {
            Active = true;
            for (int i = 0; i < MaxFlames; i++)
            {
                Flames.Add(new Flame(Position.Around(0, MaxSpreadDistance)));
            }
            ParticleEffectsAsset asset = new ParticleEffectsAsset("scr_agencyheistb");
            await asset.Request(1000);

            SmokePTFX = asset.CreateEffectAtCoord("scr_env_agency3b_smoke", Position, scale: MaxSpreadDistance * 0.5f, startNow: true);
            //SmokePTFX = Function.Call<uint>(Hash.START_PARTICLE_FX_LOOPED_AT_COORD, "scr_env_agency3b_smoke", Position.X, Position.Y, Position.Z + 0.87, 0, 0, 0, 5, 0, 0, 0, 0);
            //Function.Call(Hash.SET_PARTICLE_FX_LOOPED_ALPHA, SmokePTFX, 1);
            if (this.Explosion)
            {
                World.AddExplosion(Position, ExplosionType.Propane, 1, 1, aubidble: true);
                ParticleEffectsAsset expl_asset = new ParticleEffectsAsset("scr_trevor3");
                await expl_asset.Request(1000);

                Vector3 pos = Position;
                pos.Z += 1;
                expl_asset.StartNonLoopedAtCoord("scr_trev3_trailer_expolsion", pos);
            }
            if (API.GetInteriorAtCoords(Position.X, Position.Y, Position.Z) == 0)
            {
                InteriorSmokePTFX = asset.CreateEffectAtCoord("scr_env_agency3b_smoke", Position, scale: 5, startNow: true);
            }
            //FireScript.WriteDebug("Started fire");
        }
Ejemplo n.º 2
0
        private async Task startSmoke(Vector3 pos, float scale)
        {
            ParticleEffectsAsset asset = new ParticleEffectsAsset("scr_agencyheistb");
            await asset.Request(1000);

            SmokeWithoutFire.Add(Tuple.Create(asset.CreateEffectAtCoord("scr_env_agency3b_smoke", pos, scale: scale, startNow: true), pos));
        }
Ejemplo n.º 3
0
        public async Task Start()
        {
            Active       = true;
            this.FlameID = API.StartScriptFire(Position.X, Position.Y, Position.Z, 25, false);

            ParticleEffectsAsset asset = new ParticleEffectsAsset("scr_trevor3");
            await asset.Request(1000);

            Vector3 smokepos = Position;

            smokepos.Z += 0.4f;
            FlamePTFX   = asset.CreateEffectAtCoord("scr_trev3_trailer_plume", smokepos, scale: 0.7f, startNow: true);
            //FlamePTFX = Function.Call<int>(Hash.START_PARTICLE_FX_LOOPED_AT_COORD, "scr_trev3_trailer_plume", Position.X, Position.Y, Position.Z + 0.4, 0, 0, 0, 0.7, 0, 0, 0, 0);
            //Function.Call(Hash.SET_PARTICLE_FX_LOOPED_ALPHA, FlamePTFX, 1);
        }