To to compute current scale amount of a Sprite

Get help using Construct 2

Post » Tue Mar 19, 2013 2:12 pm

Hi everyone,

What formula would I use to get the current scale of a sprite, and why is this not a built in function to go along witt the set scale action? Or maybe I'm just missing something...

thanks
B
49
S
9
G
4
Posts: 426
Reputation: 7,041

Post » Tue Mar 19, 2013 2:27 pm

For those who'd like the equation, its dividing its (current) height or width by the original (image) height or width.

It doesnt take too long to do this way, of course, but as theres a set scale action, and you can already retrieve layer scales, it seems missing and a bit inconvenient for retreiving a sprite's scale to be missing.
B
49
S
9
G
4
Posts: 426
Reputation: 7,041

Post » Thu Mar 21, 2013 7:08 am

I couldn't find an expression either, but "Sprite.Width/Sprite.ImageWidth" should do the trick for this.
B
78
S
28
G
12
Posts: 128
Reputation: 11,942


Return to How do I....?

Who is online

Users browsing this forum: dand, mageekm, oosyrag, Yahoo [Bot] and 31 guests