How do I activate only one instance of a sprite that is all over my layout?

0 favourites
  • 5 posts
From the Asset Store
Plugin Transition Layout C3. Layout opening and closing animation for C3. Quickly set up transitions between lay
  • I feel like I'm asking a really stupid question but I cannot for the life of me figure this out. I have multiple doors throughout my levels. When the player switches certain levers, those levers should open certain doors. BUT, I can't get it to work without ALL the doors beginning the open animation. Do I have to make multiple sprites in order to accomplish this? I know there has to be an easier way than that, and I'm going to feel really dumb when someone points it out to me. Thanks in advance for your help! :)

  • you could give the doors an instance variable "DoorName" and give each door a unique name, then give the switches an instance variable to hold the name of the door that each one opens.

    when the player clicks a switch, have a condition that picks the door with the name contained in the switch's variable...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'd use the object's UID. Each instance of the door has it's own unique ID number. You can call that specific instance using the UID, then apply the door open logic to that instance.

  • The UID option worked perfectly! Thank you!!!

  • The UID option worked perfectly! Thank you!!!

    Awesome! Glad it worked!

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