Create a rubber/eraser like effect

JagonAppsJagonApps Member Posts: 241
edited April 2012 in Working with GS (Mac)
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????

Best Answer

  • MotherHooseMotherHoose Posts: 2,456
    Accepted Answer
    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: 0

    image MH

Answers

  • JagonAppsJagonApps Member Posts: 241
    Thanks I tried your second suggestion but ran into issues that are not directly related.

    I think I'll just scrap the rubber :D
  • MotherHooseMotherHoose Member Posts: 2,456
    … sorry … forgot … the brushSize for the eraser should be very small…
    so that other lines are intact … just the segment that user is dragging it to … change Alpha

    image MH
  • JagonAppsJagonApps Member Posts: 241
    k thanks
Sign In or Register to comment.