How to change actor color on trigger (when hit by another actor)
PaulJ
Member Posts: 1
I'm trying to make a pong style game where ball 'A' is controlled by a player to aim and shoot to hit other balls.
problem:
I want the balls that the player hit, to change color on contact. can someone help me set this rule?
thank you!
problem:
I want the balls that the player hit, to change color on contact. can someone help me set this rule?
thank you!
Comments
When Actor overlaps or collides with 'Player' . . .
Change Attribute: self.color.Red to AAA
Change Attribute: self.color.Green to BBB
Change Attribute: self.color.Blue to CCC
. . . . . . . .
AAA = a value between 0 and 1
BBB = a value between 0 and 1
CCC= a value between 0 and 1
So, if you want the ball to turn red you would use . . . .
Change Attribute: self.color.Red to 1
Change Attribute: self.color.Green to 0
Change Attribute: self.color.Blue to 0
Or pink . . . .
Change Attribute: self.color.Red to 1
Change Attribute: self.color.Green to 0.5
Change Attribute: self.color.Blue to 0.5
Or yellow . . .
Change Attribute: self.color.Red to 1
Change Attribute: self.color.Green to 0.75
Change Attribute: self.color.Blue to 0
. . . . etc etc
Link: https://www.mediafire.com/?b1u4ta5jinks5q7