Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | 9BitStrider |
I’m working on a shop for my game. Basically, I want the currency counter to match the player’s current max currency whenever a purchase is made, taking the same amount of time to count down regardless of how much is spent. I thought I could do this with a tween but it’s currently not working.
if next and Input.is_action_just_pressed("jump"):
#Start tween for the screw countdown
sound('buy')
global.bolts -= prices[shop_pos]
if global.bolts != screws:
$graphic/spawn_tiles/shop/countdown.interpolate_property(self, screws, screws, global.bolts, 0.5, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
$graphic/spawn_tiles/shop/countdown.start()