Back to home

Catmull-Rom Camera Tool

V7EYE
click to copy
This game is archived.
If you with to unarchive it, click the "restore" button in the options menu.

Category:
Training / Drills / Tools

Author:
Gecktendo

Rating:
0

Version:
1.1.0

Posted:
22 days ago

Last updated:
4 days ago

Tags:
catmull-rom spline camera path generation tool

Share this workshop!

Options

https://i.imgur.com/sicLxx9.mp4

Workshop Tool for creating a path that follows a chain of Catmull-Rom splines. Great for scripting a camera path along a smooth curve that passes through all the coordinates provided. The code has support for open or closed loops as well as customizable alpha, tension and time interval settings. This is a powerful camera tool that makes creating cinematic cutscenes a breeze.

While this supports up to 12 players, only the host can edit the camera path.

Calculations used: https://qroph.github.io/2018/07/30/smooth-paths-using-catmull-rom-splines.html

variables
{
	global:
		0: Quadratic_Calculations
		1: Camera_Interval
		2: State_Main
		3: State_Sub_Main
		4: Hold_Button
		5: Effect_Visibility
		6: Node_Selected
		7: Node_Distance
		8: Node_Position
		9: Node_Effect
		10: Node_Catcher
		11: Spline_Alpha
		12: Spline_Tension
		13: Spline_Type
		14: Camera_Type
		15: Camera_Autoplay
		16: Camera_On
		17: Camera_Time
		18: Player_Clipping
		19: Calculate_Spline
		20: P
		21: T
		22: M
		23: a
		24: b
		25: c
		26: d
		27: II
}

rule("Catmull-Rom Camera Tool V.1.0.0 - Coded by Gecktendo#1446")
{
	event
	{
		Ongoing - Global;
	}
}

disabled rule("Tool Setup")
{
	event
	{
		Ongoing - Global;
	}
}

rule("Global Variable Setup")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Set Global Variable(Quadratic_Calculations, Empty Array);
		Set Global Variable(Camera_Interval, 5);
		Set Global Variable(State_Main, 0);
		Set Global Variable(State_Sub_Main, Empty Array);
		Modify Global Variable(State_Sub_Main, Append To Array, 0);
		Modify Global Variable(State_Sub_Main, Append To Array, 0);
		Modify Global Variable(State_Sub_Main, Append To Array, 0);
		Modify Global Variable(State_Sub_Main, Append To Array, 0);
		Modify Global Variable(State_Sub_Main, Append To Array, 0);
		Set Global Variable(Hold_Button, Empty Array);
		Modify Global Variable(Hold_Button, Append To Array, False);
		Modify Global Variable(Hold_Button, Append To Array, False);
		Modify Global Variable(Hold_Button, Append To Array, False);
		Modify Global Variable(Hold_Button, Append To Array, False);
		Modify Global Variable(Hold_Button, Append To Array, False);
		Modify Global Variable(Hold_Button, Append To Array, False);
		Modify Global Variable(Hold_Button, Append To Array, False);
		Modify Global Variable(Hold_Button, Append To Array, False);
		Set Global Variable(Effect_Visibility, Empty Array);
		Set Global Variable(Node_Selected, Empty Array);
		Set Global Variable(Node_Distance, 5);
		Set Global Variable(Node_Position, Empty Array);
		Set Global Variable(Node_Effect, Empty Array);
		Set Global Variable(Node_Catcher, Empty Array);
		Set Global Variable(Spline_Alpha, 0);
		Set Global Variable(Spline_Tension, 0);
		Set Global Variable(Spline_Type, False);
		Set Global Variable(Camera_Type, 0);
		Set Global Variable(Camera_Autoplay, False);
		Set Global Variable(Camera_On, False);
		Set Global Variable(Camera_Time, 0);
		Set Global Variable(Player_Clipping, True);
		Set Global Variable(Calculate_Spline, False);
		Set Global Variable(P, Empty Array);
		Set Global Variable(T, Empty Array);
		Set Global Variable(M, Empty Array);
		Set Global Variable(a, Empty Array);
		Set Global Variable(b, Empty Array);
		Set Global Variable(c, Empty Array);
		Set Global Variable(d, Empty Array);
		Set Global Variable(II, 0);
	}
}

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

	actions
	{
		Set Primary Fire Enabled(Event Player, False);
		Set Secondary Fire Enabled(Event Player, False);
		Set Ability 1 Enabled(Event Player, False);
		Set Ability 2 Enabled(Event Player, False);
		Set Ultimate Ability Enabled(Event Player, False);
		Modify Global Variable(Effect_Visibility, Append To Array, Event Player);
		Set Status(Event Player, Null, Phased Out, 9999);
	}
}

rule("[Paste the Node_Position Variable Data Here]")
{
	event
	{
		Ongoing - Global;
	}
}

rule("Create The Pasted Nodes If They Exist")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Abort If(Compare(Global Variable(Node_Position), ==, Empty Array));
		Create Effect(Global Variable(Effect_Visibility), Sphere, White, Value In Array(Global Variable(Node_Position), Global Variable(
			II)), 0.200, Visible To);
		Set Global Variable At Index(Node_Effect, Global Variable(II), Last Created Entity);
		Wait(0.016, Ignore Condition);
		Modify Global Variable(II, Add, 1);
		Loop If(Or(Compare(Global Variable(II), <, Count Of(Global Variable(Node_Position))), Compare(Global Variable(II), <, Count Of(
			Global Variable(Node_Effect)))));
		Set Global Variable(II, 0);
	}
}

disabled rule("Tool Switcher")
{
	event
	{
		Ongoing - Global;
	}
}

rule("Interact: Switch Tool")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Interact) == True;
		Value In Array(Global Variable(State_Sub_Main), 0) != 1;
		Value In Array(Global Variable(Hold_Button), 5) == False;
		Or(Compare(Global Variable(Quadratic_Calculations), ==, 0), Compare(Global Variable(Quadratic_Calculations), !=, Empty Array))
			== False;
	}

	actions
	{
		Set Global Variable At Index(Hold_Button, 5, True);
		Set Global Variable(State_Main, Modulo(Add(Global Variable(State_Main), 1), 5));
	}
}

rule("Reset Button Held Flag")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is True For Any(Global Variable(Hold_Button), Compare(Current Array Element, ==, True)) == True;
	}

	actions
	{
		Skip If(Or(Is Button Held(Host Player, Primary Fire), Compare(Value In Array(Global Variable(Hold_Button), 0), ==, False)), 1);
		Set Global Variable At Index(Hold_Button, 0, False);
		Skip If(Or(Is Button Held(Host Player, Secondary Fire), Compare(Value In Array(Global Variable(Hold_Button), 1), ==, False)), 1);
		Set Global Variable At Index(Hold_Button, 1, False);
		Skip If(Or(Is Button Held(Host Player, Ability 1), Compare(Value In Array(Global Variable(Hold_Button), 2), ==, False)), 1);
		Set Global Variable At Index(Hold_Button, 2, False);
		Skip If(Or(Is Button Held(Host Player, Ability 2), Compare(Value In Array(Global Variable(Hold_Button), 3), ==, False)), 1);
		Set Global Variable At Index(Hold_Button, 3, False);
		Skip If(Or(Is Button Held(Host Player, Ultimate), Compare(Value In Array(Global Variable(Hold_Button), 4), ==, False)), 1);
		Set Global Variable At Index(Hold_Button, 4, False);
		Skip If(Or(Is Button Held(Host Player, Interact), Compare(Value In Array(Global Variable(Hold_Button), 5), ==, False)), 1);
		Set Global Variable At Index(Hold_Button, 5, False);
		Skip If(Or(Is Button Held(Host Player, Jump), Compare(Value In Array(Global Variable(Hold_Button), 6), ==, False)), 1);
		Set Global Variable At Index(Hold_Button, 6, False);
		Skip If(Or(Is Button Held(Host Player, Crouch), Compare(Value In Array(Global Variable(Hold_Button), 7), ==, False)), 1);
		Set Global Variable At Index(Hold_Button, 7, False);
		Wait(0.250, Ignore Condition);
		Loop If Condition Is True;
	}
}

