Make an object pinned and follow another

0 favourites
  • 8 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hello!

    I was wondering how to pin an object to another one and make it follow it.

    The idea is to spawn it in players arms, and make it look like the player is carrying it. So the object moves with the player.

    Thanks.

  • Add the "pin" behavior to your prop object,

    then create an image point on your sprite where you want the object to be pined to eg: his hands

    then use the action "pin to" on the prop in your event sheet to attach it to the arm image point

  • Add the "pin" behavior to your prop object,

    then create an image point on your sprite where you want the object to be pined to eg: his hands

    then use the action "pin to" on the prop in your event sheet to attach it to the arm image point

    It works, but I can't find image point in the "pin to object" action.

    There are modes like "Position & angle", etc.

    Any ideas?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi dino000. You can use invisible sprites like helpers. Add an event "system:every tick: set position to another objet" for each invisible helper. Then pin your stuff to the helpers

  • Imagepoint is something you set in the image and animation editor.

    Then you use the common expression object.ImagePointX(index) or object.ImagePointY(index) depending on the position you're looking for.

    Before pinning the object, you set its position to the imagepointX/imagepointY location first.

  • Imagepoint is something you set in the

    Then you use the common expression object.ImagePointX(index) or object.ImagePointY(index) depending on the position you're looking for.

    Before pinning the object, you set its position to the imagepointX/imagepointY location first.

    I did it. But my problem is that when I pin an object to another, it sets it to origin and not to image point.

    I've sent you a link of my dropbox with my project, if you wouldn't mind looking at it.

  • Your player "Walking" animation's frames have no imagepoint(1).

    Add this imagepoint in each frame and the game works as intended.

    Prefer sending capx rather than compressed folder (a capx is basically already a zip file of the folder) and prefer to post your project (are at least a reproduction of the issue) in public rather than sending in PM, more people can give more help quicker.

  • Your player "Walking" animation's frames have no imagepoint(1).

    Add this imagepoint in each frame and the game works as intended.

    Prefer sending capx rather than compressed folder (a capx is basically already a zip file of the folder) and prefer to post your project (are at least a reproduction of the issue) in public rather than sending in PM, more people can give more help quicker.

    Oh, thank you very much.

    I wanted to post my link here, but apparently I do not have enough reputation points.

    Sorry about that.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)