EventsUnit-AnyUnitdiesLocalVariablesConditions((Triggeringunit)isRequired:Heroic;Excluded:Self,Structure,Missileforplayer(Ownerof(Triggeringunit)))==TrueActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Controllerofplayer(Ownerof(Killingunit)))!=UserThenUI-Display(Combine((Text(Nameofplayer(Ownerof(Triggeringunit)))withcolor(Color((Currentplayer(Ownerof(Triggeringunit))color))))," dies to enemy forces."))for(Allplayers)toDebugareaElseUI-Display(Combine((Text(Nameofplayer(Ownerof(Killingunit)))withcolor(Color((Currentplayer(Ownerof(Killingunit))color))))," kills ",(Text(Nameofplayer(Ownerof(Triggeringunit)))withcolor(Color((Currentplayer(Ownerof(Triggeringunit))color))))))for(Allplayers)toDebugarea
And it doesnt get the Unit that shot the projectile like yamato or other spells. How to get the killer projectile Unit owner?
Depends on the setup of your missile. With a standard missile setup or certain collider approaches, the killing unit will be the caster of the launch missile effect, however the usual behavior approach for colliders requires special handling to make that happen.
So, how did you set up your missiles?
"The missiles that didnt gave kill credit have either have a behavior with end effect set as the damage, or the actual death of the missile creats the damage effect" creator comment. I'm just triggering.
So, most likely the damage is being caused by the missile unit instead of the caster unit. I usually circumvent this by using a persistent effect executed by the caster on the missile doing the collision check instead of a behavior, this way any and all effects are executed by the caster at all times, making kill credit a non-issue. This is probably the most clean way.
You can also use the Kill Credit field of the behavior to relay all credit from the missile to the caster, however this won't work, if you add the behavior to the missile unit directly, you will need to make the caster apply it to the missile at launch.
And, of course, depending on your map setup, you can just reference to the caster via trigger, for example if you only control one hero, you can just reference to the hero of the player owning the killing unit or something.
on my map, the caster launches the missile ending on a target area dealing no damage or effect..
then i added a behavior on the missile unit to search for enemies every .1 sec (not apply behavior, i added it on the missile unit itself)
it does everything on the missile unit (search enemy, damage, suicide)
you should try it