I'm thinking about using diferent object for example for a player and his sword, this way each one can have it's bounding box and collide with it's needings.
Question is, how do you superpose player and weapon?
My first thought is to have both objects have the same animation width and height so you can use same coordinates for the two objects and not have to hardcode weapon positioning. Any thoughts?
It's interesting to code it this way - in fact I made the player and his sword two different metasprites but the same "object" in my game project - but the player isn't a general purpose object but is hardcoded his own way.
I think you should copy the sword's position to the player's position every frame so that it "folllows" him (effectively making it looks like it's carrying it).
Yeah, that's what Clickteam products do. Each frame of animation has a "hot spot" and an "action point". When an object animates, it moves such that the current frame's hot spot lines up with the previous frame's hot spot. And when an object travels to another object, it can be set to align its hot spot with the other object's hot spot or on the other object's action point. In a case where you're attaching a weapon object to a player character object, the player's hot spot might be between the feet, and the action point would be on the hand. The weapon's graphic would have its hot spot on the grip, and that would be moved to the player's action point to put it in hand. One might even consider such a multi-part object to be made of "bones" with the hot spot at one end and the action point at the other.