disabled rule("Menu 0: Node Editor Tool")
{
	event
	{
		Ongoing - Global;
	}
}

rule("Left HUD: Node Editor Controls")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 0)), Null, Null, Custom String(
			"Node Editor Controls", Null, Null, Null), Left, 0, White, White, Orange, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 0), Compare(Value In Array(
			Global Variable(State_Sub_Main), 0), ==, 0))), Null, Custom String("Interact - Spline Editor Tool", Null, Null, Null), Null,
			Left, 1, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 0), Compare(Value In Array(
			Global Variable(State_Sub_Main), 0), ==, 0))), Null, Custom String("Primary - Create / Select Node", Null, Null, Null), Null,
			Left, 2, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 0), Compare(Value In Array(
			Global Variable(State_Sub_Main), 0), ==, 1))), Null, Custom String("Primary - Place Node at Cursor", Null, Null, Null), Null,
			Left, 1, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 0), Compare(Value In Array(
			Global Variable(State_Sub_Main), 0), ==, 1))), Null, Custom String("Secondary - Restore Original Placement", Null, Null, Null),
			Null, Left, 2, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 0), Compare(Value In Array(
			Global Variable(State_Sub_Main), 0), ==, 1))), Null, Custom String("Ability 1 - Increase Node Distance", Null, Null, Null),
			Null, Left, 3, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 0), Compare(Value In Array(
			Global Variable(State_Sub_Main), 0), ==, 1))), Null, Custom String("Ability 2 - Decrease Node Distance", Null, Null, Null),
			Null, Left, 4, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 0), Compare(Value In Array(
			Global Variable(State_Sub_Main), 0), ==, 1))), Null, Custom String("Ultimate - Zoom in on Selected Node", Null, Null, Null),
			Null, Left, 5, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 0), Compare(Value In Array(
			Global Variable(State_Sub_Main), 0), ==, 1))), Null, Custom String("Interact - Delete Selected Node", Null, Null, Null), Null,
			Left, 6, White, White, White, Visible To and String, Default Visibility);
	}
}

rule("Right HUD: Node Settings")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 0)), Null, Null, Custom String(
			"Node Settings", Null, Null, Null), Right, 0, White, White, Orange, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 0)), Null, Custom String(
			"Selected Node: {0}", Global Variable(Node_Selected), Null, Null), Null, Right, 1, White, White, White, Visible To and String,
			Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 0)), Null, Custom String(
			"Node Distance: {0}", Global Variable(Node_Distance), Null, Null), Null, Right, 2, White, White, White, Visible To and String,
			Default Visibility);
	}
}

rule("Effect: Selected Node")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Value In Array(Global Variable(State_Sub_Main), 0), ==,
			1)), Sphere, Orange, Ray Cast Hit Position(Eye Position(Host Player), Add(Eye Position(Host Player), Multiply(
			Facing Direction Of(Host Player), Global Variable(Node_Distance))), Empty Array, Empty Array, True), 0.200,
			Visible To Position and Radius);
	}
}

rule("Primary: Create / Select Node at Cursor")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Primary Fire) == True;
		Value In Array(Global Variable(Hold_Button), 0) == False;
		Global Variable(State_Main) == 0;
		Value In Array(Global Variable(State_Sub_Main), 0) == 0;
		Or(Compare(Global Variable(Quadratic_Calculations), ==, 0), Compare(Global Variable(Quadratic_Calculations), !=, Empty Array))
			== False;
	}

	actions
	{
		Set Global Variable At Index(Hold_Button, 0, True);
		Set Global Variable(Node_Catcher, Filtered Array(Global Variable(Node_Position), And(And(Compare(Distance Between(Vector(0, 0, 0),
			Subtract(Current Array Element, Add(Eye Position(Host Player), Multiply(Absolute Value(Dot Product(Subtract(
			Current Array Element, Eye Position(Host Player)), Facing Direction Of(Host Player))), Facing Direction Of(Host Player))))),
			<=, 0.200), Compare(Is In Line of Sight(Add(Eye Position(Host Player), Multiply(Absolute Value(Dot Product(Subtract(
			Current Array Element, Eye Position(Host Player)), Facing Direction Of(Host Player))), Facing Direction Of(Host Player))),
			Eye Position(Host Player), Barriers Do Not Block LOS), ==, True)), Compare(Distance Between(Add(Eye Position(Host Player),
			Multiply(Absolute Value(Dot Product(Subtract(Current Array Element, Eye Position(Host Player)), Facing Direction Of(
			Host Player))), Facing Direction Of(Host Player))), Eye Position(Host Player)), <=, 100))));
		Skip If(Compare(Global Variable(Node_Catcher), !=, Empty Array), 6);
		Modify Global Variable(Node_Position, Append To Array, Ray Cast Hit Position(Eye Position(Host Player), Add(Eye Position(
			Host Player), Multiply(Facing Direction Of(Host Player), 5)), Empty Array, Empty Array, True));
		Set Global Variable(Node_Selected, Subtract(Count Of(Global Variable(Node_Position)), 1));
		Create Effect(Global Variable(Effect_Visibility), Sphere, White, Value In Array(Global Variable(Node_Position), Global Variable(
			Node_Selected)), 0.200, Visible To);
		Set Global Variable At Index(Node_Effect, Subtract(Count Of(Global Variable(Node_Position)), 1), Last Created Entity);
		Play Effect(All Players(All Teams), Buff Explosion Sound, White, Value In Array(Global Variable(Node_Position), Global Variable(
			Node_Selected)), 30);
		Skip(1);
		Set Global Variable(Node_Selected, Index Of Array Value(Global Variable(Node_Position), First Of(Sorted Array(Global Variable(
			Node_Catcher), Distance Between(Eye Position(Host Player), Current Array Element)))));
		Set Global Variable(Node_Distance, Distance Between(Eye Position(Host Player), Value In Array(Global Variable(Node_Position),
			Global Variable(Node_Selected))));
		Destroy Effect(Value In Array(Global Variable(Node_Effect), Global Variable(Node_Selected)));
		Play Effect(All Players(All Teams), Good Explosion, Orange, Value In Array(Global Variable(Node_Position), Global Variable(
			Node_Selected)), 0.200);
		Set Global Variable At Index(State_Sub_Main, 0, 1);
		Set Global Variable(Calculate_Spline, True);
	}
}

rule("Primary: Place Selected Node at Cursor")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Primary Fire) == True;
		Value In Array(Global Variable(Hold_Button), 0) == False;
		Global Variable(State_Main) == 0;
		Value In Array(Global Variable(State_Sub_Main), 0) == 1;
	}

	actions
	{
		Set Global Variable At Index(Hold_Button, 0, True);
		Set Global Variable At Index(Node_Position, Global Variable(Node_Selected), Ray Cast Hit Position(Eye Position(Host Player), Add(
			Eye Position(Host Player), Multiply(Facing Direction Of(Host Player), Global Variable(Node_Distance))), Empty Array,
			Empty Array, True));
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(0, ==, 0)), Sphere, White, Value In Array(Global Variable(
			Node_Position), Global Variable(Node_Selected)), 0.200, Visible To);
		Set Global Variable At Index(Node_Effect, Global Variable(Node_Selected), Last Created Entity);
		Play Effect(All Players(All Teams), Good Explosion, White, Value In Array(Global Variable(Node_Position), Global Variable(
			Node_Selected)), 0.200);
		Set Global Variable At Index(State_Sub_Main, 0, 0);
	}
}

