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

Category:
Custom game mode

Author:
Gecktendo

Rating:
0

Version:
1.0.0

Posted:
18 days ago

Last updated:
5 days ago

Tags:
camera catmull-rom tool

Share this workshop!

Options

Companion program to the Catmull-Rom Camera Tool. Exported variables from the camera tool can be pasted into this program to reduce the variables to 3 for easy implementation into your game modes.

variables
{
	global:
		0: Quadratic_Calculations
		1: Camera_Interval
		2: Time

	player:
		0: Flag_Camera
}

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

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

rule("Paste Variables From the Catmull-Rom Spline Camera Tool Here")
{
	event
	{
		Ongoing - Global;
	}
}

disabled rule("Cameras - Press Interact to Start Camera (Disable All Cameras Except One")
{
	event
	{
		Ongoing - Global;
	}
}

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

	conditions
	{
		Is Button Held(Event Player, Interact) == True;
		Player Variable(Event Player, Flag_Camera) == False;
	}

	actions
	{
		Set Global Variable(Time, 0);
		Chase Global Variable At Rate(Time, Divide(Count Of(Global Variable(Quadratic_Calculations)), 4), Divide(1, Global Variable(
			Camera_Interval)), Destination and Rate);
		Start Camera(Event Player, Add(Add(Add(Multiply(Value In Array(Global Variable(Quadratic_Calculations), Multiply(Round To Integer(
			Global Variable(Time), Down), 4)), Raise To Power(Modulo(Global Variable(Time), 1), 3)), Multiply(Value In Array(
			Global Variable(Quadratic_Calculations), Add(Multiply(Round To Integer(Global Variable(Time), Down), 4), 1)), Raise To Power(
			Modulo(Global Variable(Time), 1), 2))), Multiply(Value In Array(Global Variable(Quadratic_Calculations), Add(Multiply(
			Round To Integer(Global Variable(Time), Down), 4), 2)), Modulo(Global Variable(Time), 1))), Value In Array(Global Variable(
			Quadratic_Calculations), Add(Multiply(Round To Integer(Global Variable(Time), Down), 4), 3))), Add(Add(Add(Multiply(
			Value In Array(Global Variable(Quadratic_Calculations), Multiply(Round To Integer(Add(Global Variable(Time), 0.001), Down),
			4)), Raise To Power(Modulo(Add(Global Variable(Time), 0.001), 1), 3)), Multiply(Value In Array(Global Variable(
			Quadratic_Calculations), Add(Multiply(Round To Integer(Add(Global Variable(Time), 0.001), Down), 4), 1)), Raise To Power(
			Modulo(Add(Global Variable(Time), 0.001), 1), 2))), Multiply(Value In Array(Global Variable(Quadratic_Calculations), Add(
			Multiply(Round To Integer(Add(Global Variable(Time), 0.001), Down), 4), 2)), Modulo(Add(Global Variable(Time), 0.001), 1))),
			Value In Array(Global Variable(Quadratic_Calculations), Add(Multiply(Round To Integer(Add(Global Variable(Time), 0.001), Down),
			4), 3))), 0);
		Wait(1, Ignore Condition);
		Set Player Variable(Event Player, Flag_Camera, True);
	}
}

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

	conditions
	{
		Is Button Held(Event Player, Interact) == True;
		Player Variable(Event Player, Flag_Camera) == False;
	}

	actions
	{
		Set Global Variable(Time, 0);
		Chase Global Variable At Rate(Time, Divide(Count Of(Global Variable(Quadratic_Calculations)), 4), Divide(1, Global Variable(
			Camera_Interval)), Destination and Rate);
		Start Camera(Event Player, Add(Add(Add(Multiply(Value In Array(Global Variable(Quadratic_Calculations), Multiply(Round To Integer(
			Add(Global Variable(Time), 0.001), Down), 4)), Raise To Power(Modulo(Add(Global Variable(Time), 0.001), 1), 3)), Multiply(
			Value In Array(Global Variable(Quadratic_Calculations), Add(Multiply(Round To Integer(Add(Global Variable(Time), 0.001), Down),
			4), 1)), Raise To Power(Modulo(Add(Global Variable(Time), 0.001), 1), 2))), Multiply(Value In Array(Global Variable(
			Quadratic_Calculations), Add(Multiply(Round To Integer(Add(Global Variable(Time), 0.001), Down), 4), 2)), Modulo(Add(
			Global Variable(Time), 0.001), 1))), Value In Array(Global Variable(Quadratic_Calculations), Add(Multiply(Round To Integer(Add(
			Global Variable(Time), 0.001), Down), 4), 3))), Add(Add(Add(Multiply(Value In Array(Global Variable(Quadratic_Calculations),
			Multiply(Round To Integer(Global Variable(Time), Down), 4)), Raise To Power(Modulo(Global Variable(Time), 1), 3)), Multiply(
			Value In Array(Global Variable(Quadratic_Calculations), Add(Multiply(Round To Integer(Global Variable(Time), Down), 4), 1)),
			Raise To Power(Modulo(Global Variable(Time), 1), 2))), Multiply(Value In Array(Global Variable(Quadratic_Calculations), Add(
			Multiply(Round To Integer(Global Variable(Time), Down), 4), 2)), Modulo(Global Variable(Time), 1))), Value In Array(
			Global Variable(Quadratic_Calculations), Add(Multiply(Round To Integer(Global Variable(Time), Down), 4), 3))), 0);
		Wait(1, Ignore Condition);
		Set Player Variable(Event Player, Flag_Camera, True);
	}
}

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

	conditions
	{
		Is Button Held(Event Player, Interact) == True;
		Player Variable(Event Player, Flag_Camera) == False;
	}

	actions
	{
		Start Camera(Event Player, Vector(0, 0, 0), Vector(0, 0, 0), 0);
		Set Global Variable(Time, 0);
		Chase Global Variable At Rate(Time, Divide(Count Of(Global Variable(Quadratic_Calculations)), 4), Divide(1, Global Variable(
			Camera_Interval)), Destination and Rate);
		Start Camera(Event Player, Add(Add(Add(Multiply(Value In Array(Global Variable(Quadratic_Calculations), Multiply(Round To Integer(
			Global Variable(Time), Down), 4)), Raise To Power(Modulo(Global Variable(Time), 1), 3)), Multiply(Value In Array(
			Global Variable(Quadratic_Calculations), Add(Multiply(Round To Integer(Global Variable(Time), Down), 4), 1)), Raise To Power(
			Modulo(Global Variable(Time), 1), 2))), Multiply(Value In Array(Global Variable(Quadratic_Calculations), Add(Multiply(
			Round To Integer(Global Variable(Time), Down), 4), 2)), Modulo(Global Variable(Time), 1))), Value In Array(Global Variable(
			Quadratic_Calculations), Add(Multiply(Round To Integer(Global Variable(Time), Down), 4), 3))), Eye Position(Event Player), 50);
		Wait(0.750, Ignore Condition);
		Set Player Variable(Event Player, Flag_Camera, True);
	}
}

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

	conditions
	{
		Is Button Held(Event Player, Interact) == True;
		Player Variable(Event Player, Flag_Camera) == False;
	}

	actions
	{
		Set Global Variable(Time, 0);
		Chase Global Variable At Rate(Time, Divide(Count Of(Global Variable(Quadratic_Calculations)), 4), Divide(1, Global Variable(
			Camera_Interval)), Destination and Rate);
		Start Camera(Event Player, Add(Add(Add(Multiply(Value In Array(Global Variable(Quadratic_Calculations), Multiply(Round To Integer(
			Global Variable(Time), Down), 4)), Raise To Power(Modulo(Global Variable(Time), 1), 3)), Multiply(Value In Array(
			Global Variable(Quadratic_Calculations), Add(Multiply(Round To Integer(Global Variable(Time), Down), 4), 1)), Raise To Power(
			Modulo(Global Variable(Time), 1), 2))), Multiply(Value In Array(Global Variable(Quadratic_Calculations), Add(Multiply(
			Round To Integer(Global Variable(Time), Down), 4), 2)), Modulo(Global Variable(Time), 1))), Value In Array(Global Variable(
			Quadratic_Calculations), Add(Multiply(Round To Integer(Global Variable(Time), Down), 4), 3))), Add(Add(Add(Add(Multiply(
			Value In Array(Global Variable(Quadratic_Calculations), Multiply(Round To Integer(Global Variable(Time), Down), 4)),
			Raise To Power(Modulo(Global Variable(Time), 1), 3)), Multiply(Value In Array(Global Variable(Quadratic_Calculations), Add(
			Multiply(Round To Integer(Global Variable(Time), Down), 4), 1)), Raise To Power(Modulo(Global Variable(Time), 1), 2))),
			Multiply(Value In Array(Global Variable(Quadratic_Calculations), Add(Multiply(Round To Integer(Global Variable(Time), Down),
			4), 2)), Modulo(Global Variable(Time), 1))), Value In Array(Global Variable(Quadratic_Calculations), Add(Multiply(
			Round To Integer(Global Variable(Time), Down), 4), 3))), Facing Direction Of(Event Player)), 0);
		Wait(1, Ignore Condition);
		Set Player Variable(Event Player, Flag_Camera, True);
	}
}

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

rule("Press Interact While in Camera Mode to Stop Camera")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Is Button Held(Event Player, Interact) == True;
		Player Variable(Event Player, Flag_Camera) == True;
	}

	actions
	{
		Stop Camera(Event Player);
		Wait(1, Ignore Condition);
		Set Player Variable(Event Player, Flag_Camera, False);
	}
}

rule("Automatically Stop Camera at End of Track")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global Variable(Time) == Divide(Count Of(Global Variable(Quadratic_Calculations)), 4);
	}

	actions
	{
		Stop Camera(Event Player);
		Set Player Variable(Event Player, Flag_Camera, False);
	}
}

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

	actions
	{
		Create HUD Text(All Players(All Teams), Null, Custom String("Time: {0}", Multiply(Global Variable(Camera_Interval),
			Global Variable(Time)), Null, Null), Null, Right, 0, White, White, White, Visible To and String, Default Visibility);
	}
}

Changelog

5 days ago 1.0.0

-Updated the Share Code to the Live Patch.

HXM10
click to copy
18 days ago 1.0.0

This revision contains no notes

SDAJ2
click to copy