Help with Homing Projectiles + Status Effects

Hi! I’m using the Create Homing Projectile feature to try and make an ability that explodes in an AoE, dealing damage and applying status. There doesn’t seem to be a way to apply status with the projectile. How I have it set up right now is I have the projectile, and when I press that ability button it also applies the status in a radius around the closest enemy to reticle. It’s not super clean because the status obviously is still applied even if the projectile isn’t able to hit.

Is there a way to make the projectile aoe explosion itself apply status effects, or a way to track specifically who that projectile dealt damage to so I can then apply the status effect to them?

Any tips are very appreciated! :slight_smile:

you can try using a Damage Taken Trigger (dont use Damage Dealt as it wont work if multiple targets are hit on the same frame), and check for Event Button == Button(Primary Fire) (almost all damage defaults to primary fire). and then also add some other conditions based off your hero so it wont trigger on their primary fire.

consider having a second homing projectile created at the same time, with the exact same parameters but always dealing exactly 1 damage. and check for that later in the conditions
(check for Event Damage < 2, because modifications can influence it, nano boost & damage boost for example)

but i cant provide more info on that unless i know what hero it’ll be used on & there probably is no way if its used on any hero.

however this doesn’t mean its not possible, just not possible using Create Projectile even before OW2 released, I was making my own projectiles with the workshop that were really good (gravity could be better but eh), and from that you can definitely apply status effects.

I will provide a script of the workshop projectile if needed, but also if needed provide info about the projectile (speed, damage, effects, model, etc…), so that i can put it in the snippet to give to you

and yes, i’ve made a homing one before, i made kiriko in OW1 (with a working protection suzu & healing ofuda), dont worry about how bad those ones look though, it was the first or second time i made them & they got much better after that

Thank you so much for the helpful reply! I’ll take your suggestions and mess around with it when I’m home later. More context - It’s for Zenyatta. It’s an ability that replaces Discord Orb, called “Chaos Orb”. It disables discord and gives him this on a cooldown. He launches a homing orb that explodes in an AoE dealing damage, knockback, and applying a random status effect to victims. Originally I wanted it to be rather slow moving, but greatly increased its speed so it hits almost instantly bc of the way I have the status applying currently. (And don’t worry about help with the random status part of it, I have all of that working perfectly with a variable and random integer generation.)

As long as I have Zen set to receive credit for the damage of the ability, I’m thinking I should be able to run an ongoing event for all players when receiving damage, with conditions that damager is Zen, and event damage != Primary, secondary fire, or melee, to then apply the effects.

i just did some in-game testing

variables
{
	player:
		0: Target
		1: Effect
}

rule("Use Chaos Orb")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		(Is Duplicating(Event Player) ? Hero Being Duplicated(Event Player) : Hero Of(Event Player)) == Hero(Zenyatta);
		Is Button Held(Event Player, Button(Ability 2)) == True;
	}

	actions
	{
		Event Player.Target = First Of(Sorted Array(Filtered Array(All Living Players(Opposite Team Of(Team Of(Event Player))),
			Is In Line of Sight(Eye Position(Event Player), Eye Position(Current Array Element), Barriers Do Not Block LOS)),
			Angle Between Vectors(Facing Direction Of(Event Player), Direction Towards(Eye Position(Event Player), Eye Position(
			Current Array Element)))));
		Create Homing Projectile(Orb Projectile, Event Player, Null, Null, To World, Damage, Opposite Team Of(Team Of(Event Player)), 50,
			1, 4, Bad Explosion, Explosion Sound, 0, 20, 8, 6, Evaluate Once(Event Player.Target), 0.500);
	}
}

rule("Chaos Orb: Random Status")
{
	event
	{
		Player Took Damage;
		All;
		All;
	}

	conditions
	{
		(Is Duplicating(Attacker) ? Hero Being Duplicated(Attacker) : Hero Of(Attacker)) == Hero(Zenyatta);
		Event Ability == Null;
	}

	actions
	{
		Victim.Effect = Random Integer(0, 6);
		If(Event Player.Effect == 0);
			Set Status(Victim, Attacker, Hacked, 5);
		Else If(Event Player.Effect == 1);
			Set Status(Victim, Attacker, Burning, 5);
		Else If(Event Player.Effect == 2);
			Set Status(Victim, Attacker, Knocked Down, 1);
		Else If(Event Player.Effect == 3);
			Set Status(Victim, Attacker, Asleep, 3);
		Else If(Event Player.Effect == 4);
			Set Status(Victim, Attacker, Frozen, 2);
		Else If(Event Player.Effect == 5);
			Set Status(Victim, Attacker, Rooted, 3);
		Else If(Event Player.Effect == 6);
			Set Status(Victim, Attacker, Stunned, 2);
		End;
	}
}

works, as create projectile seems to use Null instead of Primary Fire for the Event Ability (i dont think its always worked like that, though i could be wrong). this makes it actually really easy to detect. unless you have more then one custom projectile per hero. (which i dont think you do, so thats fine)

also NEVER change the Amount Scaler from 1, when using AoE projectiles. it says it’ll become the minimum damage but thats a lie, has been since it was first added as an action. it might do what it says, but it definitely scales the entire damage still.

(i did test 25 amount scaler before & it was 1 hit killing everything pretty much, so its definitely not patched yet)