rule("Secondary: Cancel Node Placement")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Secondary Fire) == True;
		Global Variable(State_Main) == 0;
		Value In Array(Global Variable(State_Sub_Main), 0) == 1;
	}

	actions
	{
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(0, ==, 0)), Sphere, White, Value In Array(Global Variable(
			Node_Position), Global Variable(Node_Selected)), 0.200, Visible To);
		Set Global Variable At Index(Node_Effect, Global Variable(Node_Selected), Last Created Entity);
		Play Effect(All Players(All Teams), Good Explosion, White, Value In Array(Global Variable(Node_Position), Global Variable(
			Node_Selected)), 0.200);
		Set Global Variable At Index(State_Sub_Main, 0, 0);
	}
}

rule("Interact: Delete Selected Node")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Interact) == True;
		Value In Array(Global Variable(Hold_Button), 5) == False;
		Global Variable(State_Main) == 0;
		Value In Array(Global Variable(State_Sub_Main), 0) == 1;
	}

	actions
	{
		Set Global Variable At Index(Hold_Button, 5, True);
		Play Effect(All Players(All Teams), Debuff Impact Sound, White, Value In Array(Global Variable(Node_Position), Global Variable(
			Node_Selected)), 30);
		Destroy Effect(Value In Array(Global Variable(Node_Effect), Global Variable(Node_Selected)));
		Modify Global Variable(Node_Position, Remove From Array By Index, Global Variable(Node_Selected));
		Modify Global Variable(Node_Effect, Remove From Array By Index, Global Variable(Node_Selected));
		Set Global Variable At Index(State_Sub_Main, 0, 0);
		Set Global Variable(Calculate_Spline, True);
	}
}

rule("Ability 1: Increase Node Distance")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Ability 1) == True;
		Global Variable(State_Main) == 0;
		Value In Array(Global Variable(State_Sub_Main), 0) == 1;
		Global Variable(Node_Distance) < 100;
	}

	actions
	{
		Set Global Variable(Node_Distance, Add(Round To Integer(Global Variable(Node_Distance), Down), 1));
	}
}

rule("Ability 2: Decrease Node Distance")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Ability 2) == True;
		Global Variable(State_Main) == 0;
		Value In Array(Global Variable(State_Sub_Main), 0) == 1;
		Global Variable(Node_Distance) > 3;
	}

	actions
	{
		Set Global Variable(Node_Distance, Subtract(Round To Integer(Global Variable(Node_Distance), Up), 1));
	}
}

rule("Ultimate: Zoom In")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Ultimate) == True;
		Global Variable(State_Main) == 0;
		Value In Array(Global Variable(State_Sub_Main), 0) == 1;
	}

	actions
	{
		Start Camera(Host Player, Subtract(Ray Cast Hit Position(Eye Position(Host Player), Add(Eye Position(Host Player), Multiply(
			Facing Direction Of(Host Player), Global Variable(Node_Distance))), Empty Array, Empty Array, True), Multiply(
			Facing Direction Of(Host Player), 1)), Ray Cast Hit Position(Eye Position(Host Player), Add(Eye Position(Host Player),
			Multiply(Facing Direction Of(Host Player), Global Variable(Node_Distance))), Empty Array, Empty Array, True), 10);
	}
}

rule("Ultimate: Zoom Out")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Or(Compare(Is Button Held(Host Player, Ultimate), ==, False), Compare(Value In Array(Global Variable(State_Sub_Main), 0), ==, 0))
			== True;
		Global Variable(State_Main) == 0;
	}

	actions
	{
		Stop Camera(Host Player);
	}
}

disabled rule("Menu 1: Spline Editor Tool")
{
	event
	{
		Ongoing - Global;
	}
}

rule("Left HUD: Spline Editor Controls")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 1)), Null, Null, Custom String(
			"Spline Editor Controls", Null, Null, Null), Left, 0, White, White, Green, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 1)), Null, Custom String(
			"Interact - Camera Mode Tool", Null, Null, Null), Null, Left, 1, White, White, White, Visible To and String,
			Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 1)), Null, Custom String(
			"Ability 1 - Previous Parameter", Icon String(Arrow: Down), Null, Null), Null, Left, 2, White, White, White,
			Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 1)), Null, Custom String(
			"Ability 2 - Next Parameter", Null, Null, Null), Null, Left, 3, White, White, White, Visible To and String,
			Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 1)), Null, Custom String(
			"Primary - Decrease Parameter", Null, Null, Null), Null, Left, 4, White, White, White, Visible To and String,
			Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 1)), Null, Custom String(
			"Secondary - Increase Parameter", Null, Null, Null), Null, Left, 5, White, White, White, Visible To and String,
			Default Visibility);
	}
}

rule("Right HUD: Spline Settings")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 1)), Null, Null, Custom String(
			"Spline Settings", Null, Null, Null), Right, 0, White, White, Green, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 1), Compare(Value In Array(
			Global Variable(State_Sub_Main), 1), ==, 0))), Null, Custom String("Alpha: {0}", Global Variable(Spline_Alpha), Null, Null),
			Null, Right, 1, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 1), Compare(Value In Array(
			Global Variable(State_Sub_Main), 1), !=, 0))), Null, Custom String("Alpha: {0}", Global Variable(Spline_Alpha), Null, Null),
			Null, Right, 1, White, Green, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 1), Compare(Value In Array(
			Global Variable(State_Sub_Main), 1), ==, 1))), Null, Custom String("Tension: {0}", Global Variable(Spline_Tension), Null,
			Null), Null, Right, 2, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 1), Compare(Value In Array(
			Global Variable(State_Sub_Main), 1), !=, 1))), Null, Custom String("Tension: {0}", Global Variable(Spline_Tension), Null,
			Null), Null, Right, 2, White, Green, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 1), Compare(Value In Array(
			Global Variable(State_Sub_Main), 1), ==, 2))), Null, Custom String("Closed Loop Spline: {0}", Global Variable(Spline_Type),
			Null, Null), Null, Right, 3, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 1), Compare(Value In Array(
			Global Variable(State_Sub_Main), 1), !=, 2))), Null, Custom String("Closed Loop Spline: {0}", Global Variable(Spline_Type),
			Null, Null), Null, Right, 3, White, Green, White, Visible To and String, Default Visibility);
	}
}

rule("Ability 1: Previous Parameter")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Ability 1) == True;
		Global Variable(State_Main) == 1;
	}

	actions
	{
		Set Global Variable At Index(State_Sub_Main, 1, Modulo(Add(Subtract(Value In Array(Global Variable(State_Sub_Main), 1), 1), 3),
			3));
	}
}

rule("Ability 2: Next Parameter")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Ability 2) == True;
		Global Variable(State_Main) == 1;
	}

	actions
	{
		Set Global Variable At Index(State_Sub_Main, 1, Modulo(Add(Value In Array(Global Variable(State_Sub_Main), 1), 1), 3));
	}
}

rule("Primary: Decrease Parameter")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Primary Fire) == True;
		Global Variable(State_Main) == 1;
	}

	actions
	{
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 1), !=, 0), 1);
		Modify Global Variable(Spline_Alpha, Subtract, 0.100);
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 1), !=, 1), 1);
		Modify Global Variable(Spline_Tension, Subtract, 0.100);
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 1), !=, 2), 2);
		Skip If(Compare(Global Variable(Spline_Type), ==, False), 1);
		Set Global Variable(Spline_Type, False);
		Wait(0.150, Ignore Condition);
		Loop If Condition Is True;
		Set Global Variable(Calculate_Spline, True);
	}
}

