How can I bind an object to the player.

0 favourites
  • 6 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • Hello Community!

    I'm about to create a character menu in my game. You can find and wear weapons and equipment. Now slowly the following problem arises: Everything you equip ingame on the character to be seen. But if I only have one image as a player, I have to add a thousand or more combinations as images (animations ...)

    For example:

    There are 3 armors and 3 weapons. Each armor can be combined with any weapon. 3 x 3 = 9. So I would have to draw 9 combinations with only so few items. 20 armor and 20 weapons = 400 images.

    Question:

    Is there a function where I can bind an object (own picture / sprite) to the player. When he moves, the weapon does the same thing at the same time.

    Then I would always only need to adjust the image of the weapon / armor etc.

    Or do you have other solutions? :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can pin the weapon sprite in a specific image-point it the characters sprite. This is what most games do ('Enter the Gungeon' is a good example). Then you would treat the character and the weapon separately as they are separate objects.

    For this you may use the 'Pin' behavior in the weapon. To pin to an specific image-point you first set the position of the weapon to the player's image point, and then you pin it.

    Let us know how it turns out;

  • Exactly what Isaac posted. Keep on mind that 0º is the object facing RIGHT, so all your sprites should be pointing this way. Also, about image points, they are really important for this. I suggest you google some examples if you struggle.

  • thank you! I will try it, but now i have some exams... Need a few days. I will let you know how it turns out. :)

  • THANKS!! It works fine. Im happy now :D The Construct 3 Community is really great! Do you know how to change the look of the mouse in the game?

  • THANKS!! It works fine. Im happy now :D The Construct 3 Community is really great! Do you know how to change the look of the mouse in the game?

    Yes, we are awesome!

    The Mouse object has a 'Set cursor from sprite' action.

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