As the title stated, when a weapon/item is being put in the inventory, is there currently a way to remove the say weapon/item from the inventory after a certain time have pass? Example: I use an item(log) and a weapon(torch) appear in my inventory. I got this part down. But after a certain time pass, I want the torch to be remove.
E.g. set a variable on item use (e.g. a float used as counter), create a game event that reduces the counter by 1 (and removes the item/weapon when it reaches 0). Now, all you need to do is set up an Auto type global event (World > Global Events) that executes the event every second as long as the variable is above 0 :)
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Phew, easier say than done. I have to wrap my head around and around and around for 4 hours until it finally click on how to make the variable work in this instance XD But GiL, can you check if the REMOVE FROM INVENTORY step is working correctly? I did my global event so that when I use a log, it'll activate the global event and the float variable inside the event will go up a number each second and when it reaches a certain number, it'll check for my torch and remove it from the inventory. The problem is it's not removing my torch from the inventory at all. If I try to remove an item, it removes fine, but if I try to remove a weapon, it'll just ignore it.
If you have the weapon equipped, you'd need to unequip it first :)
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
E.g. set a variable on item use (e.g. a float used as counter), create a game event that reduces the counter by 1 (and removes the item/weapon when it reaches 0).
Now, all you need to do is set up an Auto type global event (World > Global Events) that executes the event every second as long as the variable is above 0 :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I have to wrap my head around and around and around for 4 hours until it finally click on how to make the variable work in this instance XD
But GiL, can you check if the REMOVE FROM INVENTORY step is working correctly? I did my global event so that when I use a log, it'll activate the global event and the float variable inside the event will go up a number each second and when it reaches a certain number, it'll check for my torch and remove it from the inventory. The problem is it's not removing my torch from the inventory at all. If I try to remove an item, it removes fine, but if I try to remove a weapon, it'll just ignore it.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Thanks GiL!