I need to pull a string from an array, then delete the string from the array after it's pulled so that it can't get pulled again next time.
As an example, if the array contains
0- "Hi"
1- "Hey"
2- "What's up"
Then a random one of those will be picked when you talk to an NPC. after you talk to them, I want whichever one was chosen to then be deleted from the array permanently.
I can't figure out how to do it because my javascript knowledge is still basic.
As an example, if the array contains
0- "Hi"
1- "Hey"
2- "What's up"
Then a random one of those will be picked when you talk to an NPC. after you talk to them, I want whichever one was chosen to then be deleted from the array permanently.
I can't figure out how to do it because my javascript knowledge is still basic.