How do I disable a Family

0 favourites
  • 6 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • In my current game I have two sets of buttons. Game buttons and Pause buttons.

    I have a global variable (pause) for a pause menu in my game to use the Pause buttons. When I enable the pause variable (by adding 1), I would like to disable a family with game buttons nested inside of it. When I am finished with my pause menu it sets the pause variable back to 0 and ideally, re-enabling the family with the game buttons.

    The current problem I have is I am able to play with Pause buttons from the pause menu at the same time as my game buttons. I would like the game buttons disabled during my Pause menu being active...

    I can't figure out a way to disable my game buttons family. Any suggestions out there?

    Tagged:

  • You would disable the click logic for the game buttons so wherever that exists add a condition 'pause = 0', that way they cannot be clicked when pause is 1.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I appreciate the reply. However, I don't understand how this answers my question. How do I disable the buttons/family/click logic?

    For example:

    If the variable, in this case is Pause.

    Event:Compare Variable:Pause=1/Action:Family-buttons/aaaand where is the click logic at?

    I can set the opacity of a family. I can rotate a family. I can set a color to a family. However...I can't disable a family. Is there a way to disable a family?

    Maybe if I was to swap my action from family to system I can see a group active option...I could disable a group. But how do I disable a family?

  • Presumably you have an event which is button family on clicked, do something. You add a condition to this event that must be true for the click to work.

  • If I understand correctly you are suggesting I find each button instance that needs to be disabled and attach the variable condition to it. In my case my variable condition is a global condition:"Pause"=1.

    Your suggestion does not disable a Family, but instead attaches a condition to each button residing in the family to be disabled.

    That will result in having to hunt down each instance of each button in each event sheet and attach a condition. I get what you are suggesting. I would rather not do that since that would be tedious copying and pasting that condition multiple times compared to disabling 1 family ideally 1 time, globally. If all those buttons are in a family, I'd like to disable the family. My question is, how can I disable a Family?

  • Nope that's not what I was suggesting, I said to use the global variable you have for pause as a condition to block out the button click event.

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