rule(“Spawn/Assign Bots”)
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Has Spawned(Event Player) == True;
Is Dummy Bot(Event Player) == False;
Event Player.X == False;
}
actions
{
Create Dummy Bot(Hero(Wrecking Ball), All Teams, -1, Event Player, Vector(0, 0, 0));
Event Player.X[0] = Last Created Entity;
Wait(0.016, Ignore Condition);
Create Dummy Bot(Hero(Widowmaker), All Teams, -1, Event Player, Vector(0, 0, 0));
Event Player.X[1] = Last Created Entity;
Wait(0.016, Ignore Condition);
Attach Players(Event Player.X[0], Event Player, Vector(0, 0.750, 0));
Attach Players(Event Player.X[1], Event Player, Vector(0, 0, 0));
Set Invisible(Event Player.X, All);
Start Facing(Event Player.X, Facing Direction Of(Event Player), 9999, To World, Direction and Turn Rate);
Set Status(Event Player.X, Null, Phased Out, 9999);
}
}
rule(“UseHook”)
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Button(Interact)) == True;
}
actions
{
Set Ability Cooldown(Event Player.X[0], Button(Secondary Fire), 0);
Start Holding Button(Event Player.X[0], Button(Secondary Fire));
Wait(0.033, Ignore Condition);
Detach Players(Event Player.X[0]);
Detach Players(Event Player.X[1]);
Wait(0.033, Ignore Condition);
Attach Players(Event Player, Event Player.X[0], Vector(0, 0, 0));
Attach Players(Event Player.X[1], Event Player.X[0], Vector(0, 0, 0));
Wait Until(!Is Button Held(Event Player, Button(Interact)), 10);
Wait(0.033, Ignore Condition);
Stop Holding Button(Event Player.X[0], Button(Secondary Fire));
Detach Players(Event Player);
Attach Players(Event Player.X[0], Event Player, Vector(0, 0.750, 0));
Attach Players(Event Player.X[1], Event Player, Vector(0, 0, 0));
}
}
rule(“UseGrapple”)
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
(Is Button Held(Event Player, Button(Jump)) && Is Button Held(Event Player, Button(Melee))) == True;
}
actions
{
Set Ability Cooldown(Event Player.X[1], Button(Ability 1), 0);
Press Button(Event Player.X[1], Button(Ability 1));
Wait(0.033, Ignore Condition);
Detach Players(Event Player.X[0]);
Detach Players(Event Player.X[1]);
Wait(0.066, Ignore Condition);
Attach Players(Event Player, Event Player.X[1], Vector(0, 0, 0));
Attach Players(Event Player.X[0], Event Player.X[1], Vector(0, 0, 0));
Wait Until(!Is Button Held(Event Player, Button(Jump)), 10);
Press Button(Event Player.X[1], Button(Jump));
Wait(0.033, Ignore Condition);
Detach Players(Event Player);
Attach Players(Event Player.X[0], Event Player, Vector(0, 0.750, 0));
Attach Players(Event Player.X[1], Event Player, Vector(0, 0, 0));
}
}
The first rule will spawn and attach a Hammond + Widowmaker bot to the player, and store them in the players X variable. The other two are for controlling the links and abilities to allow the player to grapple/hook.
The Hammond hook just uses the interact button. For Widows hook, it’s set up for jump+melee, and drops the hook when letting go of jump. The only thing I forgot is for Hammond’s high speed bump so it doesn’t affect the user.