How do I re scale an object over time

Get help using Construct 2

Post » Wed Mar 08, 2017 4:36 pm

i want an object in scene to reduce its scale every second. i used: every 1 second / set scale to "vida.height-5" but what i get as a result is a brief screenshot of the object at full scale (i think at the actual size of the object which is 400pixels x 400 pixels ) and then disappears, and repeats every 1 second until it completly stop after like 6 seconds. it's like it detects the virgin object and pastes it on screen.
help :roll:
B
5
Posts: 31
Reputation: 291

Post » Wed Mar 08, 2017 5:02 pm

scaling sprites seams to act relative not absolute.
To scale a sprite smooth declare a object variable e.g. myscale (initial set to 1) and reduce this every second by e.g. 0.1
Save the initial width/height of the/each sprite in an object variable at startup.
The each second set the sprites width to sprite.initial width * myscale and the the sprites height to sprite.initial height * myscale

something like this http://www.gameus.de/c2/downscale.capx
Image Image Image
B
42
S
22
G
15
Posts: 372
Reputation: 12,215

Post » Wed Mar 08, 2017 5:07 pm

Instead of scale I would recommend using the size of the object.

You can reduce height and width using Size of object each second or every tick.

Scale is primarily used when you are also scaling the layout so objects appear the correct scale.
Banned User
B
23
S
6
G
58
Posts: 1,229
Reputation: 34,540


Return to How do I....?

Who is online

Users browsing this forum: sublimate and 10 guests