Page 1 of 2
(since 1-0-29) My icicle bug
Posted: Wed Jul 02, 2008 0:05
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.
Posted: Wed Jul 02, 2008 0:24
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?
Posted: Wed Jul 02, 2008 0:43
by chopkinsca
I tried a few different variations of the code, including your A_ChangeFlag ("CeilingHugger", 0) idea but none seemed to work.
Posted: Wed Jul 02, 2008 8:13
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.
Posted: Wed Jul 02, 2008 17:16
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?
Posted: Wed Jul 02, 2008 20:03
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?
Posted: Wed Jul 02, 2008 20:55
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.
Posted: Wed Jul 02, 2008 21:29
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?
Posted: Wed Jul 02, 2008 23:11
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.
Posted: Wed Jul 02, 2008 23:12
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.)
Posted: Wed Jul 02, 2008 23:31
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]
Posted: Wed Jul 02, 2008 23:39
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...
Posted: Wed Jul 02, 2008 23:40
by chopkinsca
They don't spawn at all.
Posted: Thu Jul 03, 2008 0:36
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.

Posted: Thu Jul 03, 2008 19:21
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
}
}