Placement of sprites outside the layout.

0 favourites
  • 3 posts
From the Asset Store
Build your map with these isometric objects and terrains
  • Hey all,

    I have tutorial capx on menu button animation, as in how to bring the buttons in and out of the screen. Say i want the button's Y coordinate to be 500 at all times with varying X as it moves into the screen. So in the capx, it has an 'on start of layout' event giving an action to place the sprite at (for example) X:1000(outside screen),Y:500. So i would only need an event that varies the X coordinate to the desired value to bring it into the screen rather than having to bother with the Y coordinate as well.

    I want to know if the 'on start of layout - place sprite in x, y' event is necessary. I mean i could just manually place the sprites on X:!000,Y:500 on the layout and i would not need that event.Every time i run,the sprites would be where i put them. If i didn't bother with having that on start of layout event would it affect the sprite's position on the layout if i exported the project to mobile platforms?.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can't imagine why it would matter, but you could always have it there and then have an event move it just in case.

  • Most people put them just outside somewhere manually and be done with it.

    However there is one distinct advantage of placing the starting position procedurally: If you have varying screen sizes (for example if you cover desktop and mobile aspect ratios within the same game) and you always want to start the button from say: 100 pixels right of your window, it's better to place them with an event.

    A possible reason for wanting that (and not just put them somewhere the window will never reach them, like 10000 or so) could be that you want the button to appear at the same time on all platforms and screen ratios. If it was far out, it might be a couple of seconds until it becomes visible, depending on how everything is set up.

    So if it matters or not - it all depends on your project and what you need it to do.

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