Hi, I’m trying to use timers in my game (I’m making a message in my store, that when you are out of coins a message pops up telling you that you need more coins) i want the message to stay on the screen for 3 seconds and then fade away. But it’s not working. I’m sure it’s just my lack of knowledge on timers. Thanks in advance!
Hi, can you post a screenshot of your events?
The wiki will explain how to use them, and the examples/tutorials will show you working examples.
Is there a tutorial that shows specifically what he’s looking for?
My game has something like that in the shop, when you have less coins than needed to buy something (which isn’t in the wiki). I use an opacity tween on the text object and conditions to check coin balance, there is no timer other than the tween duration. The duration should be 3000 to fade out over 3 seconds and I think the EaseOutSine works best, but feel free to try other options.
Thank you, so i just use a tween animation?
Thank you! It’s working most of the way. I’m using EaseOutSine in tween animation, i have a couple if questions though, one, is there a way i can make it stay full opacity for 3 seconds and then fade away? And two, the message is only showing once and when i try again the message won’t show, how can i fix this?
No worries about the screenshot.
I’m attaching one from my shop events. Use what you need and discard the rest
As for making it stay at full opacity for the 3 seconds and fading away as well as not showing after the first time, it could be due to your conditions. See how I have my message set to show whenever the coin balance is equal to or less than 19? My cheapest item is 20 coins, so the message should trigger every time the balance goes below that.
Oh yeah, and I have some extra text formatting - it’s completely optional.
Thank you, I’ll see if it works!
Most of it is working now, all except one thing, when i try to purchase something without enough coins the message comes and then fades away, but if i try again, still without enough coins the message does not pop up, how do i fix this?
PS. Thanks for all the help!
Most likely you need another condition to trigger it, but it’s hard to say which because I’m not sure of exactly how you want to set your shop up or what your events look like.
I also show/hide buy/sell buttons if the player doesn’t have enough coins and use other conditions for this part based on inventory caps. That way they will be unable to click buttons if they don’t meet the conditions to display them like, having or not having enough coins to buy, having a “full” inventory" or enough product to sell back. It’s a different way of communicating the same thing, plus preventing exploits
I’ll post a screenshot as soon as possible of my events.