Looking for a workshop code

So I can’t seem to find any codes for the 3rd person workshop thing that work. Can someone help?

1 Like

Over the right shoulder looking camera; based on 7KR0G originally made by Reddit user Freuyh

variables
{
	global:
		22: W_Freuyh

	player:
		8: I_Scale
}

rule("A1")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Global.W_Freuyh = Array(-1.750, -1.500, -1.500, -1.500, -1.500, -3, -1.750, -3, -1.500, -2.500, -1.500, -1.500, -1.500, -3, -1.500,
			-1.500, -2, -1.500, -1.500, -3, -1.500, -1.500, -2.500, -1.500, -3, -1.500, -1.500, -4, -1.500, -2, -1.500, -3);
	}
}

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

	actions
	{
		Event Player.I_Scale = 1;
		Start Camera(Event Player, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player) + (Array Contains(
			Event Player.I_Scale, 0.100) ? 0.125 : Event Player.I_Scale) * World Vector Of((Array Contains(Array(Hero Of(Event Player),
			Hero Being Duplicated(Event Player)), Hero(D.Va)) && Is In Alternate Form(Event Player) ? -1.500 : (Array Contains(Array(
			Hero Of(Event Player), Hero Being Duplicated(Event Player)), Hero(Mercy)) && Is Using Ultimate(Event Player)
			? -3 : Global.W_Freuyh[Index Of Array Value(All Heroes, Is Duplicating(Event Player) ? Hero Being Duplicated(Event Player)
			: Hero Of(Event Player))])) / 2 * Left, Event Player, Rotation) + Facing Direction Of(Event Player) * (Array Contains(
			Event Player.I_Scale, 0.100) ? 0.125 : Event Player.I_Scale) * (Array Contains(Array(Hero Of(Event Player),
			Hero Being Duplicated(Event Player)), Hero(D.Va)) && Is In Alternate Form(Event Player) ? -1.500 : (Array Contains(Array(
			Hero Of(Event Player), Hero Being Duplicated(Event Player)), Hero(Mercy)) && Is Using Ultimate(Event Player)
			? -3 : Global.W_Freuyh[Index Of Array Value(All Heroes, Is Duplicating(Event Player) ? Hero Being Duplicated(Event Player)
			: Hero Of(Event Player))])), Null, Event Player, False), Event Player + Local Vector Of(Eye Position(Event Player),
			Event Player, Rotation And Translation) + Facing Direction Of(Event Player) * (Array Contains(Event Player.I_Scale, 0.100)
			? 0.125 : Event Player.I_Scale) * (Array Contains(Array(Hero Of(Event Player), Hero Being Duplicated(Event Player)), Hero(
			D.Va)) && Is In Alternate Form(Event Player) ? 50 : Array(15, 50, 50, 50, 50, 50, 50, 50, 50, 50, 12.500, 50, 50, 15, 50, 50,
			15, 50, 50, 15, 50, 50, 15, 50, 50, 50, 10, 50, 50, 50, 50, 50)[Index Of Array Value(All Heroes, Is Duplicating(Event Player)
			? Hero Being Duplicated(Event Player) : Hero Of(Event Player))]), 100);
	}
}

Behind the head sitting camera.

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

	actions
	{
		Event Player.I_Scale = 1;
		Start Camera(Event Player, Eye Position(Event Player) + (Array Contains(Event Player.I_Scale, 0.100)
			? 0.125 : Event Player.I_Scale) * (World Vector Of(Vector(0, 0.400, -0.700), Event Player, Rotation) + Facing Direction Of(
			Event Player) * (Array Contains(Hero(D.Va), Is Duplicating(Event Player) ? Hero Being Duplicated(Event Player) : Hero Of(
			Event Player)) && Is In Alternate Form(Event Player) ? -2.250 : (Array Contains(Hero(Mercy), Is Duplicating(Event Player)
			? Hero Being Duplicated(Event Player) : Hero Of(Event Player)) && Is Using Ultimate(Event Player) ? -3 : Array(-2.250, -2.250,
			-2.250, -3, -2.250, -2.250, -2.250, -3, -2.250, -2.500, -2.250, -2.250, -2.250, -3, -2.250, -2.250, -2.500, -2.250, -2.250,
			-2.250, -2.250, -2.250, -2.500, -2.250, -3, -2.250, -2.250, -3, -2.250, -2.500, -2.250, -3)[Index Of Array Value(All Heroes,
			Is Duplicating(Event Player) ? Hero Being Duplicated(Event Player) : Hero Of(Event Player))]))),
			Event Player + Facing Direction Of(Event Player) * 100 * (Array Contains(Event Player.I_Scale, 0.100)
			? 0.125 : Event Player.I_Scale), 70);
	}
}

