Cloned Object + Sprite Edit = Pandemonium

For questions about using Classic.

Post » Sun Nov 23, 2008 10:49 pm

Okay, here's the backstory.

When I started out, I just used green boxes of various widths as placeholder platforms. These, obviously, could just be a single object stretched to various widths, as the sprite was just a green box.

Fast forward to now, when I have unique sprites for each different-width platform. Stretching the sprites for one just looks terrible, so I need several different objects. I used Paste Clone on the basic platform several times, and now have several platforms which should be allowed to take different sprites and be placed where the old stretched ugly ones were.

The problem is this: Whenever I change the sprite on one platform, it changes the sprite on every object that was cloned from the original platform, that is to say, every platform. So I cannot in fact have unique sprites with this approach at all. Considering this, I was just wondering what the exact purpose of Paste Clone even is, if it does not differ in any noticeable way from straight Paste.

I'm aware that, in the time it took to type this post, I could have just made seven new objects, made them solid, and given them a width and height. The problem isn't really just here, because this just seems like a weird design issue, unless there's something I'm not understanding. It'd be great to be able to have objects that have different sprites and the exact same behavior. I would hate to hard-code every single enemy in an RPG.
B
1
G
4
Posts: 3
Reputation: 1,031

Post » Sun Nov 23, 2008 11:01 pm

Paste Clone is there so you can copy and paste an objects graphical data. IE animations.

If you want several objects to share the same events, but have different graphics, experiment using Families.

You can create a family, or use an existing one like Terrain for example, and apply events to this:

[code:2uhbb17y]
+Player collides with "Terrain"
- do stuff
- do other stuff
[/code:2uhbb17y]

Rather than having to make new code for each object, you just assign the Family to the object and the rest is taken care of :)

*EDIT*
YAY 700 Posts :D

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Mon Nov 24, 2008 12:49 am

Here's what you do:

Keep your plain green platforms. I make mine out of square BG Tiles so I can easily see the grid when I stretch them.

Then you make your decorative tiles separately, without any collision:



Put all your decorative tiles on a layer above the actual platforms. Easy.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Nov 24, 2008 1:59 am

i suggest what deadeye says, because with said system your character wouldnt walk around on rocks or "high grass" in your background graphic. u shouldnt ever use actual sprites for collision detection unless its called for, or else your player could hang by his nose xD or something like that.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Mon Nov 24, 2008 2:22 am

Not to mention it's easier to code for. You only have one or two different things to detect rather than 20 or 30 (yeah, you could use Families but if you don't have to then why bother?).

It's also much easier to build levels that way. It's easier to move instances of one object around for testing, rather than 20 or 30. And when your level is how you like it, you put the decorations on after.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Nov 24, 2008 3:31 am

Paste clone is broken. It's meant to make a copy of the sprite's images, so when you edit it, you don't affect any other types (as you would expect). I don't know why it's not making a copy - somehow it's just referencing the old images. But you're right to be surprised :P Hopefully it'll be fixed soon.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Mon Nov 24, 2008 4:38 am

Huh? I thought it was supposed to work that way :P

But yeah, I think the fixed way would be more useful :)
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Nov 24, 2008 6:33 pm

[quote="Ashley":140629x4]Paste clone is broken. It's meant to make a copy of the sprite's images, so when you edit it, you don't affect any other types (as you would expect). I don't know why it's not making a copy - somehow it's just referencing the old images. But you're right to be surprised :P Hopefully it'll be fixed soon.[/quote:140629x4]


could you please leave it the way it is???? and make a new option called paste new copy or sumthin like that for what paste clone is supposed to do.

i say this because paste clone the way it is now is actually quite usefull, when you want multiple objects that all share anim frames, fixing it would break a lot of games that need it.

it has streamlined the process of making animations in some of my games because now i only have to edit one object instead of 3, or 30. the way it is now is way more useful than the way its supposed to be. its amazing for making level editors and things like that (what i use it for) please make a new option for its intended purpose instead of overwriting the current one
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests