How do I create a sprite at a minimun Y of another one

0 favourites
  • 6 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Hi all!

    I wonder how do I create a Sprite at a minimum distance of another one, I have a vertical sprite where the smaller sprites should be created (so same X for all of them but different Y) and they need to be at a minimum of 100px (or some) in Y axis

    I tried creating an invisible sprite at imagepoint 0 to make an "aura" where the next sprite cant be placed, but when i have to many sprites in an android device it lags a lot

    Thanks!

  • try something like:

    vertical sprite ; spawn small sprite (this will create a new copy of the small spite at the location of the vertical sprite)

    small sprite ; set y to self.y+100

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • that's the problem, I can not create too many sprites because of the performance

  • the player is the white circle, who is supposed to go throught the black sprite verticaly but when I draw a line between two black sprites and the player collides with the line, the player changes his angle and follows the line, and then back to the black sprite angle to go up again.

    The matter is that in android devices (where the game runs not as fast as in computer) sometimes the player ignores the line and keep going upward (I suppose its because of a little "lag jump")

    Any way to fix it? I think by increasing line.width...

    Thanks again and excuse my english

  • Bump

  • you could also just alter the size of the lines collision polygon

    or

    you could store the positions of where you have touched on the vertical line (in an array ?) and when the player is over/close to these positions then alter the players angle...

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