I know I have posted it already but I will copy for you again.
This is a funny special auto ult of Widowmaker from my Base defense game mod.
code
rule("Special Widow ULT on")
{
event
{
Ongoing - Each Player;
Team 1;
Widowmaker;
}
conditions
{
Is Alive(Event Player) == True;
Is Using Ultimate(Event Player) == True;
Is True For Any(Is In Line of Sight(Event Player, Filtered Array(All Players(Team 2), Compare(Is Alive(Event Player), ==, True)),
All Barriers Block LOS), Compare(Distance Between(Event Player, Current Array Element), <, 50)) == True;
// this one can be removed
Value In Array(Global Variable(PowerCenterArray), 0) == 1;
}
actions
{
Start Holding Button(Event Player, Secondary Fire);
Set Player Variable(Event Player, T, First Of(Sorted Array(Filtered Array(All Players(Team 2), And(And(Compare(Is Alive(
Current Array Element), ==, True), Compare(Distance Between(Event Player, Current Array Element), <, 50)), Compare(
Is In Line of Sight(Event Player, Current Array Element, All Barriers Block LOS), ==, True))), Distance Between(Event Player,
Current Array Element))));
Skip If(Compare(Player Variable(Event Player, T), ==, 0), 5);
Set Facing(Event Player, Vector Towards(Eye Position(Event Player), Eye Position(Player Variable(Event Player, T))), To World);
Wait(1.500, Ignore Condition);
Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Player Variable(Event Player, T))), 20,
To World, Direction and Turn Rate);
Press Button(Event Player, Primary Fire);
Stop Facing(Event Player);
Wait(0.150, Ignore Condition);
Loop If Condition Is True;
Stop Facing(Event Player);
Stop Holding Button(Event Player, Secondary Fire);
}
}
More info about me and my game mods you can find here.
Feel free to comment my ideas.