They both will clip through the floor if your character model is too tall, they both can be used in addition with scaling, as long as that Scaling uses player variable I_Scale it will match close to perfectly.

I also have a cross-hair accurate version for both (only the Freuyh one) of them (unless I overwrote them with something else ~~); though they can both be relatively choppy if the distance between the cross-hair surface changes quickly


If you didn’t mean 3rd person camera by “3rd person workshop thing” then please elaborate on what you mean by that.

2 Likes

Would love to get this as well thank you very much!

Here ya go!

variables
{
	global:
		22: W_Freuyh

	player:
		8: I_Scale
}

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

	actions
	{
		Event Player.I_Scale = 1;
		Global.W_Freuyh = Array(-1.750, -1.500, -1.500, -1.500, -1.500, -3, -1.750, -3, -1.500, -2.500, -1.500, -1.500, -1.500, -3, -1.500,
			-1.500, -2, -1.500, -1.500, -3, -1.500, -1.500, -2.500, -1.500, -3, -1.500, -1.500, -4, -1.500, -2, -1.500, -3);
		Start Camera(Event Player, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player) + (Array Contains(
			Event Player.I_Scale, 0.100) ? 0.125 : Event Player.I_Scale) * World Vector Of(Vector((Array Contains(Array(Hero Of(
			Event Player), Hero Being Duplicated(Event Player)), Hero(D.Va)) && Is In Alternate Form(Event Player) ? -1.500 : (
			Array Contains(Array(Hero Of(Event Player), Hero Being Duplicated(Event Player)), Hero(Mercy)) && Is Using Ultimate(
			Event Player) ? -3 : Global.W_Freuyh[Index Of Array Value(All Heroes, Is Duplicating(Event Player) ? Hero Being Duplicated(
			Event Player) : Hero Of(Event Player))])) / 2, 0, 0), Event Player, Rotation) + Facing Direction Of(Event Player) * (
			Array Contains(Event Player.I_Scale, 0.100) ? 0.125 : Event Player.I_Scale) * (Array Contains(Array(Hero Of(Event Player),
			Hero Being Duplicated(Event Player)), Hero(D.Va)) && Is In Alternate Form(Event Player) ? -1.500 : (Array Contains(Array(
			Hero Of(Event Player), Hero Being Duplicated(Event Player)), Hero(Mercy)) && Is Using Ultimate(Event Player)
			? -3 : Global.W_Freuyh[Index Of Array Value(All Heroes, Is Duplicating(Event Player) ? Hero Being Duplicated(Event Player)
			: Hero Of(Event Player))])), All Players(Team Of(Event Player)), Event Player, False), Event Player + Local Vector Of(
			Eye Position(Event Player), Event Player, Rotation And Translation) + Facing Direction Of(Event Player) * Distance Between(
			Eye Position(Event Player), Update Every Frame(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
			+ Facing Direction Of(Event Player) * 100 * (Array Contains(Event Player.I_Scale, 0.100) ? 0.125 : Event Player.I_Scale),
			(Array Contains(All Support Heroes, Hero Of(Event Player)) ? All Players(All Teams) : All Players(Opposite Team Of(Team Of(Event Player)))), Event Player, True))), 100);
	}
}

I can recommend changing

(Array Contains(All Support Heroes, Hero Of(Event Player)) ? All Players(All Teams) : All Players(Opposite Team Of(Team Of(Event Player))))

To

Null

In the final Ray Cast if it is used for cosmetic purposes only; aiming can become quite the hassle with the camera jumping that much.

1 Like