Hi,
So I have a bunch of sprites on screen, clicking on each of them should cause it to be enlarged (while keeping same width:height ratio) so that their width fills half the viewport width (and their height is automatically changed to keep original proportions).
Any ideas how should I go about achieving that?
Thanks!
Any tips?
dop2000R0J0hound?
Develop games in your browser. Powerful, performant & highly capable.
Try this:
Sprite set scale to (ViewportWidth(Sprite.layerNumber)/2)/Sprite.ImageWidth
Will try. Thanks for the response! :)
Works perfect! Thanks again.
Any idea how can I implement it as part of tween to change the scale? where I need to specify the change in scale for the X and Y separately?
where I need to specify the change in scale for the X and Y separately?
Not sure what you mean. To change both scale X and Y, use "Tween two properties" action. And put the same expression to both fields.
To change one - use "Tween one property".