I was wondering if it was possible to trigger an event based on if a link WASN’T clicked?
I can’t give you the specific code (it’s for a game I work for), but here’s what I need to happen (everything is set up perfectly except this little thing)
So you have item X that cannot be added to a players inventory if they don’t use it right away.
You click open item X, and you either have the right key or you don’t. If you don’t, it’s deleted. That’s easy, the code is in place for that.
However, if for some reason they don’t click the link, the item needs to be deleted immediately so it doesn’t sit in the inventory. (I tagged JS because I think jquery is needed if it’s something as dynamic as this)
Thanks in advance!
There is some point in your program that triggers it to delete the item. Closing of the inventory menu perhaps? That is an event you can capture, then figure out a way to call the appropriate code.