Friendly fire possible?

so has anyone done a game mode with friendly fire?is it even possible?

No its not possible.

actually i seen a youtube video talking about that, and a guy that made it, but only with hammond,mccree,ashe soldier and idk what more,thats the code:JJDB1, and thats the video i saw:- YouTube

It’s pretty much possible but it’s gonna take some really advance complex work, and study of workshop because you’ll have to figure out the radius of damage of the attacks, and the radius of the splash damage of some attacks which is just tedious and very tiresome to do but it is at the very least possible. (There might be exceptions though for some heroes)

I have made it possible in my 4738Z fun game mod.

1 Like

Ty m8
20 chars long.

I think this is possible for some heroes.
You need to recreate the damage event to make it.

Most type of damage event in Overwatch is hitscan such as Soldier 76, Which can be done by ray cast or line of sight. (Thanks to Overwatch workshop team so we don’t have to make this part by ourself)
Something like this.

rule("Hitscan")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Is Firing Primary(Event Player) == True;
		Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player) + Facing Direction Of(Event Player) * 50,
			All Players Not On Objective(Team Of(Event Player)), Event Player, True) == True;
	}

	actions
	{
		Small Message(All Players(All Teams), Custom String("Hit {0}", Ray Cast Hit Player(Eye Position(Event Player), Eye Position(
			Event Player) + Facing Direction Of(Event Player) * 50, All Players(Team Of(Event Player)), Event Player, True)));
	}
}
a little optimize

To optimize this pressure deal to the server, you can make an array that contains all the hitscan type heroes to condition.
something like this

conditions
{
	Array Contains(Global.A, Hero Of(Event Player)) == True;
}

The second type is the projectile such as Mercy’s Caduceus Blaster, a little tricky for me but still doable.

rule("Pre-set Variable")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Has Spawned(Event Player) == True;
	}

	actions
	{
		Event Player.A = Vector(0, 0, 0);
	}
}

rule("Projectile")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Is Firing Primary(Event Player) == True;
	}

	actions
	{
		Event Player.A = Eye Position(Event Player);
		"50 is for max distance, 20 is for speed."
		Chase Player Variable At Rate(Event Player, A, Eye Position(Event Player) + Facing Direction Of(Event Player) * 50, 20, None);
		Create Effect(All Players(All Teams), Sphere, White, Event Player.A, 0.300, Visible To Position and Radius);
	}
}

rule("Projectile Hit")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Count Of(Filtered Array(Players Within Radius(Event Player.A, 3, Team Of(Event Player), Surfaces And All Barriers),
			Current Array Element != Event Player)) > 0;
	}

	actions
	{
		Small Message(All Players(All Teams), Custom String("hit {0}", First Of(Filtered Array(Players Within Radius(Event Player.A, 3,
			Team Of(Event Player), Surfaces And All Barriers), Current Array Element != Event Player))));
		Stop Chasing Player Variable(Event Player, A);
		Wait(0.020, Ignore Condition);
		Destroy All Effects;
		Event Player.A = Eye Position(Event Player);
	}
}

But the problem here is you can only have one bullet exists at the same time because of the current workshop can’t chase value in the array.

You still can make more bullet by chase more variables and then put them into an array to check hit.
like this

rule("Pre-set Variable")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Has Spawned(Event Player) == True;
	}

	actions
	{
		Event Player.A = Vector(0, 0, 0);
		Event Player.B = Vector(0, 0, 0);
		Event Player.C = Vector(0, 0, 0);
		Event Player.D = Vector(0, 0, 0);
	}
}

rule("Projectile 1")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Is Firing Primary(Event Player) == True;
		Event Player.A == Vector(0, 0, 0);
	}

	actions
	{
		Wait(0.175, Ignore Condition);
		Event Player.A = Eye Position(Event Player) + Facing Direction Of(Event Player) * 2.100;
		"50 is for max distance, 20 is for speed."
		Chase Player Variable At Rate(Event Player, A, Eye Position(Event Player) + Facing Direction Of(Event Player) * 50, 20, None);
		Create Effect(All Players(All Teams), Sphere, White, Event Player.A, 0.300, Visible To Position and Radius);
		"expect to reach max distance after 2 second"
		Wait(2, Ignore Condition);
		Stop Chasing Player Variable(Event Player, A);
		Event Player.A = Vector(0, 0, 0);
	}
}

rule("Projectile 2")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Is Firing Primary(Event Player) == True;
		Event Player.B == Vector(0, 0, 0);
		Event Player.A != Vector(0, 0, 0);
	}

	actions
	{
		Wait(0.175, Ignore Condition);
		Event Player.B = Eye Position(Event Player) + Facing Direction Of(Event Player) * 2.100;
		"50 is for max distance, 20 is for speed."
		Chase Player Variable At Rate(Event Player, B, Eye Position(Event Player) + Facing Direction Of(Event Player) * 50, 20, None);
		Create Effect(All Players(All Teams), Sphere, White, Event Player.B, 0.300, Visible To Position and Radius);
		"expect to reach max distance after 2 second"
		Wait(2, Ignore Condition);
		Stop Chasing Player Variable(Event Player, B);
		Event Player.B = Vector(0, 0, 0);
	}
}

