Needing some guidance here. Again, I feel like I'm overlooking a very simple way of doing this...
So, first off, I have an inventory stored in an array which counts items picked up, dropped, amount, etc...
First query: however, I'm trying to understand how to apply an 'as long as item is in inventory' effect (example: player has Boots of Speed - add 50 to speed variable on the player) but I can't figure it out.
I'm currently comparing a value in the array, checking if it's true and then, on true, doing the 'add 50 to speed'. This constantly adds every tick though.
How would I get this to just be a once-off effect?
As well, how would I get this effect to be removed when the item is removed from the inventory? Would this apply to items 'stacking' onto the same variable (so two different items altering the speed of the player)?
Thanks in advances, everybody. :)