How to make an actor auto-resize itself from the background to the foreground

NicholasSeahNicholasSeah Member Posts: 68
edited January 2012 in Working with GS (Mac)
Hi all,How do I make an actor auto-resize itself when I drag it from the background to the foreground

Thanks :D

Comments

  • MotherHooseMotherHoose Member Posts: 2,456
    gameAttribute real: currentTouchY

    on Actor you want to make bigger:
    Rule: when
    touch is pressed
    --changeAttribute: game.currentTouchY To: game.Touches.Touch 1.Y
    --your constrain behaviors
    --Rule: when
    ---self.Position.Y < game.currentTouchY
    ----changeSize behavior: Growth Rate: 1
    Otherwise:
    changeAttribute: game.currentTouchY To: 0

    @};- MH
  • NicholasSeahNicholasSeah Member Posts: 68
    Thanks :D
Sign In or Register to comment.