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
14
G
11
Posts: 243
Reputation: 9,432

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
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

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
120
S
28
G
68
Posts: 4,844
Reputation: 48,289

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
14
G
11
Posts: 243
Reputation: 9,432


Return to How do I....?

Who is online

Users browsing this forum: BipolarMike, totoe and 15 guests