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?