Page 1 of 1

Weird Issue: Screen Blacking Out

PostPosted: Mon Jul 03, 06 5:07 am
by Allan
Right, as i'm ironing out the creases for the inevitable final, FINAL release of SuperMod, i've been going through the files in the pack with a fine tooth-comb. During a late testing session, I've found that something weird happens if you shoot a certain projectile class at a pawn. Your screen blacks out...
Here's the code for the projectile class:

Code: Select all
class BlastAwayGren expands DeusExProjectile;

var ParticleGenerator smokeGen;

Simulated Function Tick(Float DeltaTime)
{}//Dont make gravity effect this projectile!

simulated function DrawExplosionEffects (Vector HitLocation, Vector HitNormal)
{
   local SphereEffect ring;
   local ExplosionLight Light;
   local Pawn player;

   ring=Spawn(Class'SphereEffect',,,HitLocation,rotator(HitNormal));
   if ( ring != None )
   {
      ring.RemoteRole=Role_None;
      ring.size=blastRadius / 256.00;
      Ring.Skin=Texture'AlarmLightTex3';
      Ring.LightType=LT_Steady;
      Ring.LightBrightness=255;
      Ring.LightEffect=LE_NonIncidence;
      Ring.LightHue=0;
      Ring.LightRadius=Ring.Size;
   }
   ring=Spawn(Class'SphereEffect',,,HitLocation,rotator(HitNormal));
   if ( ring != None )
   {
      ring.RemoteRole=Role_None;
      ring.size=blastRadius / 128.00;
      Ring.Skin=Texture'AlarmLightTex5';
      Ring.LightType=LT_Steady;
      Ring.LightBrightness=255;
      Ring.LightEffect=LE_NonIncidence;
      Ring.LightHue=102;
      Ring.LightRadius=Ring.Size;
   }
   ring=Spawn(Class'SphereEffect',,,HitLocation,rotator(HitNormal));
   if ( ring != None )
   {
      ring.RemoteRole=Role_None;
      Ring.Skin=Texture'AlarmLightTex7';
      ring.size=blastRadius / 64.00;
      Ring.LightType=LT_Steady;
      Ring.LightBrightness=255;
      Ring.LightSaturation=32;
      Ring.LightEffect=LE_NonIncidence;
      Ring.LightHue=153;
      Ring.LightRadius=Ring.Size;
   }
   ring=Spawn(Class'SphereEffect',,,HitLocation,rotator(HitNormal));
   if ( ring != None )
   {
      ring.RemoteRole=Role_None;
      Ring.Skin=Texture'AlarmLightTex9';
      ring.size=blastRadius / 32.00;
      Ring.LightType=LT_Steady;
      Ring.LightBrightness=255;
      Ring.LightEffect=LE_NonIncidence;
      Ring.LightHue=51;
      Ring.LightRadius=Ring.Size;
      
   }
}

auto simulated state Flying
{
   simulated function Explode(vector HitLocation, vector HitNormal)
   {
      local actor a;
      local vector VelocityToSet;
      local float dist;
      
         foreach RadiusActors (class'Actor', a, BlastRadius)
         {
            if (a.IsA('DeusExPlayer') && TeamDMGame(DeusExPlayer(Owner).DXGame) != None)
            dist = VSize(a.Location - HitLocation);
            VelocityToSet = (BlastRadius/Dist**1.1)*normal(a.Location - HitLocation)*1200;
            VelocityToset.z += 30;
            VelocityToSet += ((HitNormal * Blastradius) / dist**1.3) * 1300;
            if (a != None)
            {
               if (a.IsA('PlayerPawn'))
               {
                  a.Velocity += VelocityToSet;
               }
            }
         }
      Super.Explode(HitLocation, HitNormal);
   }
}

defaultproperties
{
     bExplodes=True
     blastRadius=1024.000000
     DamageType=exploded
     ItemName="Blast Bomb"
     ItemArticle="a"
     speed=3000.000000
     MaxSpeed=3000.000000
     Damage=5.000000
     MomentumTransfer=20000
     SpawnSound=Sound'DeusExSounds.Weapons.GEPGunFire'
     ImpactSound=Sound'DeusExSounds.Generic.SmallExplosion2'
     Skin=Texture'DeusExDeco.Skins.AlarmLightTex3'
     Mesh=LodMesh'DeusExItems.Tracer'
     DrawScale=0.350000
     bUnlit=True
}


I've found that too many effects used at once can cause this black out effect(During the LaserRifle's development, it was a bitch to perfect, but that's a different story...), and was wondering if this may be the case...

PostPosted: Thu Jul 06, 06 1:05 am
by ~SanguineRose~
[A]Nobodys Star Gate mod has the same problems. I think its due to the
effects. My computer crashes if I look directly at the Super Rocket if it goes
off. Basically blank and unresponsive. Graphics card I guess can't handle
all the detail and effects in the projectile.

I bet if you try less effects it won't crash. Why would you really want 5 spheres? Not to mention Explosions... The explosion code looks strange to
me.

PostPosted: Thu Jul 06, 06 8:09 am
by Allan
Actually, it's 4 spheres, and it looks cool =), but I guess it wouldn't hurt to try removing teh spheres, I'll try that.

