Hello Devs & Guru’s.
I’m a noob, first off. Second - thank you for taking the time to read this.
I’m simply (Ha!) he says… trying to automatically shrink a tilesprite from W / H of the game window to the centre of the screen (then stop when it has gone).
(Here is my attempt)… it does shrink, but not into the centre… this goes from the bottom/right up to top/left corner.
it this because I’m using a tileSprite instead of an image?
So I tried this with a Sprite instead. It’s a little better and closer to what I want but it isn’t perfect.
- Created a Sprite ‘NewSprite’
- Set Point to middle/centre.
- created instance variables on the NewSprite
Because my Math is terrable, I’m thinking there will be a better way to subtract the value???
Using the subtract math operator seems like the best way to subtract.
If the result is not perfect, you need to tell us in what way, or we can’t help.
There are a few expressions you can use to move your sprite each frame, to make sure it’s always centered:
And same for height.
(Divided by two to get the half/center, of course)