Removes the ability to teleport through walls using Swift Step 
Should be compatible with most code execluding the ones tracking when swiftstep cooldowns is zero
Does nothing on Free for All modes
Code below
If on console use the code Z27KX and copy it to your current project
rule("[Script: No Swiftstep through Walls]")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
"Check if is Kiriko"
(Hero Being Duplicated(Event Player) == Hero(Kiriko) || Hero Of(Event Player) == Hero(Kiriko)) == True;
"Check if ability cooldown is 0.4 or below so to not reset cooldown when above 0.4"
Ability Cooldown(Event Player, Button(Ability 1)) <= 0.400;
"Check if selected teammates is in line of sight"
Count Of(Filtered Array(Players in View Angle(Event Player, All Teams, 15), Is In Line of Sight(Event Player,
Current Array Element, Barriers Do Not Block LOS) == True)) == 0;
}
actions
{
Wait(0.128, Abort When False);
Set Ability Cooldown(Event Player, Button(Ability 1), 0.400);
Loop If Condition Is True;
}
}
2 Comments
wait wouldnt this be realistically better?
rule("[kiriko/swift_step.opy]: Not usable if walls.")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
"Check if is Kiriko"
(Hero Being Duplicated(Event Player) == Hero(Kiriko) || Hero Of(Event Player) == Hero(Kiriko)) == True;
"Check if selected teammates is in line of sight"
Count Of(Filtered Array(Players in View Angle(Event Player, All Teams, 15), Is In Line of Sight(Event Player,
Current Array Element, Barriers Do Not Block LOS) == True)) == 0;
}
actions
{
Wait(0.016, Restart When True);
Disallow Button(Event Player, Button(Ability 1));
Loop If Condition Is True;
Allow Button(Event Player, Button(Ability 1));
}
}
Possibly but the teleport highlight still appear through walls. Maybe better if you disable the ability but I haven't tested. I just wrote something.