I thought I was past getting hung up on simple stuff like this..
I thought the condition I needed was:
Conditions
((Triggering unit) is Hallucination) == false
I don't know if it's just the function that's not working, because it didn't work on a cloaked ghost when I set triggering unit is Cloaked either or if I'm just using it wrong or what. I know that hallucinations don't give kill credit so I tried making that the condition but the only place I could call "doesn't give kill credit" is that same unit classification check and it too failed.
Here's the basic code, stripped of the extra actions that don't matter.
Just with a quick look I believe the issue is that once a unit dies, it is no longer a hallucination. I've seen quite a few people with issues similar to this; after a unit dies, it loses most of its state flags (if not all). Not sure its really even considered a 'unit' anymore.
Anyway, there are various work-arounds. Unit takes fatal damage may work... or you can give hallucination units a behavioral death response that causes effect - create marine, which would allow you to avoid triggering it, as I know some people like.
Turning on the flag "no death event" via the hallucination behavior may also work.
The thought that unit classification check failed due to the unit being dead had crossed my mind.
I also messed with the unit filter match but the wording of that trigger is so screwed up I couldn't get it working. I tried excluding hallucination for player triggeringplayer == true and false, I tried required hallucination for triggeringplayer == true and false. I tried excluded/required hallucination for killing player == true/false but nothing seemed to work.
I created a workaround but I'm not happy with it. I basically made hallucinations invulnerable by going through all the damage on the map and filtering preventing it from targeting hallucinations. This stopped them from getting killed, but I still had to go in the trigger editor make a condition of killing player != Owner of triggering player. This worked but I really had to nerf their duration because a minute long invulnerable unit was a little powerful.
Actually, I just came up with another solution. I'll just make the hallucination spell summon units that are copies of other units but have a unique name. Then a " triggering unit != unit type" condition will work. This would let me make hallucinations vulnerable to attack again. ty guys.
this thread is a few years old but it still came up in my search results... I have a pretty simple work around that is doing alright I set up a Not condition that checks if the triggering unit has hallucination behavior
Events - Any unit dies
Conditions - Unit type of (triggering unit) = X
- Not
- (Stack of count Sentry - Hallucation on (triggering unit)) == 1
didn't worked for me! having 2 mirror images one does still trigger the death event (no clues why, both die after the same time, only one triggers).
my workaround looks bit different:
the effect that destroys the hallucinations on the timedlife buff is set to timedlife death type. validating the death type works out for me. hope this might help anyone
also needs an behavior to nullify deadly damage and kill the unit with the needed death type
I thought I was past getting hung up on simple stuff like this..
I thought the condition I needed was:
Conditions ((Triggering unit) is Hallucination) == false
I don't know if it's just the function that's not working, because it didn't work on a cloaked ghost when I set triggering unit is Cloaked either or if I'm just using it wrong or what. I know that hallucinations don't give kill credit so I tried making that the condition but the only place I could call "doesn't give kill credit" is that same unit classification check and it too failed.
Here's the basic code, stripped of the extra actions that don't matter.
@kaji2: Go
Just with a quick look I believe the issue is that once a unit dies, it is no longer a hallucination. I've seen quite a few people with issues similar to this; after a unit dies, it loses most of its state flags (if not all). Not sure its really even considered a 'unit' anymore.
Anyway, there are various work-arounds. Unit takes fatal damage may work... or you can give hallucination units a behavioral death response that causes effect - create marine, which would allow you to avoid triggering it, as I know some people like.
Turning on the flag "no death event" via the hallucination behavior may also work.
Have you tried the unit filter match?
Events
Unit - Any Unit dies
Local Variable
triggeringPlayer = (Owner of (Triggering unit)) <Integer>
Condition
((Triggering unit) is Excluded: Hallucination for player triggeringPlayer) == true
or Required: Hallucination whatever effect you're trying ot get
The thought that unit classification check failed due to the unit being dead had crossed my mind.
I also messed with the unit filter match but the wording of that trigger is so screwed up I couldn't get it working. I tried excluding hallucination for player triggeringplayer == true and false, I tried required hallucination for triggeringplayer == true and false. I tried excluded/required hallucination for killing player == true/false but nothing seemed to work.
I created a workaround but I'm not happy with it. I basically made hallucinations invulnerable by going through all the damage on the map and filtering preventing it from targeting hallucinations. This stopped them from getting killed, but I still had to go in the trigger editor make a condition of killing player != Owner of triggering player. This worked but I really had to nerf their duration because a minute long invulnerable unit was a little powerful.
Actually, I just came up with another solution. I'll just make the hallucination spell summon units that are copies of other units but have a unique name. Then a " triggering unit != unit type" condition will work. This would let me make hallucinations vulnerable to attack again. ty guys.
this thread is a few years old but it still came up in my search results... I have a pretty simple work around that is doing alright I set up a Not condition that checks if the triggering unit has hallucination behavior
hope this helps
Nice necro still that finally buries this one,
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
didn't worked for me! having 2 mirror images one does still trigger the death event (no clues why, both die after the same time, only one triggers).
my workaround looks bit different:
the effect that destroys the hallucinations on the timedlife buff is set to timedlife death type. validating the death type works out for me. hope this might help anyone
also needs an behavior to nullify deadly damage and kill the unit with the needed death type