rule("Secondary: Increase Parameter")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Secondary Fire) == True;
		Global Variable(State_Main) == 1;
	}

	actions
	{
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 1), !=, 0), 1);
		Modify Global Variable(Spline_Alpha, Add, 0.100);
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 1), !=, 1), 1);
		Modify Global Variable(Spline_Tension, Add, 0.100);
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 1), !=, 2), 2);
		Skip If(Compare(Global Variable(Spline_Type), ==, True), 1);
		Set Global Variable(Spline_Type, True);
		Wait(0.150, Ignore Condition);
		Loop If Condition Is True;
		Set Global Variable(Calculate_Spline, True);
	}
}

disabled rule("Menu 2: Camera Mode Tool")
{
	event
	{
		Ongoing - Global;
	}
}

rule("Left HUD: Camera Mode Controls")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 2)), Null, Null, Custom String(
			"Camera Mode Controls", Null, Null, Null), Left, 0, White, White, Blue, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 2)), Null, Custom String(
			"Interact - Player Settings Tool", Null, Null, Null), Null, Left, 1, White, White, White, Visible To and String,
			Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 2)), Null, Custom String(
			"Ability 1 - Previous Parameter", Icon String(Arrow: Down), Null, Null), Null, Left, 2, White, White, White,
			Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 2)), Null, Custom String(
			"Ability 2 - Next Parameter", Null, Null, Null), Null, Left, 3, White, White, White, Visible To and String,
			Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 2)), Null, Custom String(
			"Primary - Decrease Parameter", Null, Null, Null), Null, Left, 4, White, White, White, Visible To and String,
			Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 2)), Null, Custom String(
			"Secondary - Increase Parameter", Null, Null, Null), Null, Left, 5, White, White, White, Visible To and String,
			Default Visibility);
	}
}

rule("Right HUD: Camera Settings")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 2)), Null, Null, Custom String(
			"Camera Settings", Null, Null, Null), Right, 0, White, White, Blue, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 2), Compare(Value In Array(
			Global Variable(State_Sub_Main), 2), ==, 0))), Null, Custom String("Camera Type: {0}", Global Variable(Camera_Type), Null,
			Null), Null, Right, 1, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 2), Compare(Value In Array(
			Global Variable(State_Sub_Main), 2), !=, 0))), Null, Custom String("Camera Type: {0}", Global Variable(Camera_Type), Null,
			Null), Null, Right, 1, White, Blue, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 2), Compare(Value In Array(
			Global Variable(State_Sub_Main), 2), ==, 1))), Null, Custom String("Autoplay: {0}", Global Variable(Camera_Autoplay), Null,
			Null), Null, Right, 2, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 2), Compare(Value In Array(
			Global Variable(State_Sub_Main), 2), !=, 1))), Null, Custom String("Autoplay: {0}", Global Variable(Camera_Autoplay), Null,
			Null), Null, Right, 2, White, Blue, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 2), Compare(Value In Array(
			Global Variable(State_Sub_Main), 2), ==, 2))), Null, Custom String("Camera On: {0}", Global Variable(Camera_On), Null, Null),
			Null, Right, 3, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 2), Compare(Value In Array(
			Global Variable(State_Sub_Main), 2), !=, 2))), Null, Custom String("Camera On: {0}", Global Variable(Camera_On), Null, Null),
			Null, Right, 3, White, Blue, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 2), Compare(Value In Array(
			Global Variable(State_Sub_Main), 2), ==, 3))), Null, Custom String("Seconds / Interval: {0}", Global Variable(Camera_Interval),
			Null, Null), Null, Right, 4, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 2), Compare(Value In Array(
			Global Variable(State_Sub_Main), 2), !=, 3))), Null, Custom String("Seconds / Interval: {0}", Global Variable(Camera_Interval),
			Null, Null), Null, Right, 4, White, Blue, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 2), Compare(Value In Array(
			Global Variable(State_Sub_Main), 2), ==, 4))), Null, Custom String("Time: {0}", Global Variable(Camera_Time), Null, Null),
			Null, Right, 5, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 2), Compare(Value In Array(
			Global Variable(State_Sub_Main), 2), !=, 4))), Null, Custom String("Time: {0}", Global Variable(Camera_Time), Null, Null),
			Null, Right, 5, White, Blue, White, Visible To and String, Default Visibility);
	}
}

rule("Effect: Camera Sphere")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Global Variable(State_Main), ==, 2)), Sphere, Orange, Add(
			Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down)), Raise To Power(Modulo(Global Variable(Camera_Time), 1), 3)), Multiply(Value In Array(
			Global Variable(b), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)),
			Raise To Power(Modulo(Global Variable(Camera_Time), 1), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(
			Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Modulo(Global Variable(Camera_Time),
			1))), Value In Array(Global Variable(d), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down))), 0.100, Visible To Position and Radius);
	}
}

