Scrolling Image

Billyd1Billyd1 Member Posts: 133
edited November -1 in Working with GS (Mac)
How can I make a scrolling image not jump back to the centre when I click it? This is what I got.

create 2 new game attribute
call 1 of them: MyFingerTouchX
call the other: MyFingerTouchY

Then create your actor to follow the finger.
In that...add two constrain functions
Constrain Attribute game.MyFingerTouchX to game(via Devices).Mouse.Position.X
Constrain Attribute game.MyFingerTouchY to game.Mouse.Position.Y
(note these can also be linked to a Touch1 setting)

Then add a rule...

Rule:
when Touch is Pressed:
Constrain Attribute self.position.X to game.MyFingerTouchX
Constrain Attribute self.position.Y to game.MyFingerTouchY

Then add another rule...

Rule:
when Touch is Released:
Change Attribute self.Alpha = 0

Comments

  • chosenonestudioschosenonestudios Member Posts: 1,714
    FMG has a tutorial on this, I'd download his project and check that out.....

    Good Luck!
Sign In or Register to comment.