Page 1 of 1
[not a bug] A_KillMaster is broken?
Posted: Thu Jun 08, 2006 20:00
by anakin s.
I know that A_SpawnItem had some problems with gzdoom 1.0.10, but now that's fixed in 1.0.13, right? However, A_KillMaster doesn't seem to work for me. I have a monster spawner that's supposed to die when the monster it spawns gets killed using A_KillMaster. And if the monster spawner is destroyed (with Thing_Destroy), it would kill the monster it spawned with A_KillChildren. When trying it out in the latest gzdoom, I killed the spawned monster, but the monster spawner doesn't get killed. As a result, my level breaks.
Posted: Thu Jun 08, 2006 20:06
by Graf Zahl
Is the spawner shootable? If not it can't be killed.
Posted: Thu Jun 08, 2006 20:54
by anakin s.
Yes, it is. It worked with previous versions of gzdoom. To prevent the spawner from interrupting the game, I made it invisible with a radius and height of 0.
Posted: Fri Jun 09, 2006 9:38
by Graf Zahl
Can you post your DECORATE code? The information gets set so before investigating further I have to rule out an incorrect definition.
Posted: Sun Jun 11, 2006 5:39
by anakin s.
I have many of these spawners throughout the levels. They're designed so that they would be placed with an editor or spawned with a script, but the actual monster the player gets to fight depends on the level he has. In order for the thing dependent scripting actions to work, I need to have A_KillMaster in each of the monsters' death frames so that they'd kill the spawner, since the spawner is the thing that's assigned the tid and the SpawnID. If the spawner is killed with Thing_Destroy, A_KillChildren would kill whatever monster was spawned by it. Here's just one example:
Code: Select all
ACTOR BishopSpawner 114
{
SpawnID 19
Health 1000
Radius 0
Height 0
Speed 0
MONSTER
+SOLID
States
{
Spawn:
TNT1 A 1 A_Look
Loop
See:
TNT1 A 0
TNT1 A 0 A_NoBlocking
TNT1 A 1 A_JumpIfInTargetInventory("WeaponUpgrade", 1, 2)
TNT1 A 1 A_SpawnItem("Elf3", 1, 0, 0)
Goto Pain
TNT1 A 1 A_JumpIfInTargetInventory("WeaponUpgrade", 5, 2)
TNT1 A 1 A_SpawnItem("NewWizard", 1, 0, 0)
Goto Pain
TNT1 A 1 A_SpawnItem("RoyalBishop", 1, 0, 0)
Goto Pain
Pain:
TNT1 A 1
Loop
Death:
TNT1 A 0 A_KillChildren
Stop
}
}
Posted: Sun Jun 11, 2006 9:19
by Graf Zahl
Ok, simple user error: Either omit the fourth parameter to A_SpawnItem or set it to 1: For non-weapons it specifies whether the master should be set or not.
Posted: Sun Jun 11, 2006 20:15
by anakin s.
Thank you. So the fourth parameter specifies whether it uses ammo or not if it's a weapon, but if it's not a weapon, the same parameter tells if the master would be set or not?
Posted: Sun Jun 11, 2006 21:37
by Graf Zahl
Exactly that.