rule("Effect: Moving Dotted Line")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Global Variable(State_Main), ==, 2)), Sphere, Blue, Add(
			Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down)), Raise To Power(Divide(1, 16), 3)), Multiply(Value In Array(Global Variable(b),
			Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(
			Divide(1, 16), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Divide(1, 16))), Value In Array(Global Variable(d), Round To Integer(
			Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0.050,
			Visible To Position and Radius);
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Global Variable(State_Main), ==, 2)), Sphere, Blue, Add(
			Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down)), Raise To Power(Divide(2, 16), 3)), Multiply(Value In Array(Global Variable(b),
			Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(
			Divide(2, 16), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Divide(2, 16))), Value In Array(Global Variable(d), Round To Integer(
			Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0.050,
			Visible To Position and Radius);
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Global Variable(State_Main), ==, 2)), Sphere, Blue, Add(
			Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down)), Raise To Power(Divide(3, 16), 3)), Multiply(Value In Array(Global Variable(b),
			Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(
			Divide(3, 16), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Divide(3, 16))), Value In Array(Global Variable(d), Round To Integer(
			Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0.050,
			Visible To Position and Radius);
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Global Variable(State_Main), ==, 2)), Sphere, Sky Blue,
			Add(Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(
			Count Of(Global Variable(P)), 3)), Down)), Raise To Power(Divide(4, 16), 3)), Multiply(Value In Array(Global Variable(b),
			Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(
			Divide(4, 16), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Divide(4, 16))), Value In Array(Global Variable(d), Round To Integer(
			Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0.050,
			Visible To Position and Radius);
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Global Variable(State_Main), ==, 2)), Sphere, Blue, Add(
			Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down)), Raise To Power(Divide(5, 16), 3)), Multiply(Value In Array(Global Variable(b),
			Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(
			Divide(5, 16), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Divide(5, 16))), Value In Array(Global Variable(d), Round To Integer(
			Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0.050,
			Visible To Position and Radius);
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Global Variable(State_Main), ==, 2)), Sphere, Blue, Add(
			Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down)), Raise To Power(Divide(6, 16), 3)), Multiply(Value In Array(Global Variable(b),
			Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(
			Divide(6, 16), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Divide(6, 16))), Value In Array(Global Variable(d), Round To Integer(
			Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0.050,
			Visible To Position and Radius);
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Global Variable(State_Main), ==, 2)), Sphere, Blue, Add(
			Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down)), Raise To Power(Divide(7, 16), 3)), Multiply(Value In Array(Global Variable(b),
			Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(
			Divide(7, 16), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Divide(7, 16))), Value In Array(Global Variable(d), Round To Integer(
			Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0.050,
			Visible To Position and Radius);
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Global Variable(State_Main), ==, 2)), Sphere, Sky Blue,
			Add(Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(
			Count Of(Global Variable(P)), 3)), Down)), Raise To Power(Divide(8, 16), 3)), Multiply(Value In Array(Global Variable(b),
			Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(
			Divide(8, 16), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Divide(8, 16))), Value In Array(Global Variable(d), Round To Integer(
			Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0.050,
			Visible To Position and Radius);
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Global Variable(State_Main), ==, 2)), Sphere, Blue, Add(
			Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down)), Raise To Power(Divide(9, 16), 3)), Multiply(Value In Array(Global Variable(b),
			Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(
			Divide(9, 16), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Divide(9, 16))), Value In Array(Global Variable(d), Round To Integer(
			Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0.050,
			Visible To Position and Radius);
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Global Variable(State_Main), ==, 2)), Sphere, Blue, Add(
			Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down)), Raise To Power(Divide(10, 16), 3)), Multiply(Value In Array(Global Variable(b),
			Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(
			Divide(10, 16), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Divide(10, 16))), Value In Array(Global Variable(d), Round To Integer(
			Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0.050,
			Visible To Position and Radius);
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Global Variable(State_Main), ==, 2)), Sphere, Blue, Add(
			Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down)), Raise To Power(Divide(11, 16), 3)), Multiply(Value In Array(Global Variable(b),
			Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(
			Divide(11, 16), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Divide(11, 16))), Value In Array(Global Variable(d), Round To Integer(
			Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0.050,
			Visible To Position and Radius);
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Global Variable(State_Main), ==, 2)), Sphere, Sky Blue,
			Add(Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(
			Count Of(Global Variable(P)), 3)), Down)), Raise To Power(Divide(12, 16), 3)), Multiply(Value In Array(Global Variable(b),
			Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(
			Divide(12, 16), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Divide(12, 16))), Value In Array(Global Variable(d), Round To Integer(
			Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0.050,
			Visible To Position and Radius);
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Global Variable(State_Main), ==, 2)), Sphere, Blue, Add(
			Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down)), Raise To Power(Divide(13, 16), 3)), Multiply(Value In Array(Global Variable(b),
			Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(
			Divide(13, 16), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Divide(13, 16))), Value In Array(Global Variable(d), Round To Integer(
			Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0.050,
			Visible To Position and Radius);
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Global Variable(State_Main), ==, 2)), Sphere, Blue, Add(
			Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down)), Raise To Power(Divide(14, 16), 3)), Multiply(Value In Array(Global Variable(b),
			Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(
			Divide(14, 16), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Divide(14, 16))), Value In Array(Global Variable(d), Round To Integer(
			Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0.050,
			Visible To Position and Radius);
		Create Effect(Filtered Array(Global Variable(Effect_Visibility), Compare(Global Variable(State_Main), ==, 2)), Sphere, Blue, Add(
			Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down)), Raise To Power(Divide(15, 16), 3)), Multiply(Value In Array(Global Variable(b),
			Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(
			Divide(15, 16), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Divide(15, 16))), Value In Array(Global Variable(d), Round To Integer(
			Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0.050,
			Visible To Position and Radius);
	}
}

rule("Ability 1: Previous Parameter")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Ability 1) == True;
		Global Variable(State_Main) == 2;
	}

	actions
	{
		Set Global Variable At Index(State_Sub_Main, 2, Modulo(Add(Subtract(Value In Array(Global Variable(State_Sub_Main), 2), 1), 5),
			5));
	}
}

rule("Ability 2: Next Parameter")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Ability 2) == True;
		Global Variable(State_Main) == 2;
	}

	actions
	{
		Set Global Variable At Index(State_Sub_Main, 2, Modulo(Add(Value In Array(Global Variable(State_Sub_Main), 2), 1), 5));
	}
}

rule("Primary: Decrease Parameter")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Primary Fire) == True;
		Global Variable(State_Main) == 2;
	}

	actions
	{
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 2), !=, 0), 2);
		Skip If(Compare(Global Variable(Camera_Type), <=, 0), 1);
		Modify Global Variable(Camera_Type, Subtract, 1);
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 2), !=, 1), 2);
		Skip If(Compare(Global Variable(Camera_Autoplay), ==, False), 1);
		Set Global Variable(Camera_Autoplay, False);
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 2), !=, 2), 2);
		Skip If(Compare(Global Variable(Camera_On), ==, False), 1);
		Set Global Variable(Camera_On, False);
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 2), !=, 3), 2);
		Skip If(Compare(Global Variable(Camera_Interval), <, 0.200), 1);
		Modify Global Variable(Camera_Interval, Subtract, 0.100);
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 2), !=, 4), 1);
		Set Global Variable(Camera_Time, Modulo(Add(Divide(Subtract(Round To Integer(Multiply(Global Variable(Camera_Time), 32), Up), 1),
			32), Subtract(Count Of(Global Variable(P)), 3)), Subtract(Count Of(Global Variable(P)), 3)));
		Wait(0.150, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Secondary: Increase Parameter")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Secondary Fire) == True;
		Global Variable(State_Main) == 2;
	}

	actions
	{
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 2), !=, 0), 2);
		Skip If(Compare(Global Variable(Camera_Type), >=, 3), 1);
		Modify Global Variable(Camera_Type, Add, 1);
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 2), !=, 1), 2);
		Skip If(Compare(Global Variable(Camera_Autoplay), ==, True), 1);
		Set Global Variable(Camera_Autoplay, True);
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 2), !=, 2), 2);
		Skip If(Compare(Global Variable(Camera_On), ==, True), 1);
		Set Global Variable(Camera_On, True);
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 2), !=, 3), 1);
		Modify Global Variable(Camera_Interval, Add, 0.100);
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 2), !=, 4), 1);
		Set Global Variable(Camera_Time, Modulo(Divide(Add(Round To Integer(Multiply(Global Variable(Camera_Time), 32), Down), 1), 32),
			Subtract(Count Of(Global Variable(P)), 3)));
		Wait(0.150, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Spline Chain Calculation")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global Variable(Calculate_Spline) == True;
		Global Variable(State_Main) == 2;
	}

	actions
	{
		Skip If(Compare(Global Variable(II), !=, 0), 8);
		Set Global Variable(a, 0);
		Set Global Variable(b, 0);
		Set Global Variable(c, 0);
		Set Global Variable(d, 0);
		Skip If(Compare(Global Variable(Spline_Type), ==, True), 1);
		Set Global Variable(P, Append To Array(Append To Array(First Of(Global Variable(Node_Position)), Global Variable(Node_Position)),
			Last Of(Global Variable(Node_Position))));
		Skip If(Compare(Global Variable(Spline_Type), ==, False), 1);
		Set Global Variable(P, Append To Array(Append To Array(Last Of(Global Variable(Node_Position)), Global Variable(Node_Position)),
			Array Slice(Global Variable(Node_Position), 0, 2)));
		Set Global Variable At Index(T, 0, Raise To Power(Distance Between(Value In Array(Global Variable(P), Global Variable(II)),
			Value In Array(Global Variable(P), Add(Global Variable(II), 1))), Global Variable(Spline_Alpha)));
		Set Global Variable At Index(T, 1, Raise To Power(Distance Between(Value In Array(Global Variable(P), Add(Global Variable(II), 1)),
			Value In Array(Global Variable(P), Add(Global Variable(II), 2))), Global Variable(Spline_Alpha)));
		Set Global Variable At Index(T, 2, Raise To Power(Distance Between(Value In Array(Global Variable(P), Add(Global Variable(II), 2)),
			Value In Array(Global Variable(P), Add(Global Variable(II), 3))), Global Variable(Spline_Alpha)));
		Set Global Variable At Index(M, 0, Multiply(Subtract(1, Global Variable(Spline_Tension)), Add(Subtract(Value In Array(
			Global Variable(P), Add(Global Variable(II), 2)), Value In Array(Global Variable(P), Add(Global Variable(II), 1))), Multiply(
			Value In Array(Global Variable(T), 1), Subtract(Divide(Subtract(Value In Array(Global Variable(P), Add(Global Variable(II),
			1)), Value In Array(Global Variable(P), Add(Global Variable(II), 0))), Value In Array(Global Variable(T), 0)), Divide(Subtract(
			Value In Array(Global Variable(P), Add(Global Variable(II), 2)), Value In Array(Global Variable(P), Add(Global Variable(II),
			0))), Add(Value In Array(Global Variable(T), 0), Value In Array(Global Variable(T), 1))))))));
		Set Global Variable At Index(M, 1, Multiply(Subtract(1, Global Variable(Spline_Tension)), Add(Subtract(Value In Array(
			Global Variable(P), Add(Global Variable(II), 2)), Value In Array(Global Variable(P), Add(Global Variable(II), 1))), Multiply(
			Value In Array(Global Variable(T), 1), Subtract(Divide(Subtract(Value In Array(Global Variable(P), Add(Global Variable(II),
			3)), Value In Array(Global Variable(P), Add(Global Variable(II), 2))), Value In Array(Global Variable(T), 2)), Divide(Subtract(
			Value In Array(Global Variable(P), Add(Global Variable(II), 3)), Value In Array(Global Variable(P), Add(Global Variable(II),
			1))), Add(Value In Array(Global Variable(T), 1), Value In Array(Global Variable(T), 2))))))));
		Set Global Variable At Index(a, Global Variable(II), Add(Add(Multiply(2, Subtract(Value In Array(Global Variable(P), Add(
			Global Variable(II), 1)), Value In Array(Global Variable(P), Add(Global Variable(II), 2)))), Value In Array(Global Variable(M),
			0)), Value In Array(Global Variable(M), 1)));
		Set Global Variable At Index(b, Global Variable(II), Subtract(Subtract(Multiply(-3.000, Subtract(Value In Array(Global Variable(P),
			Add(Global Variable(II), 1)), Value In Array(Global Variable(P), Add(Global Variable(II), 2)))), Multiply(2, Value In Array(
			Global Variable(M), 0))), Value In Array(Global Variable(M), 1)));
		Set Global Variable At Index(c, Global Variable(II), Value In Array(Global Variable(M), 0));
		Set Global Variable At Index(d, Global Variable(II), Value In Array(Global Variable(P), Add(Global Variable(II), 1)));
		Wait(0.016, Ignore Condition);
		Modify Global Variable(II, Add, 1);
		Loop If(Compare(Global Variable(II), <=, Subtract(Count Of(Global Variable(P)), 4)));
		Set Global Variable(II, 0);
		Set Global Variable(Calculate_Spline, False);
	}
}

