Bug detection height and width of sprite

Bugs will be moved here once resolved.

Post » Wed Oct 05, 2011 8:35 am

Hello, I am having trouble using events that uses expressions to get "Sprite.ImageHeight" or "Sprite.ImageWidth" this expression is returning to the width or height of the original image, and not the size that it is on screen.

For Example, my project have 25+ sprites, I'm using events that change the sprite size, when I use an expression "Sprite.ImageHeight" or "Sprite.ImageWidth" some other event!, it returns the original value of the image! And not the size that this sprite on the screen!

I am using Construct 2 Release 60 (32-bit)
B
2
G
4
Posts: 10
Reputation: 1,070

Post » Wed Oct 05, 2011 9:00 am

This isn't a bug. See the release log HERE, specifically:

"Sprite: ImageWidth and ImageHeight expressions (formerly 'OriginalWidth' and 'OriginalHeight' in Classic). Returns the size of the animation frame image, regardless of if the object has been resized."

If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,840
Reputation: 48,281

Post » Sun Oct 09, 2011 7:43 pm

Closing as not a bug: that's what those expressions are for. Use the Width and Height expressions to get the object's current size!
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests