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
45
S
8
G
4
Posts: 414
Reputation: 6,805

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
45
S
8
G
4
Posts: 414
Reputation: 6,805

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
62
S
26
G
12
Posts: 122
Reputation: 11,330


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests