コード例 #1
0
ファイル: Fire.cs プロジェクト: Whiteland92/FireScript
        public async Task Start()
        {
            Active          = true;
            FireHaveStarted = 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");
        }
コード例 #2
0
ファイル: Extensions.cs プロジェクト: wowpanda/FireScript
 public static void RemovePTFX(this CoordinateParticleEffect fx)
 {
     if (fx != null && API.DoesParticleFxLoopedExist(fx.Handle))
     {
         API.StopParticleFxLooped(fx.Handle, true);
         API.RemoveParticleFx(fx.Handle, true);
     }
 }
コード例 #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);
        }