Wait and camera

For questions about using Classic.

Post » Mon Aug 29, 2011 5:44 pm


Here is my problem. I would like a camera that zooms in on my character when it has not been moving for x seconds.

I tried with a "wait", but it gives me strange results.if I move the character before the zoom is finished, the zoom stops, and the next time the character stops moving, the zoom begins again instantly, without waiting X seconds.

Currently I use magicam with 2 cameras, and "switch" between them.
Posts: 8
Reputation: 491

Post » Mon Aug 29, 2011 7:11 pm

The way I would do it is to have two variables, one for checking if the character is doing anything, let's call the variable 'idleCheck' and the other for a countdown, 'idleCount'.

So you set up so that whenever the player does 'anything' you change idleCheck to 1 (or true or yes, whatever works for you) and when the player doesn't do anything it reverts back to 0.

Now, when idleCheck equals 0 you start adding to idleCount, effectively counting upwards, and when the number goes beyond whatever amount suits the time you want you start your zooming event. If idleCheck turns to 1 (player does something) you set idleCount back to 0 and reset your zoom.inkBot2011-08-29 19:11:31
Posts: 524
Reputation: 9,896

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests