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
47
S
9
G
4
Posts: 421
Reputation: 6,959

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
47
S
9
G
4
Posts: 421
Reputation: 6,959

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
73
S
27
G
12
Posts: 124
Reputation: 11,709


Return to How do I....?

Who is online

Users browsing this forum: Carlafnt, dokthor, Forioga, jhendy, the_Shit_hawk and 8 guests