How do I click cupboard

0 favourites
  • 7 posts
From the Asset Store
High quality sound effect pack, in the following categories: Simple, negative, pozitive
  • Hello guys I was just wondering how do I make a cupboard? What I was trying to make is when you right click the cupboard it opens and then the object Coat spawn is it. Then you can right click the coat once the cup board is open and put it on your self (image point). But when I right click on the cupboard it spawns another coat inside it?

    I'm also confused on how do I make so that I can close the cupboard and the item wont spawn there again as It already been looted.. Here is what I did:

    Thank you for attention!

  • While right-clicking on armycoat, you are also rightclicking on the cupboard, so you should add a condition to the first event to prevent it from running when you only want the second event to run..

    adding a is animation cupboardopenempty not playing, should do the trick..

  • Ahh thanks! It was pretty easy Too much construct 2 I guess ...

    EDIT* But If I want it to close on the right click how do i prevent spawning the coat after when I open it again?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Something like this should work:

    Give the cupboard a boolean-instance variable CoatTaken.

    add set boolean to yes when taking coat..

    add a subevent to the cupboard rightclick event

    cupboard is not Coattaken- spawn coat

  • LittleStain I did a better cupboad so now it opens and closes but I didnt understood what you mean by the veribles where you place them sorry...

    But here is what I got so far


    maybe it's easier that way? Thank you!

  • Here: ... roved.capx

    you can now open and close the cupboard with the coat still in it and open and close it after the coat is taken out..

  • Thank you for explaining! I got it now

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