Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0

Zdoom - how to create monsters minions ?


Helllo guys,


I have a monster that spawn two other monsters when attacking. But I would like to limit the spawn. If it have spawned two minions, I would like it to not spawn anymore and if minions dies, it can spawn two other again.


Any idea I could do that ? :)


thanks for your help.

Share this post

Link to post

1 answer to this question

Recommended Posts

  • 0

Make a new inventory actor with maxamount 2. When the monster is about to spawn minions, use A_JumpIfInventory to abort spawning if the monster has at least 1 item of the inventory. Otherwise use A_GiveInventory to give him 2 items of the inventory and spawn 2 minions via A_SpawnItemEx with SXF_SETMASTER flag. In the minion's death animation, use A_TakeInventory with actor pointer AAPTR_MASTER to take 1 item of the inventory from the monster who spawned it. Therefore, once both minions die, the monster will once again have 0 items of the inventory and be able to spawn minions again.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now