rule("Projectile 3")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Is Firing Primary(Event Player) == True;
		Event Player.C == Vector(0, 0, 0);
		Event Player.B != Vector(0, 0, 0);
	}

	actions
	{
		Wait(0.175, Ignore Condition);
		Event Player.C = Eye Position(Event Player) + Facing Direction Of(Event Player) * 2.100;
		"50 is for max distance, 20 is for speed."
		Chase Player Variable At Rate(Event Player, C, Eye Position(Event Player) + Facing Direction Of(Event Player) * 50, 20, None);
		Create Effect(All Players(All Teams), Sphere, White, Event Player.C, 0.300, Visible To Position and Radius);
		"expect to reach max distance after 2 second"
		Wait(2, Ignore Condition);
		Stop Chasing Player Variable(Event Player, C);
		Event Player.C = Vector(0, 0, 0);
	}
}

rule("Projectile 4")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Is Firing Primary(Event Player) == True;
		Event Player.D == Vector(0, 0, 0);
		Event Player.C != Vector(0, 0, 0);
	}

	actions
	{
		Wait(0.175, Ignore Condition);
		Event Player.D = Eye Position(Event Player) + Facing Direction Of(Event Player) * 2.100;
		"50 is for max distance, 20 is for speed."
		Chase Player Variable At Rate(Event Player, D, Eye Position(Event Player) + Facing Direction Of(Event Player) * 50, 20, None);
		Create Effect(All Players(All Teams), Sphere, White, Event Player.D, 0.300, Visible To Position and Radius);
		"expect to reach max distance after 2 second"
		Wait(2, Ignore Condition);
		Stop Chasing Player Variable(Event Player, D);
		Event Player.D = Vector(0, 0, 0);
	}
}

rule("Projectile Hit")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Count Of(Filtered Array(Event Player.E, Players Within Radius(Current Array Element, 2, Team Of(Event Player),
			Surfaces And All Barriers) == True)) > 0;
	}

	actions
	{
		Event Player.G = Index Of Array Value(Event Player.E, First Of(Filtered Array(Event Player.E, Players Within Radius(
			Current Array Element, 2, Team Of(Event Player), Surfaces And All Barriers) == True)));
		Small Message(All Players(All Teams), Custom String("Hit {0}", First Of(Players Within Radius(Event Player.E[Event Player.G], 2,
			Team Of(Event Player), Surfaces And All Barriers))));
		If(Event Player.G == 0);
			Stop Chasing Player Variable(Event Player, A);
			Event Player.A = Vector(0, 0, 0);
		Else If(Event Player.G == 1);
			Stop Chasing Player Variable(Event Player, B);
			Event Player.B = Vector(0, 0, 0);
		Else If(Event Player.G == 2);
			Stop Chasing Player Variable(Event Player, C);
			Event Player.C = Vector(0, 0, 0);
		Else If(Event Player.G == 3);
			Stop Chasing Player Variable(Event Player, D);
			Event Player.D = Vector(0, 0, 0);
		End;
		Wait(0.100, Restart When True);
		Destroy All Effects;
		Loop If Condition Is True;
	}
}

rule("Projectile Update")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	actions
	{
		Event Player.E = Array(Event Player.A, Event Player.B, Event Player.C, Event Player.D);
		Wait(0.100, Ignore Condition);
		Loop;
	}
}

And the projectile has the behavior like gravity or bounce such as Torbjorn or Sigma.

I have no idea, I think it still is doable somehow if you know how to recreate the motion of this such as thing.
maybe… Torbjorn won’t be too hard.

rule("projectile with gravity")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Is Firing Primary(Event Player) == True;
	}

	actions
	{
		Event Player.A = Eye Position(Event Player) + Facing Direction Of(Event Player) * 2.100;
		Event Player.B = Y Component Of(Eye Position(Event Player));
		Event Player.C = Facing Direction Of(Event Player);
		Chase Player Variable At Rate(Event Player, A, Vector(X Component Of(Event Player.A), Event Player.B, Z Component Of(
			Event Player.A)) + Event Player.C * 50, 23, Destination and Rate);
		Chase Player Variable At Rate(Event Player, B, Event Player.B - Event Player.D, 16, Destination and Rate);
		Chase Player Variable At Rate(Event Player, D, Absolute Value(Event Player.B * 99), 9, None);
	}
}

rule("Hit")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Players Within Radius(Event Player.A, 1.200, Team Of(Event Player), Surfaces And All Barriers) == True;
	}

	actions
	{
		Small Message(All Players(All Teams), Custom String("Hit {0}", First Of(Players Within Radius(Event Player.A, 1.200, Team Of(
			Event Player), Surfaces And All Barriers))));
		Wait(0.100, Ignore Condition);
		Stop Chasing Player Variable(Event Player, A);
		Stop Chasing Player Variable(Event Player, B);
		Stop Chasing Player Variable(Event Player, D);
		Event Player.A = Vector(0, 0, 0);
		Event Player.D = 0;
	}
}

All the method above is to recreate the way hero attack. (Get the victim variable)
once you get victim variable you can just do a damage action or something like that.

1 Like

ty m8 i thought it would be quite simple but i guess its not