rule("Camera 0: Forward Camera")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global Variable(Camera_On) == True;
		Global Variable(Camera_Type) == 0;
		Count Of(Global Variable(P)) >= 4;
	}

	actions
	{
		Set Global Variable(Effect_Visibility, Empty Array);
		Start Camera(Event Player, Add(Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(
			Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(Modulo(Global Variable(Camera_Time), 1), 3)),
			Multiply(Value In Array(Global Variable(b), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down)), Raise To Power(Modulo(Global Variable(Camera_Time), 1), 2))), Multiply(Value In Array(
			Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)),
			Modulo(Global Variable(Camera_Time), 1))), Value In Array(Global Variable(d), Round To Integer(Modulo(Global Variable(
			Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), Add(Add(Add(Multiply(Value In Array(Global Variable(a),
			Round To Integer(Modulo(Add(Global Variable(Camera_Time), 0.001), Subtract(Count Of(Global Variable(P)), 3)), Down)),
			Raise To Power(Modulo(Add(Global Variable(Camera_Time), 0.001), 1), 3)), Multiply(Value In Array(Global Variable(b),
			Round To Integer(Modulo(Add(Global Variable(Camera_Time), 0.001), Subtract(Count Of(Global Variable(P)), 3)), Down)),
			Raise To Power(Modulo(Add(Global Variable(Camera_Time), 0.001), 1), 2))), Multiply(Value In Array(Global Variable(c),
			Round To Integer(Modulo(Add(Global Variable(Camera_Time), 0.001), Subtract(Count Of(Global Variable(P)), 3)), Down)), Modulo(
			Add(Global Variable(Camera_Time), 0.001), 1))), Value In Array(Global Variable(d), Round To Integer(Modulo(Add(Global Variable(
			Camera_Time), 0.001), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0);
	}
}

rule("Camera 1: Reverse Camera")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global Variable(Camera_On) == True;
		Global Variable(Camera_Type) == 1;
		Count Of(Global Variable(P)) >= 4;
	}

	actions
	{
		Set Global Variable(Effect_Visibility, Empty Array);
		Start Camera(Event Player, Add(Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Add(Global Variable(
			Camera_Time), 0.001), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(Modulo(Add(Global Variable(
			Camera_Time), 0.001), 1), 3)), Multiply(Value In Array(Global Variable(b), Round To Integer(Modulo(Add(Global Variable(
			Camera_Time), 0.001), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(Modulo(Add(Global Variable(
			Camera_Time), 0.001), 1), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Add(Global Variable(
			Camera_Time), 0.001), Subtract(Count Of(Global Variable(P)), 3)), Down)), Modulo(Add(Global Variable(Camera_Time), 0.001),
			1))), Value In Array(Global Variable(d), Round To Integer(Modulo(Add(Global Variable(Camera_Time), 0.001), Subtract(Count Of(
			Global Variable(P)), 3)), Down))), Add(Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(
			Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(Modulo(Global Variable(
			Camera_Time), 1), 3)), Multiply(Value In Array(Global Variable(b), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(Modulo(Global Variable(Camera_Time), 1), 2))), Multiply(
			Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)),
			3)), Down)), Modulo(Global Variable(Camera_Time), 1))), Value In Array(Global Variable(d), Round To Integer(Modulo(
			Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), 0);
	}
}

rule("Camera 2: Player-Centered Camera")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global Variable(Camera_On) == True;
		Global Variable(Camera_Type) == 2;
		Count Of(Global Variable(P)) >= 4;
	}

	actions
	{
		Set Global Variable(Effect_Visibility, Empty Array);
		Start Camera(Event Player, Add(Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(
			Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(Modulo(Global Variable(Camera_Time), 1), 3)),
			Multiply(Value In Array(Global Variable(b), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down)), Raise To Power(Modulo(Global Variable(Camera_Time), 1), 2))), Multiply(Value In Array(
			Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)),
			Modulo(Global Variable(Camera_Time), 1))), Value In Array(Global Variable(d), Round To Integer(Modulo(Global Variable(
			Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), Eye Position(Event Player), 0);
	}
}

