I am guessing i need a math formula but I am terrible at math. For example if timer is 5sec I want for a object to change its scale graudually (not instant) to 0 with the timer so when the timer is at 0 the scale is also 0. I hope you get what I want my english is terrible.
I’m sure there’s many ways to do this and other people might have more accurate and better ways.
This method changes the size of the object gradually. It uses the object’s current x scale and multiplies that value by a number less than 1 (to reduce the size of the object).
Each time the calculation is done, the object’s current x scale is a bit smaller so the new scale value keeps decreasing.
Values to change if you want to experiment: the timer value and the 0.98. And also edit the points of the object sprite so that the origin is in the centre to keep the object in a consistent place as its size changes. And what happens once the object is scaled down to zero? Are you going to destroy the object?
An easier and cleaner way would be to tween the scale using the tween behavior.
I tried the scale tween, yes it’s perfect, thank you. Tweening has been one of those things I’ve been putting off learning about, will add it to my tools now, yayyy.