Unable to drag actor / background properly

JCHEREJCHERE Member, PRO Posts: 10
edited November 2017 in Working with GS (PC)

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

  • Cutscene EntertainmentCutscene Entertainment Member, PRO Posts: 138


    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.

  • JCHEREJCHERE Member, PRO Posts: 10

    @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!

  • Cutscene EntertainmentCutscene Entertainment Member, PRO Posts: 138

    @JCHERE said:
    @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. ;)

  • JCHEREJCHERE Member, PRO Posts: 10
    edited December 2017

    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

    • when I start preview, only a couple of actors work
    • when I change from 100% to 50% or to any other % or back to 100%, then it works
    • same thing: when I refresh inside preview, it doesn't work until I change the %

    Bug 2: Actors aren't always there

    • I have a few immobile actors which are always there from the start
    • there are no spawn or destroy rules on any of these actors - they're just sitting there
    • sometimes when previewing the actors aren't there, sometimes they are
    • changing scene and back make them appear
    • sometimes changing scenes and back makes them disappear

    Bug 3: Rules don't work consistently

    • when I add a rule, sometimes it doesn't work
    • however, after deleting the actor and dragging it in again, it does.
    • or, sometimes after deleting the rule and adding it in again, in the same place, it does.

    Bug 4: Some rules don't go through

    • one example: if I do something like
      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'
    • result is I have to find a length workaround which isn't the best sometimes

    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?

Sign In or Register to comment.