I am making a trail game.
I added my character ID to an array.
Example: Var1 = [2,3,4,5]
I created a random chance system to splice a character to then give a state. When player is no longer affected by state I then push the ID back to the array. If they die within the state then obviously that value dies with them. But, one thing I am running into is if they die while not affected in the state. Let’s say the player ID is 3 and their HP drops to zero and die. Is there a way to then splice that ID from the array?
I added my character ID to an array.
Example: Var1 = [2,3,4,5]
I created a random chance system to splice a character to then give a state. When player is no longer affected by state I then push the ID back to the array. If they die within the state then obviously that value dies with them. But, one thing I am running into is if they die while not affected in the state. Let’s say the player ID is 3 and their HP drops to zero and die. Is there a way to then splice that ID from the array?