Kontra Kommando Posted February 18, 2016 Thus far, I like results of the bouncing objects I've included into my mod. Basically, many actors spawn in clusters, as decorative objects that can be "knocked around" by touching or shooting them. However, gzdoom (newest version I'm using) will randomly crash after playing a few levels. Is there something someone could suggest to help me improve upon decorate file, so the crashes are reduced, or eliminated? Below is an example of one of the objects, they all basically work the same. //Object With Clutter Spawner. ACTOR Cone { Radius 10 Height 21 Health 20 +NOBLOOD +TOUCHY +SHOOTABLE +NOTAUTOAIMED damagefactor "MarineTarget", 0.0 damagefactor "AlienTarget", 0.0 damagefactor "DroidTarget", 0.0 damagefactor "PredatorTarget", 0.0 States { Spawn: EXPL AAAAA 0 A_CustomMissile ("Clutterspawn", 45, 0, random (0, 360), 2, random (40, 90)) COND A -1 Loop Death: TNT1 A 0 A_Jump(255, "Death1", "Death2") Death1: TNT1 A 0 EXPL A 0 A_CustomMissile ("ConeFlying1", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death2: TNT1 A 0 EXPL A 0 A_CustomMissile ("ConeFlying2", 1, 0, random (0, 360), 2, random (0, 360)) Stop } } //Without Clutter Spawner. ACTOR RealCone { Radius 10 Height 21 Health 20 +NOBLOOD +TOUCHY +SHOOTABLE +NOTAUTOAIMED damagefactor "MarineTarget", 0.0 damagefactor "AlienTarget", 0.0 damagefactor "DroidTarget", 0.0 damagefactor "PredatorTarget", 0.0 States { Spawn: COND A -1 Loop Death: TNT1 A 0 A_Jump(255, "Death1", "Death2") Death1: TNT1 A 0 EXPL A 0 A_CustomMissile ("ConeFlying1", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death2: TNT1 A 0 EXPL A 0 A_CustomMissile ("ConeFlying2", 1, 0, random (0, 360), 2, random (0, 360)) Stop } } //Physics; Flying in air. Actor ConeFlying1 { Radius 9 Height 10 +Missile +NOBLOOD +DontSplash +NoBlockMap +DontSplash +MOVEWITHSECTOR +ALLOWBOUNCEONACTORS +CLIENTSIDEONLY +NOINFIGHTING +BOUNCEONWALLS +BOUNCEONFLOORS +BOUNCEONCEILINGS Gravity 0.9 +DOOMBOUNCE BounceFactor 0.4 BounceSound "gbounce" WallBounceSound "gbounce" SeeSound "gbounce" Speed 7 States { Spawn: COND ABCD 6 Loop Death: TNT1 A 0 A_Jump(255, "Death1", "Death2", "Death3") Death1: TNT1 A 0 EXPL A 0 A_CustomMissile ("FallenCone1", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death2: TNT1 A 0 EXPL A 0 A_CustomMissile ("FallenCone2", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death3: TNT1 A 0 EXPL A 0 A_CustomMissile ("FallenCone3", 1, 0, random (0, 360), 2, random (0, 360)) Stop } } Actor ConeFlying2 { Radius 9 Height 10 +Missile +NOBLOOD +DontSplash +NoBlockMap +DontSplash +MOVEWITHSECTOR +ALLOWBOUNCEONACTORS +CLIENTSIDEONLY +NOINFIGHTING +BOUNCEONWALLS +BOUNCEONFLOORS +BOUNCEONCEILINGS Gravity 0.9 +DOOMBOUNCE BounceFactor 0.4 BounceSound "gbounce" WallBounceSound "gbounce" SeeSound "gbounce" Speed 7 States { Spawn: COND DCBA 6 Loop Death: TNT1 A 0 A_Jump(255, "Death1", "Death2", "Death3") Death1: TNT1 A 0 EXPL A 0 A_CustomMissile ("FallenCone1", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death2: TNT1 A 0 EXPL A 0 A_CustomMissile ("FallenCone2", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death3: TNT1 A 0 EXPL A 0 A_CustomMissile ("FallenCone3", 1, 0, random (0, 360), 2, random (0, 360)) Stop } } //on ground, variation 1. ACTOR FallenCone1 { Radius 10 Height 21 Health 20 +NOBLOOD +SHOOTABLE +TOUCHY +NOTAUTOAIMED damagefactor "MarineTarget", 0.0 damagefactor "AlienTarget", 0.0 damagefactor "DroidTarget", 0.0 damagefactor "PredatorTarget", 0.0 States { Spawn: COND A -1 Loop Death: TNT1 A 0 A_Jump(255, "Death1", "Death2") Death1: TNT1 A 0 EXPL A 0 A_CustomMissile ("ConeFlying1", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death2: TNT1 A 0 EXPL A 0 A_CustomMissile ("ConeFlying2", 1, 0, random (0, 360), 2, random (0, 360)) Stop } } //on ground variation 2. ACTOR FallenCone2 { Radius 10 Height 21 Health 20 +NOBLOOD +SHOOTABLE +TOUCHY +NOTAUTOAIMED damagefactor "MarineTarget", 0.0 damagefactor "AlienTarget", 0.0 damagefactor "DroidTarget", 0.0 damagefactor "PredatorTarget", 0.0 States { Spawn: COND E -1 Loop Death: TNT1 A 0 A_Jump(255, "Death1", "Death2") Death1: TNT1 A 0 EXPL A 0 A_CustomMissile ("ConeFlying1", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death2: TNT1 A 0 EXPL A 0 A_CustomMissile ("ConeFlying2", 1, 0, random (0, 360), 2, random (0, 360)) Stop } } //on ground variation 3. ACTOR FallenCone3 { Radius 10 Height 21 Health 20 +NOBLOOD +SHOOTABLE +TOUCHY +NOTAUTOAIMED damagefactor "MarineTarget", 0.0 damagefactor "AlienTarget", 0.0 damagefactor "DroidTarget", 0.0 damagefactor "PredatorTarget", 0.0 States { Spawn: COND F -1 Loop Death: TNT1 A 0 A_Jump(255, "Death1", "Death2") Death1: TNT1 A 0 EXPL A 0 A_CustomMissile ("ConeFlying1", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death2: TNT1 A 0 EXPL A 0 A_CustomMissile ("ConeFlying2", 1, 0, random (0, 360), 2, random (0, 360)) Stop } } 0 Share this post Link to post
EClydeDeebo Posted February 18, 2016 WHOA Nellie ! Good Luck...That'a a tonne of script 0 Share this post Link to post
Blue Shadow Posted February 18, 2016 Kontra Kommando said:However, gzdoom (newest version I'm using) will randomly crash after playing a few levels. What is the version, precisely? 0 Share this post Link to post
Kontra Kommando Posted February 18, 2016 Blue Shadow said:What is the version, precisely? I tried it for both gzdoom-g2.2pre-512-g0ecfc68.7z and gzdoom-g1.10pre-510-g3fa66bd.7z Both released on the 17th of February. I noticed in the last two playthroughs, that it may have something to with the predator's plasma caster explosion. Maybe the radius_quake: ACTOR predball { Radius 6 Height 16 Speed 30 FastSpeed 40 Damage 5 Projectile +SEEKERMISSILE +RANDOMIZE +FRIENDLY DONTHURTSHOOTER +DONTHURTSPECIES +EXTREMEDEATH RenderStyle Translucent DamageType "GunDamage" Alpha 1 Scale 1.0 SeeSound "predshot" DeathSound "predhit" Decal "Scorch" States { Spawn: FX12 AB 1 BRIGHT Loop Death: Death: TNT1 A 1 EXPL A 0 Radius_Quake (2, 54, 0, 15, 0) TNT1 A 0 A_ChangeFLag("NOGRAVITY", 1) TNT1 A 0 A_AlertMonsters GRNE A 2 bright A_Explode(10, 200) EXPL A 0 Radius_Quake (2, 54, 0, 15, 0) TNT1 A 0 A_PlaySound("EXPLOSIO", 2) GRNE BCDEFGH 2 BRIGHT GRNE IJKLMN 2 BRIGHT Stop } } 0 Share this post Link to post
HavoX Posted February 18, 2016 Kontra Kommando said:TNT1 A 0 You don't need to use this if it does not contain any action functions. 0 Share this post Link to post
scifista42 Posted February 18, 2016 He needs to use it, because when a game object is spawned, its very first state will not execute its action the first time it's entered. So this empty frame is needed if you actually want to perform an action immediately when the game object is spawned. That said, the crashes almost certainly happen as a result of infinitely recursively spawned missiles during a single tic. Put some non-zero durations before spawning them and see if the crashes stop then. 0 Share this post Link to post
Edward850 Posted February 18, 2016 scifista42 said:He needs to use it, because when a game object is spawned, its very first state will not execute its action the first time it's entered. So this empty frame is needed if you actually want to perform an action immediately when the game object is spawned. Yes, spawn. Do note that he's talking about frames that clearly aren't on spawn, though. 0 Share this post Link to post
scifista42 Posted February 18, 2016 Yay, sorry, you're right, I didn't pay enough attention when looking at the code, those null states are indeed unnecessary in the Death blocks. 0 Share this post Link to post
Kontra Kommando Posted February 19, 2016 So basically, something like this? //With Clutter Spawner. ACTOR Cone { Radius 10 Height 21 Health 20 +NOBLOOD +TOUCHY +SHOOTABLE +NOTAUTOAIMED damagefactor "MarineTarget", 0.0 damagefactor "AlienTarget", 0.0 damagefactor "DroidTarget", 0.0 damagefactor "PredatorTarget", 0.0 States { Spawn: TNT1 A 1 EXPL AAAAA 0 A_CustomMissile ("Clutterspawn", 45, 0, random (0, 360), 2, random (40, 90)) COND A -1 Loop Death: TNT1 A 0 A_Jump(255, "Death1", "Death2") Death1: EXPL A 0 A_CustomMissile ("ConeFlying1", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death2: EXPL A 0 A_CustomMissile ("ConeFlying2", 1, 0, random (0, 360), 2, random (0, 360)) Stop } } //Without Clutter Spawner. ACTOR RealCone { Radius 10 Height 21 Health 20 +NOBLOOD +TOUCHY +SHOOTABLE +NOTAUTOAIMED damagefactor "MarineTarget", 0.0 damagefactor "AlienTarget", 0.0 damagefactor "DroidTarget", 0.0 damagefactor "PredatorTarget", 0.0 States { Spawn: TNT1 A 1 COND A -1 Loop Death: TNT1 A 0 A_Jump(255, "Death1", "Death2") Death1: EXPL A 0 A_CustomMissile ("ConeFlying1", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death2: EXPL A 0 A_CustomMissile ("ConeFlying2", 1, 0, random (0, 360), 2, random (0, 360)) Stop } } //Physics; Flying in air. Actor ConeFlying1 { Radius 9 Height 10 +Missile +NOBLOOD +DontSplash +NoBlockMap +DontSplash +MOVEWITHSECTOR +ALLOWBOUNCEONACTORS +CLIENTSIDEONLY +NOINFIGHTING +BOUNCEONWALLS +BOUNCEONFLOORS +BOUNCEONCEILINGS Gravity 0.9 +DOOMBOUNCE BounceFactor 0.4 BounceSound "gbounce" WallBounceSound "gbounce" SeeSound "gbounce" Speed 7 States { Spawn: TNT1 A 1 COND ABCD 6 Loop Death: TNT1 A 0 A_Jump(255, "Death1", "Death2", "Death3") Death1: EXPL A 0 A_CustomMissile ("FallenCone1", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death2: EXPL A 0 A_CustomMissile ("FallenCone2", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death3: TNT1 A 0 EXPL A 0 A_CustomMissile ("FallenCone3", 1, 0, random (0, 360), 2, random (0, 360)) Stop } } Actor ConeFlying2 { Radius 9 Height 10 +Missile +NOBLOOD +DontSplash +NoBlockMap +DontSplash +MOVEWITHSECTOR +ALLOWBOUNCEONACTORS +CLIENTSIDEONLY +NOINFIGHTING +BOUNCEONWALLS +BOUNCEONFLOORS +BOUNCEONCEILINGS Gravity 0.9 +DOOMBOUNCE BounceFactor 0.4 BounceSound "gbounce" WallBounceSound "gbounce" SeeSound "gbounce" Speed 7 States { Spawn: TNT1 A 1 COND DCBA 6 Loop Death: TNT1 A 0 A_Jump(255, "Death1", "Death2", "Death3") Death1: EXPL A 0 A_CustomMissile ("FallenCone1", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death2: EXPL A 0 A_CustomMissile ("FallenCone2", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death3: EXPL A 0 A_CustomMissile ("FallenCone3", 1, 0, random (0, 360), 2, random (0, 360)) Stop } } //on ground, variation 1. ACTOR FallenCone1 { Radius 10 Height 21 Health 20 +NOBLOOD +SHOOTABLE +TOUCHY +NOTAUTOAIMED damagefactor "MarineTarget", 0.0 damagefactor "AlienTarget", 0.0 damagefactor "DroidTarget", 0.0 damagefactor "PredatorTarget", 0.0 States { Spawn: TNT1 A 1 COND A -1 Loop Death: TNT1 A 0 A_Jump(255, "Death1", "Death2") Death1: EXPL A 0 A_CustomMissile ("ConeFlying1", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death2: EXPL A 0 A_CustomMissile ("ConeFlying2", 1, 0, random (0, 360), 2, random (0, 360)) Stop } } //on ground variation 2. ACTOR FallenCone2 { Radius 10 Height 21 Health 20 +NOBLOOD +SHOOTABLE +TOUCHY +NOTAUTOAIMED damagefactor "MarineTarget", 0.0 damagefactor "AlienTarget", 0.0 damagefactor "DroidTarget", 0.0 damagefactor "PredatorTarget", 0.0 States { Spawn: TNT1 A 1 COND E -1 Loop Death: TNT1 A 0 A_Jump(255, "Death1", "Death2") Death1: EXPL A 0 A_CustomMissile ("ConeFlying1", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death2: EXPL A 0 A_CustomMissile ("ConeFlying2", 1, 0, random (0, 360), 2, random (0, 360)) Stop } } //on ground variation 3. ACTOR FallenCone3 { Radius 10 Height 21 Health 20 +NOBLOOD +SHOOTABLE +TOUCHY +NOTAUTOAIMED damagefactor "MarineTarget", 0.0 damagefactor "AlienTarget", 0.0 damagefactor "DroidTarget", 0.0 damagefactor "PredatorTarget", 0.0 States { Spawn: TNT1 A 1 COND F -1 Loop Death: TNT1 A 0 A_Jump(255, "Death1", "Death2") Death1: EXPL A 0 A_CustomMissile ("ConeFlying1", 1, 0, random (0, 360), 2, random (0, 360)) Stop Death2: EXPL A 0 A_CustomMissile ("ConeFlying2", 1, 0, random (0, 360), 2, random (0, 360)) Stop } } 0 Share this post Link to post
Kontra Kommando Posted February 19, 2016 I got up to E1M3, before gzdoom crashed to desktop. I converted all of the scripts to the one above. But, unfortunately, I don't believe it has fixed this issue. But also, this time, I don't believe the predator's plasma caster triggered the crash. 0 Share this post Link to post
scifista42 Posted February 19, 2016 Kontra Kommando said:So basically, something like this? In case of misunderstanding, the unnecessary "TNT1 A 0" frames in your original code certainly were NOT the cause of your crashes and problems, we talked about them only because they were unnecessary. Instead, I recommended you to make it so that the newly spawned missiles will not spawn within the first tic, in other words make there at least 1 tic delay before any of the spawning functions comes to be performed. Also, A_CustomMissile is intended for spawning projectiles in particular, not any objects. Use A_SpawnItemEx for spawning non-projectile objects, and note the parameter differences between the two functions. 0 Share this post Link to post
Gez Posted February 19, 2016 Kontra Kommando said: Death: TNT1 A 0 A_Jump(255, "Death1", "Death2") Note that you want A_Jump(256, ...) because A_Jump will jump is the random value is strictly lesser than (not "lesser than or equal to") the value you give. A random value can be 255, and 255 < 255 is false, in which case the jump will not happen. That said, this isn't the cause of the crash either. 0 Share this post Link to post
Kontra Kommando Posted February 21, 2016 I got around to making the adjustments suggested, and I played through episode 1 without experiencing a crash. Thanks for the help! Gez said:Note that you want A_Jump(256, ...) because A_Jump will jump is the random value is strictly lesser than (not "lesser than or equal to") the value you give. A random value can be 255, and 255 < 255 is false, in which case the jump will not happen. That said, this isn't the cause of the crash either. I totally had missed this mistake. I guess I was looking at it too long, to notice. thanks! 0 Share this post Link to post
Kontra Kommando Posted February 25, 2016 https://www.doomworld.com/vb/post/1564745 check out the demonstration video I have made. 0 Share this post Link to post