Actor visibility won't change

I have an actor whose visibility is by default set to true. When an attributes changes I've set it to change self.Graphics.Visible to false. The problem is that all this does is change the text the actor is displaying to invisible, and the actor itself is still there.
Any ideas as to how I could fix this?

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Why not just change self.color alpha to 0? Give that a try.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Hi @redleaf the Visible attribute can't be changed during runtime anyway, so use Alpha as @Braydon_SFX suggests. :-)
  • redleafredleaf Member Posts: 10

    Hi @redleaf the Visible attribute can't be changed during runtime anyway, so use Alpha as @Braydon_SFX suggests. :-)
    That is good to know and does solve the visibility problem. The issue now is that the actor is still active, and touching it still triggers an event that I don't want to happen unconditionally. Is there a way I could also disable the button?
  • redleafredleaf Member Posts: 10
    There may be a better way, but I just set the width and height to 0 and it became impossible to touch. Problem solved!
  • sparkaniasparkania Member, PRO Posts: 300
    cool trick!
  • SocksSocks London, UK.Member Posts: 12,822
    There may be a better way, but I just set the width and height to 0 and it became impossible to touch. Problem solved!
    . . . or just move it off screen, or simply destroy it.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited January 2013

    ....or put the rule: When self.Color.Alpha =1 in the touch Rule...
Sign In or Register to comment.