Zooming In And Scrolling to Player

This forum is currently in read-only mode.
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • Today i wanted to port my current work from C2 to CC, but there is a problem now.

    In Construct 2 i work with 8x8 Sprites and just do :

    On Start of Layout = Set Layout Scale to "4";

    to "zoom" in and make my game look closer to the camera.

    And in C2 i use the behaviour "SrollTo" on the player to make the camera follow him.

    How do i do that in CC as there is no behaviour like that .

    Thanks!

  • Luckily the "ScrollTo" behavior is simple, use the System Scroll To Object command in an "Always" event and choose your player object.

    As for zoom, you have the option of Set Zoom in the Display category or Layer category of System actions. The first zoom option is the whole game, the second one is for a specific layer and can be combined for cool effects if you wanted to experiment with that.

  • Luckily the "ScrollTo" behavior is simple, use the System Scroll To Object command in an "Always" event and choose your player object.

    As for zoom, you have the option of Set Zoom in the Display category or Layer category of System actions. The first zoom option is the whole game, the second one is for a specific layer and can be combined for cool effects if you wanted to experiment with that.

    Theres now a problem i cannot imagine where it came from.

    I fell blind ..

    Thats my Eventsheet.

    (Zooming works i assume from the debug)

    Scrolling not ?

  • That issue might be because the object is too close to the edge of the layout. Try turning on unbounded scrolling in the layout properties (so in right project side, click the layout, then on the left properties box check "unbounded scrolling").

    Then you can use invisible solid sprite (added as a checkbox under groups > attributes in object properties) objects for the borders instead.

  • That issue might be because the object is too close to the edge of the layout. Try turning on unbounded scrolling in the layout properties (so in right project side, click the layout, then on the left properties box check "unbounded scrolling").

    Then you can use invisible solid sprite (added as a checkbox under groups > attributes in object properties) objects for the borders instead.

    i really dont find out whats wrong, heres my .cap aswell..

    Would appreciate if you could find whats wrong

    http://dl.m1mk.de/private/NewPlatformer.cap

  • Hmm you are right, looks like this is a bug so you will need a trial-and-error workaround I think:

    You can keep the Set Zoom to (200,200) enabled instead of using layer for the "Start of Layout" event.

    The always event I find works well with System actions:

    Scroll to X: Sprite.X - (DisplayWidth / (ZoomX / 10))

    Scroll to Y: Sprite.Y - (DisplayHeight / (ZoomY / 10))

    This works well for 1024x768, but you might want to tweak the number 10 in that for smaller resolutions.

  • Hmm you are right, looks like this is a bug so you will need a trial-and-error workaround I think:

    You can keep the Set Zoom to (200,200) enabled instead of using layer for the "Start of Layout" event.

    The always event I find works well with System actions:

    Scroll to X: Sprite.X - (DisplayWidth / (ZoomX / 10))

    Scroll to Y: Sprite.Y - (DisplayHeight / (ZoomY / 10))

    This works well for 1024x768, but you might want to tweak the number 10 in that for smaller resolutions.

    But why does the normal way work for other users ?

    i treid it on different Computers with different CC Versions and ist always looking like this ..

    Anyone here who can fix my .cap ?

    The scroll just wont work , thank you for the alternative way but i want to get it to work in a simpler way like it was before

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • bump

  • From a quick look I saw that your sprite's hotspot is way off. Open the picture editor, select hotspot and press 5 on the num keypad to center the hotspot over your sprite. Confirm the change when closing the picture editor, then try again.

  • From a quick look I saw that your sprite's hotspot is way off. Open the picture editor, select hotspot and press 5 on the num keypad to center the hotspot over your sprite. Confirm the change when closing the picture editor, then try again.

    that solved it ! Thank you very much, i just havent looked at this thanks !

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