Perzival12 Posted November 3 Report Share Posted November 3 I got tired of making a new thread for every new question and error, so I thought that I would make a thread for all questions and answers (along with guides) to post on. If you need help doing something for your mod, want help with errors you generated, or want to post some guide or tutorial on how to do something related to modding, and don't think it deserves/needs it's own thread, post it here. 1 1 Quote Link to comment Share on other sites More sharing options...
Perzival12 Posted Friday at 18:56 Author Report Share Posted Friday at 18:56 Okay, I have two questions. I am using the SpawnEntityOnDeath feature to make a unit spawn more units when it dies (a siege machine spawn it's crew). However, when I try, the spawned unit just stands there, like a corpse. It can attack and turn, but it can't move. My second question is if there is a way to spawn multiple units using the SpawnEntityOnDeath feature. Does anyone know how to do either of these things? 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted 18 hours ago Report Share Posted 18 hours ago `SpawnEntityOnDeath` Only creates local entities, it's meant for say debris, or an explosion decal. https://gitea.wildfiregames.com/0ad/0ad/src/commit/32edc28cda72d0c9cd70937d7c46c58322bcf040/binaries/data/mods/public/simulation/components/Health.js#L403 Quote Link to comment Share on other sites More sharing options...
Perzival12 Posted 15 hours ago Author Report Share Posted 15 hours ago It also works for static items, I.e. things that don’t move, like treasure. Is there a way to allow it to spawn move able entities? What do you think it would take? Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted 2 hours ago Report Share Posted 2 hours ago On 07/11/2025 at 1:56 PM, Perzival12 said: Okay, I have two questions. I am using the SpawnEntityOnDeath feature to make a unit spawn more units when it dies (a siege machine spawn it's crew). However, when I try, the spawned unit just stands there, like a corpse. It can attack and turn, but it can't move. My second question is if there is a way to spawn multiple units using the SpawnEntityOnDeath feature. Does anyone know how to do either of these things? 16 hours ago, Stan` said: `SpawnEntityOnDeath` Only creates local entities, it's meant for say debris, or an explosion decal. https://gitea.wildfiregames.com/0ad/0ad/src/commit/32edc28cda72d0c9cd70937d7c46c58322bcf040/binaries/data/mods/public/simulation/components/Health.js#L403 13 hours ago, Perzival12 said: It also works for static items, I.e. things that don’t move, like treasure. Is there a way to allow it to spawn move able entities? What do you think it would take? SpawnEntityOnDeath used to be able to spawn player-controllable entities. I made tests several years ago where chariots would spawn its rider when killed so that the rider could charge at the enemy and get a few strikes in before dying. Again, this worked fine... a few years ago. I'm not sure what changed. Quote Link to comment Share on other sites More sharing options...
hyperion Posted 1 hour ago Report Share Posted 1 hour ago 1 hour ago, wowgetoffyourcellphone said: SpawnEntityOnDeath used to be able to spawn player-controllable entities As @Stan` correctly stated only a local entity gets spawned. This was always the case. So either you implemented it differently or it was subtly broken anyway. Do you still have to code and is it publicly available? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.