Wait and camera

This forum is currently in read-only mode.
From the Asset Store
Simple and easily editable template for a dynamic camera that zooms in and out based on how far apart the players are.
  • Hi,

    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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)