Scrolling Image
Billyd1
Member Posts: 133
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
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
Good Luck!