Change opacity to an actor
MarkOnTheIron
Member Posts: 1,447
I want to make a rule that allow an actor (a wall) to become partially invisible when the main actor go behind it.
Is it possible?
Is it possible?
Comments
Similarly create a game attribute that when an actor is over an actor that covers your certain area in the game, that attribute is changed.
IN THE WALL ACTOR:
Rule: When actor receives event 'overlaps or collides' with (mainactor)
OR
--Change Attribute: self.Color.Alpha = .5
Otherwise:
--Change Attribute: self.Color.Alpha = 1
Rule: When Attribute game.InArea = true
OR
--Change Attribute: self.Color.Alpha = 0
Otherwise:
--Change Attribute: self.Color.Alpha = 1
IN THE AREA ACTOR:
Rule: When actor receives event 'overlaps or collides' with (mainactor)
OR
--Change Attribute: game.InArea = true
Otherwise:
--Change Attribute: game.InArea = false