noooooooo
it didn't work
i think war3 cannot detect a unit after it explode ...
pls help T_T
Instead of making a second post a couple of minutes after making a first one, you should edit the first post...
Using a trigger to make corpses for units killed by artillery works for me:
Probably should have excluded summoned units too. But anyway, there's a better way, I found:Trigger:
- Corpse Generation
- Events
- Unit - A unit Dies
- Conditions
- (Unit-type of (Killing unit)) Equal to Artillery Unit
- ((Triggering unit) is A structure) Equal to False
- ((Triggering unit) is A Hero) Equal to False
- ((Triggering unit) is an illusion) Equal to False
- Actions
- Set TempPoint = (Position of (Triggering unit))
- Unit - Create a (Unit-type of (Triggering unit)) corpse for (Owner of (Triggering unit)) at TempPoint
- Custom script: call RemoveLocation(udg_TempPoint)
Trigger:
- Init Damage Detection
- Events
- Map initialization
- Conditions
- Actions
- -------- This leaks a unit group --------
- Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
- Loop - Actions
- Trigger - Add to Nonexploding Artillery Attack <gen> the event (Unit - (Picked unit) Takes damage)
Trigger:
- Add Damage Detection
- Events
- Unit - A unit enters (Playable map area)
- Conditions
- Actions
- Trigger - Add to Nonexploding Artillery Attack <gen> the event (Unit - (Triggering unit) Takes damage)
Trigger:
- Nonexploding Artillery Attack
- Events
- Conditions
- ((Life of (Triggering unit)) - 0.40) Less than (Damage taken)
- (Unit-type of (Damage source)) Equal to Artillery Unit
- Actions
- Trigger - Turn off (This trigger)
- Unit - Cause (Damage source) to damage (Triggering unit), dealing (Damage taken) damage of attack type Chaos and damage type Universal
- Trigger - Turn on (This trigger)
Unit Takes Damage events run immediately before the damage is applied, so by using a trigger to cause non-artillery damage equal to the damage received, but only in the case that it will kill the unit (life - 0.4 < damage), it will kill it normally, not exploding it.