How to make Sombra unable to hack specific heroes

My plan is to make Sombra unable to hack Venture and Junkerqueen ONLY. Is there anyway I can disable Sombra’s ability to hack when attempting to hack either of them?

in general even detecting hack before its done is quite difficult, i while ago shortly after the sombra rework, I made a stealth tracker, not perfect but pretty good.

you can try editing the hack detection on that and check for the hero with a cancel primary action to end the ability if its detected.

Here’s a Snippet of the Conditions used of the “Reset In Combat - Hacking Player” Rule

	(Hero Being Duplicated(Event Player) == Hero(Sombra) || Hero Of(Event Player) == Hero(Sombra)) == True;
	Event Player.Invisible_Cooldown == 0;
	(Is Firing Secondary(Event Player) && Is True For Any(Filtered Array(All Living Players(Opposite Team Of(Team Of(Event Player))),
		!Has Status(Current Array Element, Hacked)), Distance Between(Event Player, Current Array Element)
		<= 15 && Is In Line of Sight(Eye Position(Event Player), Current Array Element, Barriers Do Not Block LOS) && Is In View Angle(
		Event Player, Current Array Element, 40))) == True;

the Line “Event Player.Invisible_Cooldown == 0;” will not be needed for what you want it for, as for making it only detect a certain hero, just edit the living players array to only include players on those heros
Example “Players on Hero(Venture) Append Array(Players on Hero(Junker Queen))”

If you would also like to detect if she is in stealth, i’ve never uploaded a code for this but it can be found on any of my AI codes. AI Template: X0CB6, would be the Smaller/Cleanest

1 Like