[not a bug] A_KillMaster is broken?

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
anakin s.
Posts: 34
Joined: Sat Oct 22, 2005 16:25

[not a bug] A_KillMaster is broken?

Post 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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Is the spawner shootable? If not it can't be killed.
anakin s.
Posts: 34
Joined: Sat Oct 22, 2005 16:25

Post 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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post 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.
anakin s.
Posts: 34
Joined: Sat Oct 22, 2005 16:25

Post 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
	}
}
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post 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.
anakin s.
Posts: 34
Joined: Sat Oct 22, 2005 16:25

Post 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?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Exactly that.
Locked

Return to “Closed Bugs”