Search code examples
game-maker

how to make sprites stick together in game maker?


I don't know how to get sprites to stick to each other so they become one big object instead of tiny little pieces, for example:

attaching a thruster to a box, then the thruster stays in that spot while pushing the box, and also is there a certain term for what I'm talking about?


Solution

  • You could also attach all parts to one of the objects, it would sort of look like:

    //Main object x = 5; y = 20;

    //other object step event
    x = obj_main.x + <any value to put it where you want>;
    y = obj_main.y + <any value to put it where you want>;
    
    //This will force the parts to follow the main object.
    

    `

    `