How do I create an actor that "blocks" other actors from being touched

I have multiple rows of actors, and I'm trying to "activate" one row at a time (the bottom row).
so it's like:

XXXX
XXXX
XXXX <- activated.

When activated, the actor can receive touch input, otherwise, it's immune to touch/changes.

My initial thoughts were that if I put an actor to "block" the ones behind it, then I can inactivate that way. Kind of stumped on this. Anyone have an idea of how I could do this? Thanks!

Best Answer

  • MentalDonkeyGamesMentalDonkeyGames Posts: 1,276
    Accepted Answer

    You're better off using an attribute to determine if the actor can be touched or not.

    Make a self attribute. Call it CanTouch or something.

    In the touch rule, add a condition that says when self.CanTouch is true.
    And when you want to deactivate the button, just turn self.CanTouch to false.

    Mental Donkey Games
    Website - Facebook - Twitter

Answers

  • IntellimigentIntellimigent Member, PRO Posts: 8

    @NipaGames said:
    You're better off using an attribute to determine if the actor can be touched or not.

    Make a self attribute. Call it CanTouch or something.

    In the touch rule, add a condition that says when self.CanTouch is true.
    And when you want to deactivate the button, just turn self.CanTouch to false.

    Thanks Nipa, seems like you're everywhere :smiley:

    I took some of your advice on booleans and solved it. Basically took the boolean and set it to true for the touch rules, and had it so that if it were above a certain Y position, then it would be false. Thanks!

Sign In or Register to comment.