Okay then From the top (no pun intended):
First, create your sprite:
<img src="http://i30.tinypic.com/21lmq7d.jpg">
Easy enough. But it's likely your sprite is animated. If you use per-pixel collisions for detecting the background, it will cause problems because one frame might be clear of the background, but the next frame could intersect. Here's all the top frames visible at once:
<img src="http://i29.tinypic.com/2rxtd0n.jpg">
The tilted frames only deviate by a couple of pixels, but that's enough to make collision problems occur. Using Bounding Box collisions on the sprite would make the collision area too large, and would cause problems with player collision or look funny when it's being smashed. So we need to make a separate collision sprite as a surrogate:
<img src="http://i27.tinypic.com/2nsqljo.jpg">
I've sized it at a nice, "average" size for the top so collisions will appear more consistent. I've also added a registration point to the tops and the mask so that it'll be easy to line up the hotspots when I put them in Construct.
From there it's just a matter of importing your top frames into one sprite, and your collision mask into another sprite.
We want to do all the movement actions on the collision sprite itself (the topBody object in the game) and tell Construct to align the animated sprite on top every cycle. If you have only one instance of each, that's no problem, just put in the events and go. But if you want more than one at a time, you need a way to distinguish between sets of "sprite" and "body." Otherwise, when you do this:
+ body is overlapping weapon
[ul]
[li]sprite: Destroy[/li]
[li]body: Destroy[/li]
[/ul][/code:3rpst3l9]
then that one body will destroy, but so will [i]all[/i] the sprites.
To fix this, you can pair up the sprites with the bodies by using Containers. According to Ashley:
[quote:3rpst3l9]
If any object is picked by an event, the rest of the objects in its container are also picked.
So that means if I want to pick a specific body, and "sprite" is in the same container as "body," Construct automatically knows which sprite to pick.
To put something in a container, click on the object and open the Containers section in the properties. Click "Add object," and select the object you want to pair up:
<img src="http://i32.tinypic.com/bjg5rk.jpg">
Notice that the topSprite is highlighted yellow when the topBody is selected. This is to indicate which pair it belongs to:
<img src="http://i25.tinypic.com/104m446.jpg">
When you're using containers, you have to make sure you have an equal number of contained elements. If I have five topBodies, I need five topSprites to match.
Anyway, now we can go back to making events. If we want to align a sprite with it's specific body, just do this:
[code:3rpst3l9]
+ objectBody condition
[ul]
[li]objectSprite: Set position to objectBody[/li]
[/ul][/code:3rpst3l9]
Construct places the correct sprite on top of the body that it's paired with. And if we want to destroy it:
[code:3rpst3l9]
+ objectBody overlaps something dangerous
[ul]
[li]objectSprite: Destroy[/li]
[li]objectBody: Destroy[/li]
[/ul][/code:3rpst3l9]
Construct only destroys the sprite that's paired with the body that is picked by the condition.
I hope that made some kind of sense.