Unable to drag actor / background properly
Edit: Sorry first issue was solved - it was regarding scrollable / unscrollable layers which I found the solution
The issue I'm facing now is dragging the actor / background to scroll like dragging a PDF document. I've tried a few ways
1.
Off screen actor
When touch is pressed, change attribute Game.TouchY to Game.Mouse.Position.Y
When touch is released, change attribute Game.ReleaseY to Game.Mouse.PositionY
Change Attribute Game.Up/Down to Game.ReleaseY - Game.TouchY
Background actor
When touch is pressed, constrain attribute Self.Position.Y to Self.Position.Y to Self.Position.Y + Game.Up/Down
Result: Once clicked, the entire actor disappears
2.
Off screen actor (same as first one)
When touch is pressed, change attribute Game.TouchY to Game.Mouse.Position.Y
When touch is released, change attribute Game.ReleaseY to Game.Mouse.PositionY
Change Attribute Game.Up/Down to Game.ReleaseY - Game.TouchY
Background actor
When touch is pressed, If Game.Up/Down = 4, Constrain attribute Self.Position.Y to Self.Position.Y to Self.Position.Y + Game.Up/Down
Result (yes this only has the rule to go up but I can't even get it to work right):
If you move exactly 4 pixels up, it moves up non stop and doesn't stop till you click again
3.
As per #2 but if I change Game.Up/Down = 4 to Game.Up/Down > 4, the actor is not even there when the preview starts!
Any help will be appreciated, thank you!
Comments
Hey JC,
This may help with the scroll functionality. I've basically told the actor to maintain the same distance between itself and the mouse while touch is being held down. Have a look and tell me what you think. Hopefully it helps out.
@Cutscene Entertainment
Thank you!
I did however find a file posted by socks which was a while back. That one was more towards what I was looking for i.e. locking a few actors onto a "parent" actor that scrolls around.
But thank you for your time still!
I'll be embarking on my project soon since the holidays are coming haha, may need to bother the community a bit more soon!
I'm glad everything worked out for you. Good luck on your project over the holidays! Don't get too caught up with it.
Hi all, I've started on my project! However, I got a new problem - posting here coz it feels like I'm spamming if I create a third thread in 1 month =\
There are some bugs I'm encountering is with the GS engine so far...
Bug 1: Game does not work in preview unless I change the % window
Bug 2: Actors aren't always there
Bug 3: Rules don't work consistently
Bug 4: Some rules don't go through
Rule: if tableCellValue(table,row,column) >= 3, change image to 'A'
---> image doesn't change
Rule: tableCellValue(table,row,column) = 3, change image to 'A'
---> image changes to 'A'
My questions are
1) Will these bugs spillover to the app proper once published? (esp the first and second bug since it looks like these will become problematic if it carries to the app)
2) How do I overcome these bugs?