rule("Camera 3: Player-Controlled Camera")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global Variable(Camera_On) == True;
		Global Variable(Camera_Type) == 3;
		Count Of(Global Variable(P)) >= 4;
	}

	actions
	{
		Set Global Variable(Effect_Visibility, Empty Array);
		Start Camera(Event Player, Add(Add(Add(Multiply(Value In Array(Global Variable(a), Round To Integer(Modulo(Global Variable(
			Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(Modulo(Global Variable(Camera_Time), 1), 3)),
			Multiply(Value In Array(Global Variable(b), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(
			Global Variable(P)), 3)), Down)), Raise To Power(Modulo(Global Variable(Camera_Time), 1), 2))), Multiply(Value In Array(
			Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)),
			Modulo(Global Variable(Camera_Time), 1))), Value In Array(Global Variable(d), Round To Integer(Modulo(Global Variable(
			Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))), Add(Add(Add(Add(Multiply(Value In Array(Global Variable(a),
			Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(
			Modulo(Global Variable(Camera_Time), 1), 3)), Multiply(Value In Array(Global Variable(b), Round To Integer(Modulo(
			Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down)), Raise To Power(Modulo(Global Variable(
			Camera_Time), 1), 2))), Multiply(Value In Array(Global Variable(c), Round To Integer(Modulo(Global Variable(Camera_Time),
			Subtract(Count Of(Global Variable(P)), 3)), Down)), Modulo(Global Variable(Camera_Time), 1))), Value In Array(Global Variable(
			d), Round To Integer(Modulo(Global Variable(Camera_Time), Subtract(Count Of(Global Variable(P)), 3)), Down))),
			Facing Direction Of(Event Player)), 0);
	}
}

rule("Stop Camera Mode")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global Variable(Camera_On) == False;
	}

	actions
	{
		Set Global Variable(Effect_Visibility, All Players(All Teams));
		Stop Camera(All Players(All Teams));
	}
}

rule("Reset Time Variable When Chase Variable Over Time Ends")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global Variable(Camera_Autoplay) == True;
		Compare(Global Variable(Camera_Time), ==, Subtract(Count Of(Global Variable(P)), 3)) == True;
		Count Of(Global Variable(P)) >= 4;
	}

	actions
	{
		Set Global Variable(Camera_Time, 0);
		Chase Global Variable At Rate(Camera_Time, Subtract(Count Of(Global Variable(P)), 3), Divide(1, Global Variable(Camera_Interval)),
			Destination and Rate);
	}
}

rule("Start Camera Autoplay")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global Variable(Camera_Autoplay) == True;
		Count Of(Global Variable(P)) >= 4;
	}

	actions
	{
		Chase Global Variable At Rate(Camera_Time, Subtract(Count Of(Global Variable(P)), 3), Divide(1, Global Variable(Camera_Interval)),
			Destination and Rate);
	}
}

rule("Stop Camera Autoplay")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global Variable(Camera_Autoplay) == False;
		Count Of(Global Variable(P)) >= 4;
	}

	actions
	{
		Stop Chasing Global Variable(Camera_Time);
	}
}

rule("Stop Camera After Switching Tools")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global Variable(State_Main) != 2;
	}

	actions
	{
		Set Global Variable(Camera_Autoplay, False);
		Set Global Variable(Camera_On, False);
	}
}

disabled rule("Menu 3: Player Settings Tool")
{
	event
	{
		Ongoing - Global;
	}
}

rule("Left HUD: Player Settings Controls")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 3)), Null, Null, Custom String(
			"Player Settings Controls", Null, Null, Null), Left, 0, White, White, Purple, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 3)), Null, Custom String(
			"Interact - Variable Exporter Tool", Null, Null, Null), Null, Left, 1, White, White, White, Visible To and String,
			Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 3)), Null, Custom String(
			"Ability 1 - Previous Parameter", Icon String(Arrow: Down), Null, Null), Null, Left, 2, White, White, White,
			Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 3)), Null, Custom String(
			"Ability 2 - Next Parameter", Null, Null, Null), Null, Left, 3, White, White, White, Visible To and String,
			Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 3)), Null, Custom String(
			"Primary - Decrease Parameter", Null, Null, Null), Null, Left, 4, White, White, White, Visible To and String,
			Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 3)), Null, Custom String(
			"Secondary - Increase Parameter", Null, Null, Null), Null, Left, 5, White, White, White, Visible To and String,
			Default Visibility);
	}
}

rule("Right HUD: Player Settings")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 3)), Null, Null, Custom String(
			"Player Settings", Null, Null, Null), Right, 0, White, White, Purple, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 3), Compare(Value In Array(
			Global Variable(State_Sub_Main), 3), ==, 0))), Null, Custom String("Wall Clipping: {0}", Global Variable(Player_Clipping),
			Null, Null), Null, Right, 1, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), And(Compare(Global Variable(State_Main), ==, 3), Compare(Value In Array(
			Global Variable(State_Sub_Main), 3), !=, 0))), Null, Custom String("Wall Clipping: {0}", Global Variable(Player_Clipping),
			Null, Null), Null, Right, 1, White, Purple, White, Visible To and String, Default Visibility);
	}
}

rule("Ability 1: Previous Parameter")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Ability 1) == True;
		Global Variable(State_Main) == 3;
	}

	actions
	{
		Set Global Variable At Index(State_Sub_Main, 3, Modulo(Add(Subtract(Value In Array(Global Variable(State_Sub_Main), 3), 1), 1),
			1));
	}
}

rule("Ability 2: Next Parameter")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Ability 2) == True;
		Global Variable(State_Main) == 3;
	}

	actions
	{
		Set Global Variable At Index(State_Sub_Main, 3, Modulo(Add(Value In Array(Global Variable(State_Sub_Main), 3), 1), 1));
	}
}

rule("Primary: Decrease Parameter")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Primary Fire) == True;
		Global Variable(State_Main) == 3;
	}

	actions
	{
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 3), !=, 0), 2);
		Skip If(Compare(Global Variable(Player_Clipping), ==, False), 1);
		Set Global Variable(Player_Clipping, False);
		Wait(0.150, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Secondary: Increase Parameter")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Secondary Fire) == True;
		Global Variable(State_Main) == 3;
	}

	actions
	{
		Skip If(Compare(Value In Array(Global Variable(State_Sub_Main), 3), !=, 0), 2);
		Skip If(Compare(Global Variable(Player_Clipping), ==, True), 1);
		Set Global Variable(Player_Clipping, True);
		Wait(0.150, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Auto Clip Through Walls")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global Variable(Player_Clipping) == False;
		Is Moving(Event Player) == True;
		Distance Between(Eye Position(Event Player), Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player),
			Multiply(Facing Direction Of(Event Player), 10)), Empty Array, Empty Array, False)) <= Divide(Horizontal Speed Of(
			Event Player), 4);
		Global Variable(Quadratic_Calculations) == Empty Array;
	}

	actions
	{
		Teleport(Event Player, World Vector Of(Vector(0, 0, Divide(Horizontal Speed Of(Event Player), 2)), Event Player,
			Rotation And Translation));
		Wait(0.500, Ignore Condition);
		Loop If Condition Is True;
	}
}

disabled rule("Menu 4: Variable Exporter Tool")
{
	event
	{
		Ongoing - Global;
	}
}

rule("Left HUD: Variable Exporter Controls")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 4)), Null, Null, Custom String(
			"Variable Exporter Controls", Null, Null, Null), Left, 0, White, White, Red, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 4)), Null, Custom String(
			"Interact - Node Editor Tool", Null, Null, Null), Null, Left, 1, White, White, White, Visible To and String,
			Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 4)), Null, Custom String(
			"Primary   Secondary   Ability 1 - Export Node Coordinates", Null, Null, Null), Null, Left, 2, White, White, White,
			Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 4)), Null, Custom String(
			"Primary   Secondary   Ability 2 - Export Quadratic Values", Icon String(Arrow: Down), Null, Null), Null, Left, 3, White,
			White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(State_Main), ==, 4)), Null, Custom String(
			"Notice: Exporting Variables is an Irreversable Process!", Icon String(Arrow: Down), Null, Null), Null, Left, 4, White, Yellow,
			White, Visible To and String, Default Visibility);
	}
}

