How do I remove a unit without triggering its actor death events?
Normally when rock towers are killed the tower collapses and debris is created to block a pathway. That is fine, I want to keep that behaviour, but I want the ability to remove a rocktower via triggers WITHOUT the debris being spawned. using the "remove unit from game" and " kill unit" triggers both cause the actors death event to fire.
I've tried removing all the behaviours and abilities from the unit first, I've tried the "kill actor scope" though I don't know what that does.
Is it maybe possible to completely remove an actor directly?
remove unit from game normally does exactly what you want, i cannot believe that this doesnt work. is the death time set to -1 or any value different than 0?
does the unit have any behaviour triggering on death? or is the final effect set to something?
yeah, I was doing the exact same thing a few months ago no problem. But it's only now that I'm seeing this problem. It might be a change in behaviour from some patch? I dunno.
There are no "unit dies" triggers or anything like that running which might be interfering. I created a test where when I type the word "die" into chat it uses the "remove unit from game" trigger and does nothing else just to make sure it wasn't a problem in my code. The unit disapears and then a full 3 seconds later debris appears on the ground.
It's late at night but tomorrow I'll create a demo map with nothing but a rock tower and a trigger that removes it as demonstration.
I had tried removing all efects from the area previously but had foolishly forgotten to put a break between removing the tower and running the remove effect trigger. I inserted a wait 0.5 seconds step and it fixed the problem.
This is good enough for what I need it for, but obviously something is causing the effect to happen. Is it an actor event which creates the effect? If I could just remove it without having to include a wait command that would be ideal.
This is going to sound strange but it no longer works. Seriously tried it again today and can't get it to work. I messed around a bit and took out some of the other stuff I did like removing behaviours and abilities but I can't figure out how I was doing it.
There must be some kind of "magical" conmbination of which behaviour to remove when, how long you should pause between doing each step and which order you mess with the abilities...
This is bullshit. Surely there is a straightforward method for completely removing a unit and all its effects from the game permanently. Right?
Perhaps something like a two triggers. A trigger (1st) that removes the unit, and a trigger (2nd) that removes the spawned collapsed rocks. 2nd starts off and is turned on right before whenever you're about to remove rocks. Have the 2nd trigger turn itself off.
2nd trigger could probably just be something like
Unit enters entire map
type of triggering unit = collapsed rocks
remove triggering unit
turn current trigger off
there is no connection from actors to effects, actors cannot launch any effect, but effects are able to create actors. if you remove a unit from the game, it normally doesnt trigger the death response unless you have checked the flag for it (disabled by default). I guess you have another trigger running (maybe unit leaves region?) which creates the debris. please check your overview-editor, check all creation actions and look out for your debris. if you are able to exclude triggers as reason you have to check, again, the unit. check if there is a effect on death set on the unit itself. then check all behaviours. then check all persistant effects maybe running on that unit.
- - update - -
are those rocks doodads or units (destructible? footprint disappears after death)? if it's a unit the above text fits. if not you have to check the actor of the unit. there must be an creation action within events for the rocks or set within death response. otherwise the rocks itself can have a creation event connected to an effect that runs on death, the death of the unit itself, the cancelation of a persistant effect, a buff being turned off.
"if you remove a unit from the game, it normally doesnt trigger the death response unless you have checked the flag for it (disabled by default). I guess you have another trigger running (maybe unit leaves region?) which creates the debris. please check your overview-editor, check all creation actions and look out for your debris. if you are able to exclude triggers as reason you have to check, again, the unit."
Proof that this has nothing to do with me accidentally having other triggers running like unit leave region or something else which is creating the rocks.
While removing the rocks after removing the towers is a possibility it takes about 4 seconds for the rocks to appear and I would have to pause all game play for 4 seconds. This can potentially happen many times during a game and would be a major pain in the butt to players.
Thanks again for your help mate. I didn't understand what you were saying the first time... actually I still don't understand. So much of this doesn't make any sense to me like why destroying the effect doesn't do anything without that validator, why does it even use persistent effects in the first place... but then, nothing to do with data ever makes any sense to me.
Either way, it does exactly what I wanted. Thanks again for your help and your patience with me. :)