Multiple sprite question

0 favourites
  • 5 posts
From the Asset Store
Be quick and choose the right answer for the shown equation.
  • Hey everyone!

    This is my first post but i have lurked around the forums for about a month now and have to say you guys have a great atmosphere here and I'm glad to be here!

    My question is more of a what would you think would be the best option question.

    Say you have multiple sprites, that can be drag and dropped and then pinned to a main sprite (think a space ship and wings, etc). How would you go about keeping track of this "pinned" together frankenstein sprite/s?

    Like one layout lets you put certain sprites where you want as your ship, then when your done you use that ship to shoot stuff. How would you keep track of where those items were pinned?

    Any kind of suggestions or ideas would be great! Thanks!

  • One option is turning all of those objects into global objects. They will persist from layout to layout. Just don't spawn them more than once without destroying any unwanted instances first.

    Another option is to forgo pinning in favor of setting each piece to a specific image point on a larger body, and reloading the objects that way on start of layout. Of course, you can also use a combination of the two.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Very cool, those sound like great suggestions. I will try that, thanks!

  • Ok maybe one other question.

    I made all the sprites global that I would want to pin to the main sprite, i got all the scripting done for pinning the sprites but what is the best approach to show this on a different layout?

    I added a button and it goes to a new layout I made and then creates the main sprite that would have other sprites pinned to it. Is "spawning" a new one not the right way to keep them all together?

  • Is it possible you can create an example of this portion of your project and post it? I'd like to tweak with it.

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