rule("Primary   Secondary   Ability 1: Export Node Coordinates")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Primary Fire) == True;
		Is Button Held(Host Player, Secondary Fire) == True;
		Is Button Held(Host Player, Ability 1) == True;
		Global Variable(State_Main) == 4;
	}

	actions
	{
		Set Global Variable(Quadratic_Calculations, 0);
		Set Global Variable(Camera_Time, 0);
		Set Global Variable(State_Main, 0);
		Set Global Variable(State_Sub_Main, 0);
		Set Global Variable(Hold_Button, 0);
		Set Global Variable(Effect_Visibility, 0);
		Set Global Variable(Node_Selected, 0);
		Set Global Variable(Node_Distance, 0);
		Set Global Variable(Node_Effect, 0);
		Set Global Variable(Node_Catcher, 0);
		Set Global Variable(Spline_Alpha, 0);
		Set Global Variable(Spline_Tension, 0);
		Set Global Variable(Spline_Type, 0);
		Set Global Variable(Camera_Type, 0);
		Set Global Variable(Camera_Autoplay, 0);
		Set Global Variable(Camera_On, 0);
		Set Global Variable(Camera_Time, 0);
		Set Global Variable(Player_Clipping, 0);
		Set Global Variable(Calculate_Spline, 0);
		Set Global Variable(P, 0);
		Set Global Variable(T, 0);
		Set Global Variable(M, 0);
		Set Global Variable(a, 0);
		Set Global Variable(b, 0);
		Set Global Variable(c, 0);
		Set Global Variable(d, 0);
		Set Global Variable(II, 0);
		Big Message(All Players(All Teams), Custom String("Nodes Exported", Null, Null, Null));
	}
}

rule("Primary   Secondary   Ability 2: Export Quadratic Values")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Button Held(Host Player, Primary Fire) == True;
		Is Button Held(Host Player, Secondary Fire) == True;
		Is Button Held(Host Player, Ability 2) == True;
		Global Variable(State_Main) == 4;
	}

	actions
	{
		Modify Global Variable(Quadratic_Calculations, Append To Array, Value In Array(Global Variable(a), 0));
		Modify Global Variable(a, Remove From Array By Index, 0);
		Modify Global Variable(Quadratic_Calculations, Append To Array, Value In Array(Global Variable(b), 0));
		Modify Global Variable(b, Remove From Array By Index, 0);
		Modify Global Variable(Quadratic_Calculations, Append To Array, Value In Array(Global Variable(c), 0));
		Modify Global Variable(c, Remove From Array By Index, 0);
		Modify Global Variable(Quadratic_Calculations, Append To Array, Value In Array(Global Variable(d), 0));
		Modify Global Variable(d, Remove From Array By Index, 0);
		Wait(0.016, Ignore Condition);
		Loop If(Compare(Global Variable(a), !=, Empty Array));
		Set Global Variable(State_Main, 0);
		Set Global Variable(State_Sub_Main, 0);
		Set Global Variable(Hold_Button, 0);
		Set Global Variable(Effect_Visibility, 0);
		Set Global Variable(Node_Selected, 0);
		Set Global Variable(Node_Distance, 0);
		Set Global Variable(Node_Position, 0);
		Set Global Variable(Node_Effect, 0);
		Set Global Variable(Node_Catcher, 0);
		Set Global Variable(Spline_Alpha, 0);
		Set Global Variable(Spline_Tension, 0);
		Set Global Variable(Spline_Type, 0);
		Set Global Variable(Camera_Type, 0);
		Set Global Variable(Camera_Autoplay, 0);
		Set Global Variable(Camera_On, 0);
		Set Global Variable(Camera_Time, 0);
		Set Global Variable(Player_Clipping, 0);
		Set Global Variable(Calculate_Spline, 0);
		Set Global Variable(P, 0);
		Set Global Variable(T, 0);
		Set Global Variable(M, 0);
		Set Global Variable(a, 0);
		Set Global Variable(b, 0);
		Set Global Variable(c, 0);
		Set Global Variable(d, 0);
		Set Global Variable(II, 0);
		Big Message(All Players(All Teams), Custom String("Quadratic Values Exported", Null, Null, Null));
	}
}

rule("Exporting Variables Message")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Or(Compare(Global Variable(Quadratic_Calculations), ==, 0), Compare(Global Variable(Quadratic_Calculations), !=, Empty Array))
			== True;
	}

	actions
	{
		Small Message(All Players(All Teams), Custom String("Coordinates have been prepared for exporting", Null, Null, Null));
		Wait(3, Abort When False);
		Small Message(All Players(All Teams), Custom String("You can copy your variables using the Workshop Inspector", Null, Null, Null));
		Wait(10, Abort When False);
		Loop If Condition Is True;
	}
}

Changelog

4 days ago 1.1.0

  • Changed how nodes are calculated. Now you only need a minimum of 2 nodes to make a spline.
  • Miscellaneous adjustments to how some things are calculated.

V7EYE
click to copy
5 days ago 1.0.0

  • Overhauled the menu system to allow for easier updating in the future.
  • Reduced the number of spline calculations to a single calculation that occurs when the player has selected the camera tool.
  • Reworked the Node Editing Tool by adding a zoom feature so you can more easily see where you are placing your selected node when it is far away.
  • Miscellaneous fixes across every section of the code.

XMQ47
click to copy
18 days ago 0.8.0

  • Added dotted line on the selected node so the player can visualize the curve easier.
  • Rewrote the spline calculations to reduce kinks at nodes.
  • There is now a companion program: "Basic Camera". Paste your exported variables to this program to slim the camera path to only three variables for integration into your game modes. You can find the camera program on my workshop page.

Note: This current version is starting to get resource intensive because my code automatically calculates the curves frequently. This is especially bad for long spline chains and might cause the server to close unexpectedly. For now, just be patient when you select nodes. I will be reworking this code so that you have to manually update the curve after your changes have been made instead of automatically updating the spline for every change. This should reduce server load when complete.

4QZ7K
click to copy
19 days ago 0.7.0

  • Added the ability for the host player to create, move and delete nodes. The host must have the spline in line mode to edit the nodes.
  • Added a NoClip Option so players can pass through walls.
  • Added an option to change the selected node distance from the player for ease of manipulating points.
  • Added an option to export the P0 variable so it can be pasted back into the workshop code as a quick save setting.
  • Pressing the ultimate button now toggles camera mode instead of requiring the user to hold the button.

2MKCJ
click to copy
19 days ago 0.6.0

  • Reworked the user controls. To adjust parameters, user must hold the Interact button and can select from the list of variables by using primary or secondary fire. While holding Interact, the user can increase or decrease the variable values using ability 1 or ability 2.
  • Added an export option which can be enabled by pressing Crouch + Interact + Ultimate. This is irreversible and is meant to be the final step in exporting data. This will be used to transfer variable settings to a camera tool I will be developing soon.
  • Added two more cameras. Camera 0: Follows the path of the spline, Camera 1: Follows the path of the spline in reverse, Camera 2: Focuses on Host Player, Camera 3: Allows Host to freely look around.

ZJBJV
click to copy
20 days ago 0.5.0

  • Added a camera mode. User can now toggle between forward or reverse camera by pressing the ultimate button.

K50RT
click to copy
20 days ago 0.4.0

Changed how Time is calculated, which fixed a problem that caused a value of (0,0,0) at nodes. Changed how sphere points are displayed for spline loops and lines.

Changed the Interval adjustment settings from 1 to 0.1.

PJ9CV
click to copy
21 days ago 0.3.0

Added Support for Host Player to adjust Alpha, Tension, Time Interval between points, and added a closed / open loop toggle.

P6EDE
click to copy
22 days ago 0.2.0

This revision contains no notes

Q94SW
click to copy