• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Spawn an entity on block break event.

I known how block downgrade/upgrade works in XML, but how to spawn an entity instead another block on block destruction, or even on falls event? Possible? Thank you!

 
Last edited by a moderator:
I havent played with the entity spawning block code but I believe you could use the spawning block as the downgrade block option. For example a door v3 downgrades into a door v2. When you break the door it is being replaced by a new block as you destroy it.

The only thing I am not sure of, is whether the spawn event will trigger immediately.

 
Yeah, but the door is a block, not an entity, like a zombie, animal or vehicle. What I am looking for is, for example, that an enemy animal such as a snake spawns when I destroy a loot box.

 
Last edited by a moderator:
Back
Top