Groups vs Functions (zooming)

Get help using Construct 2

Post » Mon Sep 23, 2013 12:41 am

I'm trying to implement the cinematic zoom defined in this tutorial within functions rather than groups:

https://www.scirra.com/tutorials/254/cinematic-zoom

The reason for this is that I plan to pass in parameters to speed up/slow down the zoom based on the values of certain instance variables.

The problem is on turning this into a function, the code executes only once so zooms in/out partially on a key press rather than fully. Tried placing a the zoom value check in a while condition but it still only seems to execute once.

Any suggestions or alternative approaches appreciated.
B
5
S
1
Posts: 44
Reputation: 665

Post » Mon Sep 23, 2013 2:54 am

Put the function call in a loop, or call it while a variable has a certain value. For example, if X=5 Call function. As long as X=5 then your function gets called every tick...
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,573


Return to How do I....?

Who is online

Users browsing this forum: AndreasR, Mayfly and 16 guests