Just to complicate it more I want the wall to partially disappear when the main actor pass over a certain area and then return to normal when he leaves it.
Make a rule in the wall actor that when the main actor collides with it, change attribute: self.Color.alpha = .5. Otherwise Change Attribute self.Color.alpha = 1 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
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