Re: Weird Issue: Screen Blacking Out

PostPosted: Thu Jul 06, 06 5:58 pm
by Big Daddy
Allan wrote:Right, as i'm ironing out the creases for the inevitable final, FINAL release of SuperMod, i've been going through the files in the pack with a fine tooth-comb. During a late testing session, I've found that something weird happens if you shoot a certain projectile class at a pawn. Your screen blacks out...
Here's the code for the projectile class:

Code: Select all
class BlastAwayGren expands DeusExProjectile;

var ParticleGenerator smokeGen;

Simulated Function Tick(Float DeltaTime)
{}//Dont make gravity effect this projectile!

simulated function DrawExplosionEffects (Vector HitLocation, Vector HitNormal)
{
   local SphereEffect ring;
   local ExplosionLight Light;
   local Pawn player;

   ring=Spawn(Class'SphereEffect',,,HitLocation,rotator(HitNormal));
   if ( ring != None )
   {
      ring.RemoteRole=Role_None;
      ring.size=blastRadius / 256.00;
      Ring.Skin=Texture'AlarmLightTex3';
      Ring.LightType=LT_Steady;
      Ring.LightBrightness=255;
      Ring.LightEffect=LE_NonIncidence;
      Ring.LightHue=0;
      Ring.LightRadius=Ring.Size;
   }
   ring=Spawn(Class'SphereEffect',,,HitLocation,rotator(HitNormal));
   if ( ring != None )
   {
      ring.RemoteRole=Role_None;
      ring.size=blastRadius / 128.00;
      Ring.Skin=Texture'AlarmLightTex5';
      Ring.LightType=LT_Steady;
      Ring.LightBrightness=255;
      Ring.LightEffect=LE_NonIncidence;
      Ring.LightHue=102;
      Ring.LightRadius=Ring.Size;
   }
   ring=Spawn(Class'SphereEffect',,,HitLocation,rotator(HitNormal));
   if ( ring != None )
   {
      ring.RemoteRole=Role_None;
      Ring.Skin=Texture'AlarmLightTex7';
      ring.size=blastRadius / 64.00;
      Ring.LightType=LT_Steady;
      Ring.LightBrightness=255;
      Ring.LightSaturation=32;
      Ring.LightEffect=LE_NonIncidence;
      Ring.LightHue=153;
      Ring.LightRadius=Ring.Size;
   }
   ring=Spawn(Class'SphereEffect',,,HitLocation,rotator(HitNormal));
   if ( ring != None )
   {
      ring.RemoteRole=Role_None;
      Ring.Skin=Texture'AlarmLightTex9';
      ring.size=blastRadius / 32.00;
      Ring.LightType=LT_Steady;
      Ring.LightBrightness=255;
      Ring.LightEffect=LE_NonIncidence;
      Ring.LightHue=51;
      Ring.LightRadius=Ring.Size;
      
   }
}

auto simulated state Flying
{
   simulated function Explode(vector HitLocation, vector HitNormal)
   {
      local actor a;
      local vector VelocityToSet;
      local float dist;
      
         foreach RadiusActors (class'Actor', a, BlastRadius)
         {
            if (a.IsA('DeusExPlayer') && TeamDMGame(DeusExPlayer(Owner).DXGame) != None)
            dist = VSize(a.Location - HitLocation);
            VelocityToSet = (BlastRadius/Dist**1.1)*normal(a.Location - HitLocation)*1200;
            VelocityToset.z += 30;
            VelocityToSet += ((HitNormal * Blastradius) / dist**1.3) * 1300;
            if (a != None)
            {
               if (a.IsA('PlayerPawn'))
               {
                  a.Velocity += VelocityToSet;
               }
            }
         }
      Super.Explode(HitLocation, HitNormal);
   }
}

defaultproperties
{
     bExplodes=True
     blastRadius=1024.000000
     DamageType=exploded
     ItemName="Blast Bomb"
     ItemArticle="a"
     speed=3000.000000
     MaxSpeed=3000.000000
     Damage=5.000000
     MomentumTransfer=20000
     SpawnSound=Sound'DeusExSounds.Weapons.GEPGunFire'
     ImpactSound=Sound'DeusExSounds.Generic.SmallExplosion2'
     Skin=Texture'DeusExDeco.Skins.AlarmLightTex3'
     Mesh=LodMesh'DeusExItems.Tracer'
     DrawScale=0.350000
     bUnlit=True
}


I've found that too many effects used at once can cause this black out effect(During the LaserRifle's development, it was a bitch to perfect, but that's a different story...), and was wondering if this may be the case...


Told ya dude. This is what my friend is trying to do, a rifle that blacks the screen for a certain amount of time.

PostPosted: Thu Jul 06, 06 6:28 pm
by Allan
This thing blacks out the screen until you die. It cannot be ran on a timer to create an anti-effect. =(

PostPosted: Thu Jul 06, 06 6:36 pm
by Big Daddy
but that still is cool and I told you so :D I feel important (childish moment coming up next post...)


Your Presence rifle thing has the same effect may I just say :?