Trying to create a Zoom Effect

Get help using Construct 2

Post » Thu Oct 13, 2011 1:43 pm

Ok what i've done is add some square sprites, then created a Global Variable called "Zoom", Told the system to add 1 every 1.5 seconds, Then every 1 second Sprite Set size to(sprite.width&Zoom, Sprite.Height&Zoom)
But all that happens is the sprites dissapear...

I was trying to give a topdown sky diving effect as the objects get bigger.



http://dl.dropbox.com/u/44766364/Zoomtest.capxtonycrew2011-10-13 13:44:51
B
40
S
15
G
11
Posts: 243
Reputation: 9,492

Post » Thu Oct 13, 2011 1:53 pm

& is a logical AND operator when used with numbers. Use * for multiply.

However, a better way would just be to use the 'set layer scale' action.
Scirra Founder
B
386
S
229
G
87
Posts: 24,207
Reputation: 191,582

Post » Thu Oct 13, 2011 3:01 pm

I've amended your .capx to show a quick way of using layer scale. Left mouse zoom in and right mouse to zoom out. Is THIS of any use?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
130
S
29
G
80
Posts: 5,267
Reputation: 55,966

Post » Thu Oct 13, 2011 10:16 pm

Wow thanks for this it's excactly what i was trying to achieve, was thinking about, Pilot Wings on the SNES years ago, and wanted to have a go at creating something similar, i know it used a Mode 7, but i thought sprite scaling and rotation would work very similar.

Is there a way of doing sprite scale and rotation..? Say you was flying INTO the screen things would scale and rotate individualy.
B
40
S
15
G
11
Posts: 243
Reputation: 9,492


Return to How do I....?

Who is online

Users browsing this forum: AmpedRobot, Google [Bot], Pariunos, sanderstyler and 2 guests