0 Favourites

Many sprites move as one

  • I've got a row of 10 sprites, and I want them all to spawn at the top of the screen, wait a few seconds, move down into the next row, wait, go active, die, respawn back at square one and just keep repeating this sequence. Problem is I don't know how to make them all move without having 30 different sprites.

  • Have you tried having an invisible sprite placed in the direction that you want your 10 sprites to move, and then using a move-toward action/event?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Have you tried having an invisible sprite placed in the direction that you want your 10 sprites to move, and then using a move-toward action/event?I have not, but I want to have them all spawn back at the top once they're dead. I could do that to have them move down, but is there something that will do both move them down and get them to spawn back when they're destroyed?

  • Maybe you could try using families/Containers for such a movement....

    alternatively you could be able to use the pin behaviour to pin your sprites to an invisible Controller sprite and move just the Controller downwards...when it reaches the bottom and gets "destroyed" you just Trigger your Actions (i.e. add a value to the score) and set the Controller sprites Location to the top again to "respawn"

  • Maybe you could try using families/Containers for such a movement....

    alternatively you could be able to use the pin behaviour to pin your sprites to an invisible Controller sprite and move just the Controller downwards...when it reaches the bottom and gets "destroyed" you just Trigger your Actions (i.e. add a value to the score) and set the Controller sprites Location to the top again to "respawn"

    Wouldn't this require you adjust each and every sprite to be a set distance away from the sprite, unless you have 30 sprites, each assigned to a enemy? I only have the free version.

  • Are you thinking Galaxians style do attack get back to formation?

  • I've got a row of 10 sprites, and I want them all to spawn at the top of the screen, wait a few seconds, move down into the next row, wait, go active, die, respawn back at square one and just keep repeating this sequence. Problem is I don't know how to make them all move without having 30 different sprites.

    Can't you set the enemies to a family then set them to bullet, then set there angle of motion to 270. You can then have an expression like:

    Event---> System: enemiesfamily.Y > What Ever Vertical Distance You Choose

    Action---> enemiesfamily destroy

    Event--->enemiesfamly on destroyed

    Action---> create object enemies at position (n,n)

          --->set angle of motion to 270

    repeat-->10 times

    n=the position you want them to respawn at

  • > I've got a row of 10 sprites, and I want them all to spawn at the top of the screen, wait a few seconds, move down into the next row, wait, go active, die, respawn back at square one and just keep repeating this sequence. Problem is I don't know how to make them all move without having 30 different sprites.

    Can't you set the enemies to a family then set them to bullet, then set there angle of motion to 270. You can then have an expression like:

    Event---> System: enemiesfamily.Y > What Ever Vertical Distance You Choose

    Action---> enemiesfamily destroy

    Event--->enemiesfamly on destroyed

    Action---> create object enemies at position (n,n)

          --->set angle of motion to 270

    repeat-->10 times

    n=the position you want them to respawn atFamilies require the full version of C2, so they aren't an option for me.

  • Use 1 base sprite, copy and paste. If you want different images, use either different frames or instance variables and different animations.

    Set Sprite.Y to Sprite.Y + distance per second * dt

    where dt is DeltaTime.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
564 105,179
rexrainbow's avatar
rexrainbow
Unread hot topic
0 Favourites
Sprite Font Generator - v3
368 112,268
RetroDaddy's avatar
RetroDaddy
Unread hot topic
86 28,702
St4rDu57's avatar
St4rDu57