Multiple sprite question

Get help using Construct 2

Post » Sun Nov 18, 2012 10:52 pm

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!
Twitter: https://twitter.com/pudgyplatypus

Learn to make a clicker game for cheap!
https://www.scirra.com/store/games-with ... e-game-666

Try out Pixel Golf on the Scirra Arcade!
https://www.scirra.com/arcade/sports-ga ... el-golf-67

Pudgy Platypus Games website!
www.pudgyplatypus.com
B
53
S
16
G
5
Posts: 206
Reputation: 6,826

Post » Sun Nov 18, 2012 11:46 pm

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.
B
57
S
20
G
7
Posts: 305
Reputation: 8,779

Post » Mon Nov 19, 2012 12:05 am

Very cool, those sound like great suggestions. I will try that, thanks!
Twitter: https://twitter.com/pudgyplatypus

Learn to make a clicker game for cheap!
https://www.scirra.com/store/games-with ... e-game-666

Try out Pixel Golf on the Scirra Arcade!
https://www.scirra.com/arcade/sports-ga ... el-golf-67

Pudgy Platypus Games website!
www.pudgyplatypus.com
B
53
S
16
G
5
Posts: 206
Reputation: 6,826

Post » Mon Nov 19, 2012 3:18 am

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?
Twitter: https://twitter.com/pudgyplatypus

Learn to make a clicker game for cheap!
https://www.scirra.com/store/games-with ... e-game-666

Try out Pixel Golf on the Scirra Arcade!
https://www.scirra.com/arcade/sports-ga ... el-golf-67

Pudgy Platypus Games website!
www.pudgyplatypus.com
B
53
S
16
G
5
Posts: 206
Reputation: 6,826

Post » Mon Nov 19, 2012 5:24 am

Is it possible you can create an example of this portion of your project and post it? I'd like to tweak with it.
B
20
S
4
G
2
Posts: 124
Reputation: 2,482


Return to How do I....?

Who is online

Users browsing this forum: benajad, Braus, R0J0hound, shinkan and 24 guests