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

Category:
Other

Author:
kerbybit

Rating:
0

Version:
1.0.0

Posted:
21 days ago

Last updated:
21 days ago

Share this workshop!

Options

A Bouncy Ball Press Interact(F) To Spawn & Ultimate(Q) To Start A Camera Where The Bouncy Ball Is

rule("Settings | (A) Air Friction | (H) Hit Friction | (S) Starting Speed Mul | (G) Gravity Direction")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Set Global Variable(A, 0.999);
		Set Global Variable(H, 0.990);
		Set Global Variable(S, 0.500);
		Set Global Variable(G, Vector(0, -0.010, 0));
	}
}

rule("Create Orb Effect")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	actions
	{
		Skip(Multiply(Random Integer(1, 11), 2));
		Abort;
		Abort;
		Create Effect(Remove From Array(All Players(All Teams), Filtered Array(Event Player, Compare(Player Variable(Current Array Element,
			C), ==, True))), Orb, White, Player Variable(Event Player, P), 0.100, Visible To Position and Radius);
		Abort;
		Create Effect(Remove From Array(All Players(All Teams), Filtered Array(Event Player, Compare(Player Variable(Current Array Element,
			C), ==, True))), Orb, Yellow, Player Variable(Event Player, P), 0.100, Visible To Position and Radius);
		Abort;
		Create Effect(Remove From Array(All Players(All Teams), Filtered Array(Event Player, Compare(Player Variable(Current Array Element,
			C), ==, True))), Orb, Green, Player Variable(Event Player, P), 0.100, Visible To Position and Radius);
		Abort;
		Create Effect(Remove From Array(All Players(All Teams), Filtered Array(Event Player, Compare(Player Variable(Current Array Element,
			C), ==, True))), Orb, Purple, Player Variable(Event Player, P), 0.100, Visible To Position and Radius);
		Abort;
		Create Effect(Remove From Array(All Players(All Teams), Filtered Array(Event Player, Compare(Player Variable(Current Array Element,
			C), ==, True))), Orb, Red, Player Variable(Event Player, P), 0.100, Visible To Position and Radius);
		Abort;
		Create Effect(Remove From Array(All Players(All Teams), Filtered Array(Event Player, Compare(Player Variable(Current Array Element,
			C), ==, True))), Orb, Blue, Player Variable(Event Player, P), 0.100, Visible To Position and Radius);
		Abort;
		Create Effect(Remove From Array(All Players(All Teams), Filtered Array(Event Player, Compare(Player Variable(Current Array Element,
			C), ==, True))), Orb, Aqua, Player Variable(Event Player, P), 0.100, Visible To Position and Radius);
		Abort;
		Create Effect(Remove From Array(All Players(All Teams), Filtered Array(Event Player, Compare(Player Variable(Current Array Element,
			C), ==, True))), Orb, Orange, Player Variable(Event Player, P), 0.100, Visible To Position and Radius);
		Abort;
		Create Effect(Remove From Array(All Players(All Teams), Filtered Array(Event Player, Compare(Player Variable(Current Array Element,
			C), ==, True))), Orb, Sky Blue, Player Variable(Event Player, P), 0.100, Visible To Position and Radius);
		Abort;
		Create Effect(Remove From Array(All Players(All Teams), Filtered Array(Event Player, Compare(Player Variable(Current Array Element,
			C), ==, True))), Orb, Turquoise, Player Variable(Event Player, P), 0.100, Visible To Position and Radius);
		Abort;
		Create Effect(Remove From Array(All Players(All Teams), Filtered Array(Event Player, Compare(Player Variable(Current Array Element,
			C), ==, True))), Orb, Lime Green, Player Variable(Event Player, P), 0.100, Visible To Position and Radius);
		Abort;
	}
}

rule("Interact Spawn/Respawn Ball")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

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

	actions
	{
		Set Player Variable(Event Player, P, Eye Position(Event Player));
		Set Player Variable(Event Player, D, Multiply(Add(Facing Direction Of(Event Player), Divide(Velocity Of(Event Player), 10)),
			Global Variable(S)));
		Set Player Variable(Event Player, O, True);
	}
}

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

	conditions
	{
		Player Variable(Event Player, O) == True;
	}

	actions
	{
		Modify Player Variable(Event Player, P, Add, Player Variable(Event Player, D));
		Modify Player Variable(Event Player, D, Add, Global Variable(G));
		Modify Player Variable(Event Player, D, Multiply, Global Variable(A));
		Set Player Variable(Event Player, G, Add(Player Variable(Event Player, P), Player Variable(Event Player, D)));
		Wait(0.016, Ignore Condition);
		Loop If Condition Is True;
	}
}

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

	conditions
	{
		Player Variable(Event Player, O) == True;
		Ray Cast Hit Position(Player Variable(Event Player, P), Player Variable(Event Player, G), Null, Null, False) != Player Variable(
			Event Player, G);
	}

	actions
	{
		Set Player Variable(Event Player, N, Ray Cast Hit Normal(Player Variable(Event Player, P), Player Variable(Event Player, G), Null,
			Null, False));
		Modify Player Variable(Event Player, D, Multiply, Global Variable(H));
		Modify Player Variable(Event Player, D, Add, Multiply(Global Variable(G), Multiply(Global Variable(A), -1.000)));
		Set Player Variable(Event Player, D, Subtract(Player Variable(Event Player, D), Multiply(Multiply(2, Dot Product(Player Variable(
			Event Player, D), Player Variable(Event Player, N))), Player Variable(Event Player, N))));
		Set Player Variable(Event Player, G, Add(Player Variable(Event Player, P), Player Variable(Event Player, D)));
		Wait(0.016, Ignore Condition);
		Loop If Condition Is True;
	}
}

Changelog

21 days ago 1.0.0

This revision contains no notes

MEEH2
click to copy