Problem with picking up item and putting it back

0 favourites
  • 7 posts
From the Asset Store
For problem solving, puzzles, bubbles, platforms and other adventures.
  • Hi, I've got an issue with a cup item, you click it to put it on your mouse so that you can feed it to the character, and when you click the empty table it should go back onto the table, it works.. kind of.. when you click the table it doesn't work if your mouse is over where the cup would originally be, its like theres an invisible cup in the way. So to fix this I made sure to make a few different sprites and moved them off screen to guarantee that there is no cup in the way, but it still wont work.. I need someone whos good at going through crazy nonsense coding from a beginner and find a fix because after weeks of trying I cant do it.. is this the right place to ask? and is it safe to post a game? I can't post just the cup part because I think its some kind of inflicting thing with all the code.. so I'm not sure what to do. any responses would be appriciated though

  • Hey Jared,

    break it down to just the cup and the table and post it here and I will fix it for you (unless someone else gets to it first ). It should be a good example for others to learn from too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, I'm interested to help.

    Though, I will only be able to do this after monday...

  • Ok I guess the forum got rid of the easy attachment system so heres a dropbox of the capx.. https://www.dropbox.com/s/kqyxfo3vht6ee ... .capx?dl=0

    I took everything unnecessary out, but there are some items in there that seem to effect it if I delete them so just ignore the weird food and body parts lol its a weird game.

    Also! there is an easy fix, it's to change the collision points on the cup when picking it up to having no collision, buuuuut I can't do that because while the cup is in your hand, you need the same collisions to interact with the character.. so thats kind of where I'm at a loss. Thanks for taking a look! Lemme know what you find <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    And just a refresher, the problem is putting the cup back onto the table, just click it and click down again.. you'll see what I mean.

  • Hope this is what you are looking for <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    https://dl.dropboxusercontent.com/u/152 ... 0Test.capx

  • Almost! But it needs to be when I click on the cup itself, this one works if I click anywhere. although I might be able to do it myself, I'll have to mess with it more when I get off work, Thank you so much!

  • Here you go Jared.

    https://db.tt/lFyjJv62

    What you can do now is instead of having an active variable for every item you want moved, simply add all the objects you want to a family and then give the family itself the needed variables for movement. This will save you coding up the same behaviour for all the items.

    The other option is to have all the items in a single object.

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