Login
Create
Waitedboat4

Waitedboat4's Thirdperson Mod

Waitedboat4's Third Person Mod

Hey! I'm trying something different! I've decided to make my own "Third Person Mod" so it may be janky since this is my first try with doing crazy stuff like this with a camera (I'm used to making cutscenes lol)

Third Person Echo

Zoomed in camera by physically crouching in-game

Ring effect is placed around your feet whilst you are invisible as Sombra

How does your camera get modified?

  • If you take damage, your camera will zoom in a little
  • If you deal a final blow, then you camera will jolt in slightly
  • Junkrat's ultimate triggers the camera to completely stop
  • When Junkrat's ultimate is not being used, the camera will continue

Copy/Paste

variables
{
    player:
        100: Zoom
        101: Info
        102: InvisEffect
}

rule("===Waitedboat4's Thirdperson Mod===")
{
    event
    {
        Ongoing - Global;
    }
}

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

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

    actions
    {
        Wait(1, Ignore Condition);
        Small Message(Event Player, Custom String("Crouch to zoom in"));
        Event Player.Info = True;
    }
}

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

    conditions
    {
        Has Spawned(Event Player) == True;
        Hero Of(Event Player) != Hero(Junkrat);
    }

    actions
    {
        Start Camera(Event Player, Update Every Frame(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
            + Up + Facing Direction Of(Event Player) * Event Player.Zoom, Null, Event Player, False)), Update Every Frame(
            Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player) + Facing Direction Of(Event Player) * 100, Null,
            Event Player, False)), 0);
        Small Message(Event Player, Custom String("Crouch to zoom in"));
    }
}

rule("FOV MODIFIER - Damage")
{
    event
    {
        Player Took Damage;
        All;
        All;
    }

    actions
    {
        Chase Player Variable At Rate(Event Player, Zoom, Event Player.Zoom + 0.010, 30, Destination and Rate);
        Wait(1, Ignore Condition);
        Skip If(Is Crouching(Event Player) == True, 1);
        Chase Player Variable At Rate(Event Player, Zoom, -5, 10, Destination and Rate);
        Skip If(Is Crouching(Event Player) == False, 1);
        Chase Player Variable At Rate(Event Player, Zoom, -1.500, 10, Destination and Rate);
    }
}

rule("FOV MODIFIER - Final Elim")
{
    event
    {
        Player Dealt Final Blow;
        All;
        All;
    }

    actions
    {
        Chase Player Variable At Rate(Event Player, Zoom, -3, 30, Destination and Rate);
        Wait(0.500, Ignore Condition);
        Skip If(Is Crouching(Event Player) == True, 1);
        Chase Player Variable At Rate(Event Player, Zoom, -5, 30, Destination and Rate);
        Skip If(Is Crouching(Event Player) == False, 1);
        Chase Player Variable At Rate(Event Player, Zoom, -1.500, 30, Destination and Rate);
    }
}

rule("FOV MODIFIERS - Crouch")
{
    event
    {
        Ongoing - Each Player;
        All;
        All;
    }

    conditions
    {
        (Is Crouching(Event Player) || Is Firing Secondary(Event Player)) == False;
    }

    actions
    {
        Chase Player Variable At Rate(Event Player, Zoom, -5, 10, Destination and Rate);
    }
}

rule("FOV MODIFIERS - Crouch")
{
    event
    {
        Ongoing - Each Player;
        All;
        All;
    }

    conditions
    {
        Is Crouching(Event Player) == True;
    }

    actions
    {
        Chase Player Variable At Rate(Event Player, Zoom, -1.500, 10, Destination and Rate);
    }
}

rule("Junkrat Stop Camera")
{
    event
    {
        Ongoing - Each Player;
        All;
        Junkrat;
    }

    conditions
    {
        Is Using Ultimate(Event Player) == True;
    }

    actions
    {
        Stop Camera(Event Player);
    }
}

rule("Junkrat Start Camera")
{
    event
    {
        Ongoing - Each Player;
        All;
        Junkrat;
    }

    conditions
    {
        Is Using Ultimate(Event Player) == False;
    }

    actions
    {
        Start Camera(Event Player, Update Every Frame(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
            + Up + Facing Direction Of(Event Player) * Event Player.Zoom, Null, Event Player, False)), Update Every Frame(
            Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player) + Facing Direction Of(Event Player) * 100,
            All Players(Opposite Team Of(Team Of(Event Player))), Event Player, True)), 0);
    }
}

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

    conditions
    {
        Is Using Ability 1(Event Player) == True;
    }

    actions
    {
        Create Effect(Event Player, Ring, Color(Purple), Update Every Frame(Position Of(Event Player)), 1, Visible To Position and Radius);
        Event Player.InvisEffect = Last Created Entity;
    }
}

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

    conditions
    {
        Is Using Ability 1(Event Player) == False;
    }

    actions
    {
        Destroy Effect(Event Player.InvisEffect);
    }
}

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

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

    actions
    {
        If(Hero Of(Event Player) == Hero(Ana));
            Chase Player Variable At Rate(Event Player, Zoom, -1.500, 10, Destination and Rate);
        Else If(Hero Of(Event Player) == Hero(Ashe));
            Chase Player Variable At Rate(Event Player, Zoom, -1.500, 10, Destination and Rate);
        Else If(Hero Of(Event Player) == Hero(Widowmaker));
            Chase Player Variable At Rate(Event Player, Zoom, -1.500, 10, Destination and Rate);
    }
}

rule("===Waitedboat4's Thirdperson Mod===")
{
    event
    {
        Ongoing - Global;
    }
}
Categories: Tools, Miscellaneous
Tags: third person
Heroes: All
Created At:
Updated At:
Version: 1.1

Snippet

Loading...

Similar Codes

Elo Hell Logo_H-M-Dark
Join the Elo Hell Workshops Discord
Workshop.codes - Background image