Create a rubber/eraser like effect
Hi
I have recently created a pen like tool similar to the one in the game example: 'Drawer ORBZAMPLE'
But I need a rubber/eraser tool that can be used in-game by the user - what is the best way of doing this please????
I have recently created a pen like tool similar to the one in the game example: 'Drawer ORBZAMPLE'
But I need a rubber/eraser tool that can be used in-game by the user - what is the best way of doing this please????
Best Answer
-
MotherHoose Posts: 2,456
2 ways;
1. if you have gameAttribute: colorSelected
on eraserActor:
Rule: when
Event: touch is pressed
-changeAttribute: game.colorSelected To: drawing background color
2. or on the pen LineSegmentActor:
Rule: when
Event: overlaps/collides with eraserActor
--changeAttribute: self.Color.Alpha To: 0MH
Answers
I think I'll just scrap the rubber
so that other lines are intact … just the segment that user is dragging it to … change Alpha