Using: Sugarcube2.28.2, Twine 2.2 (I believe)
Now, this is more specific than my question title states; I understand how to delete an item from an array via array.delete("itemhere").
My game has the ability for a player to buy an item more than once. Each time, it places the item in the inventory as a new, separate variable in the array.
As far as I'm aware, using this, will delete all items with the same name. In example...
<<set $items to ["apple", "apple", "orange"]>>
Will delete all items with the name "apple" from the array.
What I want to do is just delete ONE of the "apple"s. But, I won't always know the location of the apple in the array.
Is there a way to get it to remove a singular apple, so one apple still stays in the array?
Thank you for any assistance! I've been looking for an answer for a while now (weeks even, oof), with no luck.