(since 1-0-29) My icicle bug

Bugs that have been resolved.

Moderator: Graf Zahl

User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

(since 1-0-29) My icicle bug

Post by chopkinsca »

I have a frost monster wihich has an attack that summons icicles on the ceiling. These icicles fall and hurt the player. But since version 1-0-29 (maybe 1-0-28, I don't have that one), the behaviour hasn't been working as it should.

I've attached a demo wad. Select the rifle and shoot the floor.
Attachments
icicle.zip
(9.52 KiB) Downloaded 94 times
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

I'm going to guess this uses +ceilinghugger - yes? I know that the rocks spawned by LilWhiteMouse's Hammer Hound developed a problem a few versions back. It was because they used ceiling hugger in combination with one of the gravity flags. When you think about it, those flags are mutually exclusive and it should never have worked. I made my own fixed version of it using "A_ChangeFlag ("CeilingHugger", 0)" to nix the ceiling hugger flag at an appropriate point. Perhaps, if that's the problem with yours, you might need to do something similar?
User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

Post by chopkinsca »

I tried a few different variations of the code, including your A_ChangeFlag ("CeilingHugger", 0) idea but none seemed to work.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

What did you do? Without posting it nobody can check what wasn't right. The Ceilinghugger behavior is not going to change though. It was incorrect before and the flag simply didn't work as expected.

It's amazing that so many people noticed the obviously incorrect behavior and instead of reporting it actually USED it... :? This has to be one of the worst examples of using hacks I can remember.
User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

Post by chopkinsca »

I forget what I changed. It was late at night and I was too tired too remember. I think one change was getting rid of the nogravity flag and using A_ChangeFlag ("CeilingHugger", 0) to make it drop. That didn't work.

How am I supposed to know that something that works is the wrong behaviour?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Look at the name: CeilingHUGGER!
It doesn't 'hug' the ceiling. Am I the only one who thinks that this is odd?
User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

Post by chopkinsca »

Well, I'm lost on how to get it to work now. I've tried spawnceiling instead of ceiling hugger and that didn't work.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Post by Gez »

Graf Zahl wrote:It's amazing that so many people noticed the obviously incorrect behavior and instead of reporting it actually USED it... :? This has to be one of the worst examples of using hacks I can remember.
Was the problem here related to this one?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

chopkinsca wrote:Well, I'm lost on how to get it to work now. I've tried spawnceiling instead of ceiling hugger and that didn't work.
It's still a hack but if you set +CEILINGHUGGER in your actor and then immediately reset it in the second state it should work.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Gez wrote:
Graf Zahl wrote:It's amazing that so many people noticed the obviously incorrect behavior and instead of reporting it actually USED it... :? This has to be one of the worst examples of using hacks I can remember.
Was the problem here related to this one?

Yes, and that report prompted me to fix it for both flags (because without the fix the flags' intended use would not be possible.)
User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

Post by chopkinsca »

Graf Zahl wrote:
chopkinsca wrote:Well, I'm lost on how to get it to work now. I've tried spawnceiling instead of ceiling hugger and that didn't work.
It's still a hack but if you set +CEILINGHUGGER in your actor and then immediately reset it in the second state it should work.
I tried it on both icespike and icespikespawner and neither one worked. Did I do it wrong?

[spoiler]

Code: Select all

actor icespike 
{   
	radius 9
	height 6 
	+ceilinghugger
	+nogravity
  	speed 1
  	projectile  
  	damage 4
  	renderstyle translucent
  	alpha 0.5
  	explosionradius 64
  	explosiondamage 15
  	
  	
	states
	{
	spawn:
		ICES A 0  
		ICES A 4 A_ChangeFlag ("CeilingHugger", 0)
		ICES BCD 2 
		ICES D 2
		ICES A 0 a_jump(120, 1)
		goto spawn +5
		ICES D 0 A_gravity
		ICES DDDDD 4 a_explode
		stop
	}
} 
[/spoiler]
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Post by Gez »

What is the issue? They don't spawn on the ceiling, or they don't fall?

If they don't fall, try removing the +nogravity flag as well...
User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

Post by chopkinsca »

They don't spawn at all.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

I just posted over at Zdoom that I've been trying to get this to work (the problem is present in Zdoom as well as GZdoom btw). I've tried removing all the ceiling related stuff and even spawning regular Doom actors. For what ever reason, there seems to be a real problem getting your actors to spawn additional actors. I don't know why because all the other actors that I have tested that use similar methods to spawn trails, puff, debris etc all still work. :?
User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

Post by chopkinsca »

Edit: I got it working now. Thanks for the help. Tell me if this is hacky still...

Code: Select all

actor icespike 
{   
	radius 9
	height 6 
	+spawnceiling
	+ceilinghugger
	+nogravity
  	speed 1
  	projectile  
  	damage 4
  	renderstyle translucent
  	alpha 0.5
  	explosionradius 64
  	explosiondamage 15
  	
  	
	states
	{
	spawn:
		ICES A 0  
		ICES A 4 A_ChangeFlag ("CeilingHugger", 0)
		ICES BCD 2 
		ICES D 2
		ICES A 0 a_jump(120, 1)
		goto spawn +5
		ICES D 0 A_gravity
		ICES DDDDD 4 a_explode
		stop
	}
} 

actor icespikespawner 
{   
	radius 2
	height 2
	speed 0
	
	+spawnceiling
	//+seekermissile
  	projectile  
  	damage 0
  	  	
	states
	{
	spawn:
		NULL A 0 				
		goto death 
	death: 
		NULL A 1 A_ChangeFlag ("CeilingHugger", 0)		
		NULL A 0 A_CustomMissile ("icespike", 0, random(-15, 15), random(-180, 180), 2, 0)
		NULL A 0 A_CustomMissile ("icespike", 0, random(-15, 15), random(-180, 180), 2, 0) 
		NULL A 0 A_jump(150, 1)  
		goto death +1
		NULL A 1
		stop
	}
}

actor icespikepuff : BulletPuff
{   
	+alwayspuff
	+puffonactors 
	
	 
	activesound "icecrackle"
	attacksound "icecrackle"  
  	seesound "icecrackle"
  	  	
	states
	{
	spawn:  
	crash:
		NULL A 1
		NULL A 1 A_spawnitem ("icespikespawner", 0, 0, 0) 
		stop
	}
} 
Locked

Return to “Closed Bugs”