Camera Movement

This forum is currently in read-only mode.
  • Is there a way to move the "camera" using keys for example? I have a map bigger than the layout and I want to move the camera free. The game is a "strategy" and I cannot use the "following object" feature

    I found this plugin:

    but I want to know if there is another way..

  • Well, I'm sure you could use the camera plugin if you wanted, but you can use the normal method too.

    Just have the screen follow an invisible sprite that's controllable with the keys.

    Then you can move the camera around your layout during the game.

    You can also set it up to use both, by having the camera set on either the player character or the invisible sprite, like so:

    If global(camstate)=1

    Follow player character

    Else

    Follow Invisible sprite

    Krush.

  • I see. I think I use the plugin because is really easy. I only wanted to know if there is some other methods

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You don't even need an invisible sprite if you don't want to use one. Just add/subtract from a couple of global variables and scroll to those values.

  • You don't even need an invisible sprite if you don't want to use one. Just add/subtract from a couple of global variables and scroll to those values.

    Good point!

    I'll make a note of that.

    Where did I pick that nasty habit up from?

    Krush.

  • You don't even need an invisible sprite if you don't want to use one. Just add/subtract from a couple of global variables and scroll to those values.

    and how to scroll?

  • "Scroll to X" and "Scroll to Y." They're System actions.

  • its strange because i tried them and did not work first time.. now are working

  • Construct will never scroll past the layout unless you have Unbounded Scrolling activated in the Layout Properties.

    Maybe you had a window the same size of the layout when you first attempted to scroll?

  • no. i am pretty sure my layout was big because, i use for the background a "map" and that was the first time when i sad myself: i need to scroll around

    anyway right now i am using the camera plugin and i am very pleased.

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