[297 +/-] SpawnItemEx Bug - Different cause
Posted: Sun Feb 08, 2009 15:19
Okay, I obviously didn't get the problem last time, so it wasn't the GZDoom revision, it is obviously an older bug - for me it seems to be bug because the behaviour is very odd.
This is my actor:
The important line is in its death state: After the ant dies, it should spawn several little ants. For some reason, if the player looks as it is now, nothing gets spawned at all, absolutely nothing. It doesn't even make a difference if I change the code pointer to force the spawn (flag 32) or if I enlarge the random positions even more.
The only difference that makes the actor spawn the ants is when I inherit the AntBoss from the Zombieman (and most likely from other actors as well). I already double checked if the AntBoss is missing something, but everything that is present in the Zombieman decorate is also in my AntBoss decorate. Bug?
*EDIT*
I found out that the ISMONSTER flag makes the difference. If I deactivate it for the object being spawned, it always works. If it is activated, it never works (as long as I don't inherit from the Zombieman, as this works always but is no solution in my eyes)
This is my actor:
Code: Select all
actor AntBoss 12345
{
obituary "%o was killed by a giant ant."
health 200
radius 32
height 32
mass 1000
speed 12
painchance 96
maxtargetrange 128
meleerange 32
seesound "ant/active"
attacksound "ant/attack"
painsound "ant/pain"
deathsound "ant/death"
activesound "ant/active"
dropitem "0" 256
MONSTER
+FLOORCLIP
states
{
Spawn:
POSS A 50 A_Look
POSS ABCDEFGHIJKLMNOPQRSTU 2 A_Look
SPOS ABCDEFGHIJKLMNOPQRSTU 2 A_Look
BOS2 ABCDEFGHI 2 A_Look
loop
See:
BOSS EF 8 A_Chase
BOSS G 0 A_PlaySound("ant/step")
BOSS GH 8 A_Chase
BOSS E 0 A_PlaySound("ant/step")
loop
Melee:
TROO ABCD 4 A_FaceTarget
TNT1 A 0 A_SpawnItemEx("FreezeDummy",32,0,0,0,0,0,0,32)
TROO EFGH 4
TNT1 A 0 A_CustomMeleeAttack(10,"ant/bite",0,0,1)
TROO IJKLMNOPQRSTU 3
goto See
Missile:
TROO ABCDEF 2 A_FaceTarget
TNT0 A 0 A_CustomMissile("AntFire",32,0, random(10,-10), 0, random(170,190))
TROO GH 2 A_FaceTarget
TNT0 A 0 A_CustomMissile("AntFire",32,0, random(10,-10), 0, random(170,190))
TROO IJ 2 A_FaceTarget
TNT0 A 0 A_CustomMissile("AntFire",32,0, random(10,-10), 0, random(170,190))
TROO KL 2 A_FaceTarget
TNT0 A 0 A_CustomMissile("AntFire",32,0, random(10,-10), 0, random(170,190))
TROO MNO 3
goto See
Pain:
TROO A 0 A_Pain
TROO BCDEDCBA 2
goto See
Death:
TNT1 A 0 A_Scream
TNT1 A 0 A_NoBlocking
TNT1 A 0 A_Jump(160,5)
TNT1 AAAA 0 A_SpawnItemEx("AntSmall", random(-128,128), random(-128,128), 0, 0, 0, 0, random(0,359), 0) <-- -----------------
SKEL ABCDE 8
SKEL F 8 A_Playsound("ant/fall")
SKEL GH 8
SKEL I -1
stop
}
}
The only difference that makes the actor spawn the ants is when I inherit the AntBoss from the Zombieman (and most likely from other actors as well). I already double checked if the AntBoss is missing something, but everything that is present in the Zombieman decorate is also in my AntBoss decorate. Bug?
*EDIT*
I found out that the ISMONSTER flag makes the difference. If I deactivate it for the object being spawned, it always works. If it is activated, it never works (as long as I don't inherit from the Zombieman, as this works always but is no solution in my eyes)