Return to post
- settings
- {
- main
- {
- Description: "You're in Third Person. Play any mode you want. More at workshop.codes/third-person"
- }
- lobby
- {
- Allow Players Who Are In Queue: Yes
- Match Voice Chat: Enabled
- }
- modes
- {
- Deathmatch
- {
- Game Length In Minutes: 15
- Score To Win: 50
- disabled maps
- {
- Workshop Chamber
- Workshop Expanse
- Workshop Expanse Night
- Workshop Island
- Workshop Island Night
- }
- }
- General
- {
- Hero Limit: Off
- }
- }
- }
- variables
- {
- player:
- 0: Direction
- 1: Zoom
- }
- disabled rule("----- Made by Mitsiee. More at https://workshop.codes/third-person -----")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("Initialise")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- actions
- {
Set Player Variable(Event Player, Direction, 1);
Set Player Variable(Event Player, Zoom, -2.500);
- Event Player.Direction = 1;
- Event Player.Zoom = -2.500;
- }
- }
- rule("Set Third Person")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Alive(Event Player) == True;
And(Or(Compare(Hero Of(Event Player), ==, Hero(Widowmaker)), Compare(Hero Of(Event Player), ==, Hero(Ashe))), Is Button Held(
Event Player, Secondary Fire)) != True;
- ((Hero Of(Event Player) == Hero(Widowmaker) || Hero Of(Event Player) == Hero(Ashe)) && Is Button Held(Event Player,
- Secondary Fire)) != True;
- }
- actions
- {
Start Camera(Event Player, Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Add(World Vector Of(
Vector(Multiply(Player Variable(Event Player, Direction), Min(Divide(Player Variable(Event Player, Zoom), 2.500), -0.750)), 0,
0), Event Player, Rotation), Multiply(Facing Direction Of(Event Player), Player Variable(Event Player, Zoom)))), All Players(
All Teams), Event Player, False), Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Multiply(
Facing Direction Of(Event Player), 200)), All Players(All Teams), Event Player, False), 60);
disabled Start Camera(Event Player, Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Add(World Vector Of(
Vector(Player Variable(Event Player, Direction), 0, 0), Event Player, Rotation), Multiply(Facing Direction Of(Event Player),
Player Variable(Event Player, Zoom)))), All Players(All Teams), Event Player, False), Ray Cast Hit Position(Eye Position(
Event Player), Add(Eye Position(Event Player), Multiply(Facing Direction Of(Event Player), 200)), All Players(All Teams),
Event Player, False), 60);
- Start Camera(Event Player, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player) + World Vector Of(Vector(
- Event Player.Direction * Min(Event Player.Zoom / 2.500, -0.750), 0, 0), Event Player, Rotation) + Facing Direction Of(
- Event Player) * Event Player.Zoom, All Players(All Teams), Event Player, False), Ray Cast Hit Position(Eye Position(
- Event Player), Eye Position(Event Player) + Facing Direction Of(Event Player) * 200, All Players(All Teams), Event Player,
- False), 60);
- }
- }
- rule("Unset Third Person for specific conditions")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
And(Or(Compare(Hero Of(Event Player), ==, Hero(Widowmaker)), Compare(Hero Of(Event Player), ==, Hero(Ashe))), Is Button Held(
Event Player, Secondary Fire)) == True;
- ((Hero Of(Event Player) == Hero(Widowmaker) || Hero Of(Event Player) == Hero(Ashe)) && Is Button Held(Event Player,
- Secondary Fire)) == True;
- }
- actions
- {
- Stop Camera(Event Player);
- }
- }
- disabled rule("----- Controls -----")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("Pressing Interact")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Interact) == True;
- }
- actions
- {
If(Compare(Player Variable(Event Player, Direction), ==, -1));
Set Player Variable(Event Player, Direction, 1);
- If(Event Player.Direction == -1);
- Event Player.Direction = 1;
- Else;
Set Player Variable(Event Player, Direction, -1);
- Event Player.Direction = -1;
- End;
- }
- }
- rule("Zoom in")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Primary Fire) == True;
- Is Button Held(Event Player, Interact) == True;
- Is Button Held(Event Player, Secondary Fire) == False;
- }
- actions
- {
Skip If(Compare(Player Variable(Event Player, Zoom), >=, -1), 1);
Modify Player Variable(Event Player, Zoom, Add, 0.100);
- Skip If(Event Player.Zoom >= -1, 1);
- Event Player.Zoom += 0.100;
- Wait(0.050, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("Zoom out")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Secondary Fire) == True;
- Is Button Held(Event Player, Interact) == True;
- Is Button Held(Event Player, Primary Fire) == False;
- }
- actions
- {
Skip If(Compare(Player Variable(Event Player, Zoom), <=, -5), 1);
Modify Player Variable(Event Player, Zoom, Subtract, 0.100);
- Skip If(Event Player.Zoom <= -5, 1);
- Event Player.Zoom -= 0.100;
- Wait(0.050, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- disabled rule("----- UI -----")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("Instructions")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- actions
- {
Create HUD Text(Event Player, Null, Player Variable(Event Player, Zoom), Null, Left, 0, White, White, White, Visible To and String,
- Create HUD Text(Event Player, Null, Event Player.Zoom, Null, Left, 0, White, White, White, Visible To and String,
- Default Visibility);
Create HUD Text(Event Player, Null, Custom String("Current zoom level:", Null, Null, Null), Null, Left, 0, White, White, White,
- Create HUD Text(Event Player, Null, Custom String("Current zoom level:"), Null, Left, 0, White, White, White,
- Visible To and String, Default Visibility);
Create HUD Text(Event Player, Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
- Create HUD Text(Event Player, Null, Custom String(" "), Null, Left, 0, White, White, White, Visible To and String,
- Default Visibility);
- Create HUD Text(Event Player, Null, Custom String("Zoom out with [Interact] + [Secondary Fire]"), Null, Left, 0, White, White,
- White, Visible To and String, Default Visibility);
- Create HUD Text(Event Player, Null, Custom String("Zoom in with [Interact] + [Primary Fire]"), Null, Left, 0, White, White, White,
- Visible To and String, Default Visibility);
Create HUD Text(Event Player, Null, Custom String("Zoom out with [Interact] + [Secondary Fire]", Null, Null, Null), Null, Left, 0,
White, White, White, Visible To and String, Default Visibility);
Create HUD Text(Event Player, Null, Custom String("Zoom in with [Interact] + [Primary Fire]", Null, Null, Null), Null, Left, 0,
White, White, White, Visible To and String, Default Visibility);
Create HUD Text(Event Player, Null, Custom String("Swap the camera shoulder side with [Interact]", Null, Null, Null), Null, Left,
0, White, White, White, Visible To and String, Default Visibility);
- Create HUD Text(Event Player, Null, Custom String("Swap the camera shoulder side with [Interact]"), Null, Left, 0, White, White,
- White, Visible To and String, Default Visibility);
- }
- }