How to move DummyBots to Opposite teams Spawn room?

I try to make rules with start facing, start throttle actions but it was clumsy T_T

It’s embarrassing, but This is what I made ▼

variables
{
	player:
		25: TargetInView
}

rule("Dummy Bots Target On")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	condition
	{
		Is Dummy Bot(Event Player) == True;
		Distance Between(Event Player, Closest Player To(Event Player, Opposite Team Of(Team Of(Event Player)))) <= 20;
		Is In View Angle(Event Player, Closest Player To(Event Player, Opposite Team Of(Team Of(Event Player))), 45) == True;
	}

	action
	{
		Event Player.TargetInView = Player Closest To Reticle(Event Player, Opposite Team Of(Team Of(Event Player)));
	}
}

rule("Dummy Bots Target Off")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	condition
	{
		Is Dummy Bot(Event Player) == True;
		Event Player.TargetInView == False;
	}

	action
	{
		Start Facing(Event Player, Direction Towards(Event Player, Spawn Points(Opposite Team Of(All Teams))), 100, To World,
			Direction and Turn Rate);
		Start Throttle In Direction(Event Player, Direction Towards(Event Player, Spawn Points(Opposite Team Of(All Teams))), 1, To World,
			Replace existing throttle, Direction and Magnitude);
	}
}

rule("Dummy Bots Target Off")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	condition
	{
		Is Dummy Bot(Event Player) == True;
		Event Player.TargetInView == True;
		Distance Between(Event Player, Position Of(Event Player.TargetInView)) >= 25;
	}

	action
	{
		Event Player.TargetInView = False;
	}
}

rule("Dummy Bots Target Throttle")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	condition
	{
		Is Dummy Bot(Event Player) == True;
		Event Player.TargetInView == True;
	}

	action
	{
		Start Throttle In Direction(Event Player, Direction Towards(Position Of(Event Player), Position Of(Event Player.TargetInView)), 1,
			To World, Replace existing throttle, Direction and Magnitude);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Position Of(Event Player.TargetInView)), 200, To World,
			Direction and Turn Rate);
	}
}

In my rules, DummyBots are not moving correctly of course…

I just wanted for create Dummybots when count of players are too low.

Is there are anyone can helping me?

Getting Bots to move towards something without falling of the map / walking into walls is a tedious task to say the least.

rule("Rule 1")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Current Map == Map(Route 66);
	}

	actions
	{
		Global.A = Array(Vector(-50.551, 4.595, -36.008), Vector(-47.829, 4.595, -40.129), Vector(-38.355, 4.608, -34.455), Vector(-21.393,
			4.608, -33.046), Vector(-6.826, 4.465, -15.724), Vector(5.023, 3.405, -11.635), Vector(4.301, 3.360, -0.148), Vector(8.095,
			3.339, 3.413), Vector(16.513, 3.395, -0.844), Vector(42.391, 3.193, 19.764), Vector(58.270, 3.066, 19.509), Vector(43.483,
			1.528, 40.670), Vector(36.682, 1.526, 44.040), Vector(37.886, 1.560, 50.302), Vector(35.336, 1.611, 57.581), Vector(29.805,
			3.264, 72.568), Vector(39.376, 3.642, 75.966));
	}
}

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

	conditions
	{
		Is Dummy Bot(Event Player) == True;
		Distance Between(Event Player, First Of(Spawn Points(Opposite Team Of(Team Of(Event Player))))) > 30;
	}

	actions
	{
		Start Throttle In Direction(Event Player, Direction Towards(Event Player, First Of(Sorted Array(Filtered Array(Global.A,
			Is In Line of Sight(Eye Position(Event Player), Current Array Element, Barriers Do Not Block LOS)), Distance Between(
			Current Array Element, First Of(Spawn Points(Opposite Team Of(Team Of(Event Player)))))))), 1, To World,
			Replace existing throttle, Direction and Magnitude);
	}
}

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

	conditions
	{
		Is Dummy Bot(Event Player) == True;
		Distance Between(Event Player, First Of(Spawn Points(Opposite Team Of(Team Of(Event Player))))) > 30;
	}

	actions
	{
		Stop Throttle In Direction(Event Player);
	}
}

This would only work for Route 66 and if the Bot is moved out of line of sight of any of these points it’s pretty much stuck.
You’re going to have to create a lot of positions if you want them to find towards the enemy spawn regardless of where it is.

A different attempt would be to use “[Tool] Graph Creation Tool” instead, but there’s no way around collecting tons of positions for every Map~~

1 Like

Oh I understand. Thankyou!

1 Like