Im trying to make an array list for Effect ID and Effect Position. I have two seperate variables. I got that down and it adds to the array according but the problem is how do you delete specific effect at a position? Also how can I remove the specific ID and Position from the array when picking up the orb?
variables
{
player:
6: ArmorName
61: DeathOrbArray
62: DeathorbeffectID
}
rule(“Add Death orb to array”)
{
event
{
Player Earned Elimination;
Team 2;
All;
}
conditions
{
Event Player.ArmorName == Custom String("placeholder3");
}
actions
{
Create Effect(Event Player, Orb, Red, Position Of(Victim) + Vector(0, 1, 0), 1, Visible To);
Modify Player Variable(Event Player, DeathorbeffectID, Append To Array, Last Created Entity);
Modify Player Variable(Event Player, DeathOrbArray, Append To Array, Position Of(Victim) + Vector(0, 1, 0));
}
}
rule(“Check Position of orb and heal and destroy effect and play sound”)
{
event
{
Ongoing - Each Player;
Team 2;
All;
}
conditions
{
Event Player.ArmorName == Custom String("placeholder3");
Is True For Any(Event Player.DeathOrbArray, Distance Between(Event Player, Current Array Element) <= 3) == True;
}
actions
{
Play Effect(Event Player, Buff Impact Sound, White, Event Player, 100);
Heal(Event Player, Event Player, 150);
Destroy Effect(Is True For Any(Event Player.DeathOrbArray, Distance Between(Event Player, Current Array Element) <= 3));
disabled Destroy Effect(Is True For Any(Event Player.DeathorbeffectID, Distance Between(Event Player, Position Of(Current Array Element))
<= 3));
disabled Modify Player Variable(Event Player, DeathOrbArray, Remove From Array By Value, Is True For Any(Event Player.DeathOrbArray,
Distance Between(Event Player, Current Array Element) <= 3));
disabled Modify Player Variable(Event Player, DeathorbeffectID, Remove From Array By Value, Is True For Any(Event Player.DeathorbeffectID,
Distance Between(Event Player, Current Array Element) <= 3));
Wait(1, Ignore Condition);
Loop If Condition Is True;
}
}