Jump to content
  • 0

Spawning stuff and from spawner that has health


CaptainManiac

Question

I want to ask before doing something foolish about spawners.Does the randomspawner have health property and see and other states,because i want it to drop items in see state and stop dropping items when he dies,so if there is a zombie spawner to have big radius and to spawn items using A_DropItem("stuff",number,chance) when on see state and if dies to stop spawning and leave the zone he was placed a dead zone.And of course to have a script that checks the monsters spawned and if there is a difference to the previou monster count and currnt count and to damage the spawner with the delta of these vars.Is this possible?I need that complexity to make some sort of populace control system for zdoom.

Share this post


Link to post

7 answers to this question

Recommended Posts

  • 0

The RandomSpawner can be used to spawn an actor that does have states like See and Death.

You can make a modified Zombieman/whatever you wish, which would use A_SpawnItemEx in all the See state, so that it summons your item when not dead.

I can't understand the latter part of your post.

Share this post


Link to post
  • 0

Oh, I thought you meant the actor property DropItem, not the action. But yeah, that should work too.

Share this post


Link to post
  • 0

and is there a way without acs to make the spawner deplete its health by the number of the things it scoops,like if imps spawned as siblings die the health of the spawner to deplete by the number of the dies imps.

Share this post


Link to post
  • 0

The spawner can't deplete health. It does have any. The actor which the spawner spawns does have health. That actor is the one that is supposed to lose health.

As for the second part, I'm gonna have to think about it. I can't quite grasp what you want to achieve. What do your mean by "scoops"? What are "siblings"?

Share this post


Link to post
  • 0

I want to make something that is like spawner,but has health and when it dies(the health goes to 0) to stop spawning any entities,e.g. a imp spawning zone has health of 2200 and spawns imps with the same stat in its spawn and see state and the chance of imps to spawn decreases with the health of the zone and if the health reaches 0 the spawner stop spawning imps and the sector in which the spawner was is left a dead zone,but the last hitpoint will be removed when all imps in the sector are dead.

Share this post


Link to post
  • 0

You need an actor that does NOT inherit from RandomSpawner, but is defined more or less like any monster, but instead of periodically calling A_Chase to walk around, it would periodically call A_SpawnItemEx to spawn other actors (if you want these spawned actors to be randomized, define a separate RandomSpawner-derived actor and let it be periodically spawned by the real spawner).

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...