Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
CaptainManiac

My first try to make a enviromnental damage thing and attach a custom damage to it.It shittily crashes.SUmmoning it freezes and crashes the game.

Question


actor RadiationZoneSmallAmount:ExplosiveBarrel 20000
{
-shootable
-solid
DamageType "Radiation"
RenderStyle Translucent
States
{
Spawn:
TNT1 A 0 A_Explode(10,100)
TNT1 A 0 A_Explode(10,100)
TNT1 A 0 A_Explode(10,100)
TNT1 A 0 A_Explode(10,100)
TNT1 A 0 A_Explode(10,100)
TNT1 A 0 A_Explode(10,100)
TNT1 A 0 A_Explode(10,100)
loop
}
}

Actor RadiationZoneMediumAMount :RadiationZoneSmallAmount 20001
{
States
{
Spawn:
TNT1 A 0 A_Explode(50,500)
TNT1 A 0 A_Explode(50,500)
TNT1 A 0 A_Explode(50,500)
TNT1 A 0 A_Explode(50,500)
TNT1 A 0 A_Explode(50,500)
TNT1 A 0 A_Explode(50,500)
TNT1 A 0 A_Explode(50,500)
loop
}
}

Actor RadiationZoneHighAMount :RadiationZoneSmallAmount 20002
{
States
{
Spawn:
TNT1 A 0 A_Explode(250,2500)
TNT1 A 0 A_Explode(250,2500)
TNT1 A 0 A_Explode(250,2500)
TNT1 A 0 A_Explode(250,2500)
TNT1 A 0 A_Explode(250,2500)
TNT1 A 0 A_Explode(250,2500)
TNT1 A 0 A_Explode(250,2500)
loop
}
}

 

Is there a way to prevent crashing?

Share this post


Link to post

14 answers to this question

Recommended Posts

  • 0
Posted (edited)

This shouldn't crash:

actor RadiationZoneSmallAmount:ExplosiveBarrel 20000
{
  -shootable
  -solid
  +NODAMAGETHRUST //to keep it from pushing the player around
  DamageType "Radiation"
//  RenderStyle Translucent //not needed because there is no sprite to render
  States
  {
   Spawn:
    TNT1 A 1 A_Explode(10,100)
    loop
  }
}
 
Actor RadiationZoneMediumAmount :RadiationZoneSmallAmount 20001
{
  States
  {
  Spawn:
    TNT1 A 1 A_Explode(50,500)
    loop
  }
}
 
Actor RadiationZoneHighAmount :RadiationZoneSmallAmount 20002
{
  States
  {
  Spawn:
    TNT1 A 1 A_Explode(250,2500)
    loop
  }
}

You might want to increase the delays (the number before A_Explode) and/or decrease the damage because any of these will kill the player very quickly. Experiment to find the exact numbers you want. It might make sense for them to all have the same radius.

Share this post


Link to post
  • 0
Posted (edited)
17 minutes ago, scifista42 said:

Don't infinitely loop frames with zero delays.

 

so to prevent crashing what to do?Add countdowns?I needed them to make environmental damage from Radiation without setting each sector with this damage cus it is a custom damage and does not have number or MOD

Share this post


Link to post
  • 0
3 minutes ago, Empyre said:

This shouldn't crash:


actor RadiationZoneSmallAmount:ExplosiveBarrel 20000
{
  -shootable
  -solid
  +NODAMAGETHRUST //to keep it from pushing the player around
  DamageType "Radiation"
//  RenderStyle Translucent //not needed because there is no sprite to render
  States
  {
   Spawn:
    TNT1 A 1 A_Explode(10,100)
    loop
  }
}
 
Actor RadiationZoneMediumAmount :RadiationZoneSmallAmount 20001
{
  States
  {
  Spawn:
    TNT1 A 1 A_Explode(50,500)
    loop
  }
}
 
Actor RadiationZoneHighAmount :RadiationZoneSmallAmount 20002
{
  States
  {
  Spawn:
    TNT1 A 1 A_Explode(250,2500)
    loop
  }
}

You might want to increase the delays (the number before A_Explode) and/or decrease the damage because any of these will kill the player very quickly. Experiment to find the exact numbers you want.

Thanks.They will kill the player very quickly so i will give an armor to the player that prevents the player from dying.I did that.Thanks so much

Share this post


Link to post
  • 0

You replied while I was editing it to add the last sentence about the radius of the explosions.

Share this post


Link to post
  • 0
1 minute ago, Empyre said:

You replied while I was editing it to add the last sentence about the radius of the explosions.

Thanks.ABout the radius,my map is big open world and small radiuses won't work at all because of the sector size

Share this post


Link to post
  • 0
1 minute ago, CaptainManiac said:

Thanks.ABout the radius,my map is big open world and small radiuses won't work at all because of the sector size

Then they should all have the same big radius, or smaller radius and more of them spread out in the sector, to have finer control of where there us damage.

Share this post


Link to post
  • 0
1 minute ago, Empyre said:

Then they should all have the same big radius, or smaller radius and more of them spread out in the sector, to have finer control of where there us damage.

So i made a fixed radius and multiplied it by 5,the factor of my radiation is also 5.0.Very lethal i know

Share this post


Link to post
  • 0
3 minutes ago, CaptainManiac said:

So i made a fixed radius and multiplied it by 5,the factor of my radiation is also 5.0.Very lethal i know

If, for example, you put them 500 units apart, the small amount explosions will have gaps where there is no damage, the medium amount explosions will cover the whole area, and the high amount explosions will overlap each other.

Share this post


Link to post
  • 0
Posted (edited)
3 minutes ago, Empyre said:

If, for example, you put them 500 units apart, the small amount explosions will have gaps where there is no damage, the medium amount explosions will cover the whole area, and the high amount explosions will overlap each other.

Good idea,and will grant the player with a Strong Armor that replaces the Radsuit and has damagefactor of 0 for Radiation

It is because the randomspawner that spawns the radiaton things(problem with gZDB on placing custom stuff) and some areas may end up with ridiculous amount and that will be unrealistic,for example,if a chasm has some areas with very small amount and others or even a ground with higher amount of radiation damage it will be very bad,and it woll be good if the player is granted with that kind of armor

Share this post


Link to post
  • 0
5 minutes ago, CaptainManiac said:

Good idea,and will grant the player with a Strong Armor that replaces the Radsuit and has damagefactor of 0 for Radiation

It is because the randomspawner that spawns the radiaton things(problem with gZDB on placing custom stuff) and some areas may end up with ridiculous amount and that will be unrealistic,for example,if a chasm has some areas with very small amount and others or even a ground with higher amount of radiation damage it will be very bad,and it woll be good if the player is granted with that kind of armor

Oh, you're spawning them randomly rather than placing them in a map that you are making? In that case, I suggest you spawn more of them with a smaller radius.

Share this post


Link to post
  • 0
10 minutes ago, Empyre said:

Oh, you're spawning them randomly rather than placing them in a map that you are making? In that case, I suggest you spawn more of them with a smaller radius.

Rarity:Small amount is 60%,Medium is 40% and High is 20%.And the armor that replace the Radsuit is a green armor with Damagefactor "Radiation" 0 and uses the Radsuit sprite

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×