| 08-08-2008, 08:20 PM | #1 |
http://www.wc3campaigns.net/showpost...0&postcount=32 Is it paranoia, an old fixed bug or we should still avoid using Remove functions when we can use a Kill.. function ? Oh and btw create/kill or remove a destructable leaks, that's a fact just test the map i posted in the quoted thread. |
| 08-08-2008, 08:25 PM | #2 |
The problem is with H2I()-related systems where a unit with Handle ID X can be removed and then a new unit is created with the same handle id without the system noticing. However, most systems clean themselves up by checking for unit death events, so this is an acceptable fix: JASS:function RemoveUnitEx takes unit U returns nothing call ShowUnit(U, false) call KillUnit(U) endfunction |
| 08-08-2008, 08:32 PM | #3 |
Oh ok i understand now, thx. That is nothing with the functions themselves. Btw there is a way to find if an unit is removed of the game. Because she get the order "undefend" and "magicundefense" two times (one for his death and one for his remove (or end of decay ofc). Ofc only if the unit has the ability, but the ability can be deactivated for the unit owner. |
| 08-08-2008, 08:41 PM | #4 | |
Quote:
|
| 08-09-2008, 05:44 AM | #5 |
Does it work if you just call RemoveUnit()? I tried it some time ago but I used KillUnit(). |
| 08-09-2008, 09:38 AM | #6 | ||
Quote:
Quote:
I don't find any ability that i can use on ONE corpse. I tried all the undead abilities but all are area, not single target. I also tried to use a channel ability but i can't target a corpse ... And anyway if i found one, then all units death must leave a corpse, but that's not really a problem if you don't want the corpse you can change the unit position when she dead. But it will be annoying to list all of them ... |
