Just a heads up this is a fairly complicated script so i wouldn’t recommend trying to solve this if you are new or unfamiliar to the workshop.
I have made a script that allows Moira to make a wall that works almost exactly like Mei’s wall but with fire, but it can get very laggy and i think it’s because the script is a lot longer than it should be, i have tried to make it shorter in many ways, i even removed the damage of the wall but it’s still laggy if there are several walls at once, i can’t really think of any way to make it shorter. if you have any questions about it or the variables feel free to ask and thanks in advance.
also don’t forget to be moira when testing this.
Code: DWHHG
There's only one important rule so i put it here
rule("Wall")
{
event
{
Ongoing - Each Player;
All;
Moira;
}
conditions
{
Or(Or(Or(Is Button Held(Event Player, Ability 2), False), And(Is Button Held(Event Player, Primary Fire), Player Variable(
Event Player, W))), And(Is Button Held(Event Player, Secondary Fire), Player Variable(Event Player, W))) == True;
Is Alive(Event Player) == True;
}
actions
{
Wait(0.016, Ignore Condition);
Abort If(And(Compare(Player Variable(Event Player, T), !=, 0), Not(Player Variable(Event Player, F))));
Skip If(Not(Player Variable(Event Player, F)), 20);
Skip If(Compare(Team Of(Event Player), ==, Team 1), 5);
Play Effect(All Players(All Teams), Bad Pickup Effect, Team 2, Value In Array(Player Variable(Event Player, A), 0), 1);
Play Effect(All Players(All Teams), Bad Pickup Effect, Team 2, Value In Array(Player Variable(Event Player, A), 1), 1);
Play Effect(All Players(All Teams), Bad Pickup Effect, Team 2, Value In Array(Player Variable(Event Player, A), 2), 1);
Play Effect(All Players(All Teams), Bad Pickup Effect, Team 2, Value In Array(Player Variable(Event Player, A), 3), 1);
Play Effect(All Players(All Teams), Bad Pickup Effect, Team 2, Value In Array(Player Variable(Event Player, A), 4), 1);
Skip If(Compare(Team Of(Event Player), ==, Team 2), 5);
Play Effect(All Players(All Teams), Bad Pickup Effect, Team 1, Value In Array(Player Variable(Event Player, A), 0), 1);
Play Effect(All Players(All Teams), Bad Pickup Effect, Team 1, Value In Array(Player Variable(Event Player, A), 1), 1);
Play Effect(All Players(All Teams), Bad Pickup Effect, Team 1, Value In Array(Player Variable(Event Player, A), 2), 1);
Play Effect(All Players(All Teams), Bad Pickup Effect, Team 1, Value In Array(Player Variable(Event Player, A), 3), 1);
Play Effect(All Players(All Teams), Bad Pickup Effect, Team 1, Value In Array(Player Variable(Event Player, A), 4), 1);
Modify Player Variable(Event Player, G, Add, 1);
Wait(0.100, Ignore Condition);
Skip If(Is Button Held(Event Player, Secondary Fire), 1);
Loop If(Compare(Player Variable(Event Player, G), <, 50));
Set Player Variable(Event Player, F, False);
Set Player Variable(Event Player, G, 0);
Set Player Variable(Event Player, A, Vector(0, 10000, 0));
Abort;
Skip If(Or(Not(Is Button Held(Event Player, Ability 2)), Not(Player Variable(Event Player, W))), 34);
Skip If(Player Variable(Event Player, R), 15);
Destroy Effect(Value In Array(Player Variable(Event Player, B), 1));
Destroy Effect(Value In Array(Player Variable(Event Player, B), 2));
Destroy Effect(Value In Array(Player Variable(Event Player, B), 3));
Destroy Effect(Value In Array(Player Variable(Event Player, B), 4));
Create Effect(Event Player, Sphere, Red, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player),
Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False), World Vector Of(
Vector(1.500, 0, 0), Event Player, Rotation)), 1, Position and Radius);
Set Player Variable At Index(Event Player, B, 1, Last Created Entity);
Wait(0.016, Ignore Condition);
Create Effect(Event Player, Sphere, Red, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player),
Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False), World Vector Of(
Vector(3, 0, 0), Event Player, Rotation)), 1, Position and Radius);
Set Player Variable At Index(Event Player, B, 2, Last Created Entity);
Wait(0.016, Ignore Condition);
Create Effect(Event Player, Sphere, Red, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player),
Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False), World Vector Of(
Vector(-1.500, 0, 0), Event Player, Rotation)), 1, Position and Radius);
Set Player Variable At Index(Event Player, B, 3, Last Created Entity);
Wait(0.016, Ignore Condition);
Create Effect(Event Player, Sphere, Red, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player),
Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False), World Vector Of(
Vector(-3.000, 0, 0), Event Player, Rotation)), 1, Position and Radius);
Set Player Variable At Index(Event Player, B, 4, Last Created Entity);
Skip If(Not(Player Variable(Event Player, R)), 15);
Destroy Effect(Value In Array(Player Variable(Event Player, B), 1));
Destroy Effect(Value In Array(Player Variable(Event Player, B), 2));
Destroy Effect(Value In Array(Player Variable(Event Player, B), 3));
Destroy Effect(Value In Array(Player Variable(Event Player, B), 4));
Create Effect(Event Player, Sphere, Red, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player),
Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False), World Vector Of(
Vector(0, 0, 1.500), Event Player, Rotation)), 1, Position and Radius);
Set Player Variable At Index(Event Player, B, 1, Last Created Entity);
Wait(0.016, Ignore Condition);
Create Effect(Event Player, Sphere, Red, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player),
Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False), World Vector Of(
Vector(0, 0, 3), Event Player, Rotation)), 1, Position and Radius);
Set Player Variable At Index(Event Player, B, 2, Last Created Entity);
Wait(0.016, Ignore Condition);
Create Effect(Event Player, Sphere, Red, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player),
Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False), World Vector Of(
Vector(0, 0, -1.500), Event Player, Rotation)), 1, Position and Radius);
Set Player Variable At Index(Event Player, B, 3, Last Created Entity);
Wait(0.016, Ignore Condition);
Create Effect(Event Player, Sphere, Red, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player),
Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False), World Vector Of(
Vector(0, 0, -3.000), Event Player, Rotation)), 1, Position and Radius);
Set Player Variable At Index(Event Player, B, 4, Last Created Entity);
Set Player Variable(Event Player, R, Not(Player Variable(Event Player, R)));
Abort;
Skip If(Or(Not(Player Variable(Event Player, W)), Not(Is Button Held(Event Player, Secondary Fire))), 9);
Allow Button(Event Player, Primary Fire);
Allow Button(Event Player, Secondary Fire);
Set Player Variable(Event Player, W, False);
Destroy Effect(Value In Array(Player Variable(Event Player, B), 0));
Destroy Effect(Value In Array(Player Variable(Event Player, B), 1));
Destroy Effect(Value In Array(Player Variable(Event Player, B), 2));
Destroy Effect(Value In Array(Player Variable(Event Player, B), 3));
Destroy Effect(Value In Array(Player Variable(Event Player, B), 4));
Abort;
Skip If(Or(Not(Is Button Held(Event Player, Primary Fire)), Not(Player Variable(Event Player, W))), 24);
Set Player Variable(Event Player, T, 15);
Chase Player Variable At Rate(Event Player, T, 0, 1, Destination and Rate);
Set Player Variable(Event Player, W, False);
Set Player Variable(Event Player, A, Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Multiply(
Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False));
Skip If(Player Variable(Event Player, R), 4);
Modify Player Variable(Event Player, A, Append To Array, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(
Event Player), Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False),
World Vector Of(Vector(0, 0, 1.500), Event Player, Rotation)));
Modify Player Variable(Event Player, A, Append To Array, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(
Event Player), Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False),
World Vector Of(Vector(0, 0, 3), Event Player, Rotation)));
Modify Player Variable(Event Player, A, Append To Array, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(
Event Player), Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False),
World Vector Of(Vector(0, 0, -1.500), Event Player, Rotation)));
Modify Player Variable(Event Player, A, Append To Array, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(
Event Player), Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False),
World Vector Of(Vector(0, 0, -3.000), Event Player, Rotation)));
Skip If(Not(Player Variable(Event Player, R)), 4);
Modify Player Variable(Event Player, A, Append To Array, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(
Event Player), Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False),
World Vector Of(Vector(1.500, 0, 0), Event Player, Rotation)));
Modify Player Variable(Event Player, A, Append To Array, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(
Event Player), Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False),
World Vector Of(Vector(3, 0, 0), Event Player, Rotation)));
Modify Player Variable(Event Player, A, Append To Array, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(
Event Player), Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False),
World Vector Of(Vector(-1.500, 0, 0), Event Player, Rotation)));
Modify Player Variable(Event Player, A, Append To Array, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(
Event Player), Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False),
World Vector Of(Vector(-3.000, 0, 0), Event Player, Rotation)));
Destroy Effect(Value In Array(Player Variable(Event Player, B), 0));
Destroy Effect(Value In Array(Player Variable(Event Player, B), 1));
Destroy Effect(Value In Array(Player Variable(Event Player, B), 2));
Destroy Effect(Value In Array(Player Variable(Event Player, B), 3));
Destroy Effect(Value In Array(Player Variable(Event Player, B), 4));
Destroy Effect(Value In Array(Player Variable(Event Player, B), 5));
Set Player Variable(Event Player, F, True);
Allow Button(Event Player, Secondary Fire);
Allow Button(Event Player, Primary Fire);
Loop;
Set Player Variable(Event Player, W, True);
Set Player Variable(Event Player, R, True);
Create Effect(Event Player, Sphere, Red, Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player),
Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False), 1,
Position and Radius);
Set Player Variable(Event Player, B, Last Created Entity);
Wait(0.016, Ignore Condition);
Create Effect(Event Player, Sphere, Red, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player),
Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False), World Vector Of(
Vector(1.500, 0, 0), Event Player, Rotation)), 1, Position and Radius);
Modify Player Variable(Event Player, B, Append To Array, Last Created Entity);
Wait(0.016, Ignore Condition);
Create Effect(Event Player, Sphere, Red, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player),
Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False), World Vector Of(
Vector(-1.500, 0, 0), Event Player, Rotation)), 1, Position and Radius);
Modify Player Variable(Event Player, B, Append To Array, Last Created Entity);
Wait(0.016, Ignore Condition);
Create Effect(Event Player, Sphere, Red, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player),
Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False), World Vector Of(
Vector(3, 0, 0), Event Player, Rotation)), 1, Position and Radius);
Modify Player Variable(Event Player, B, Append To Array, Last Created Entity);
Wait(0.016, Ignore Condition);
Create Effect(Event Player, Sphere, Red, Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player),
Multiply(Facing Direction Of(Event Player), 1000)), All Players(All Teams), All Players(All Teams), False), World Vector Of(
Vector(-3.000, 0, 0), Event Player, Rotation)), 1, Position and Radius);
Modify Player Variable(Event Player, B, Append To Array, Last Created Entity);
Disallow Button(Event Player, Primary Fire);
Disallow Button(Event Player, Secondary Fire);
}
}