How do I make droppable and pickupable items

0 favourites
  • 8 posts
From the Asset Store
Cartoon Funny Item Interface Sound Pack comes with 426 high-quality sound effects
  • I am working on a project currently and am not a noob with this engine. Yet I cannot seem to find a way to make a droppable item, and then pick it back up. I've tried using the Pin Behavior (all it does is make my guy not move and doesn't work) and there seems to be no other way.

    If there is some easy way to do this, great. If not, i'll still try. thanks in advance

  • Make sure your pin behavior is on the item, not the player. A simple system would be to pin the item to the player when you pick it up, and unpin when you want to drop it.

  • Depends on how you want to pick them up and move them. You could use drag n drop behavior.

    with pin behavior on event unpin

  • I'll try this out and let you know. Thanks!

  • I have it assigned to "E" to pin to my little guy. I want to make it so he has to be in a certain radius of it to pick it up, and also have it move into his hand, not just generally follow him. Is that possible?

    EDIT: I have tried to make it when the player is overlapping the item it will pick up, no dice.

  • Here you go, see if this helps

    https://www.dropbox.com/s/gf5pnjr3jcrwr ... .capx?dl=0

    Use arrow keys to move, pin is automatic when you run over the black dot, and press E to drop it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I see what you did there and it basically answeres my question. But I do have one more thing that bugs me for the sake of neatness, is there anyway to make it, when it pins, move to a certain point on the sprite? I know I could do it with a move object thing, but I want it to move there regardless of where the player is. Is that even feasibly possible with this engine?

    EDIT: Got it to work! I simply went and said to change the location to origin point of the object. Works like a charm now!

  • Great!

    Just an additional quick tip - you can add additional image points to a sprite besides just the origin point, and get those point positions via expressions for all sorts of uses. You can have different points/locations on different animation frames too.

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