GameSalad

Unable to drag actor / background properly

JCHEREJCHERE Posts: 9Member, PRO
edited November 19 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 Posts: 90Member, PRO


    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 Posts: 9Member, PRO

    @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 Posts: 90Member, PRO

    @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 Posts: 9Member, PRO
    edited 11:08AM

    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's a bug I'm encountering is with the GS preview which comes when I refresh.

    Basically, I set up all my scenes and the change scene buttons. It worked well, I could go anywhere from scene 1-5 as I wished even after refreshing.

    After adding actors and rules and tables, somewhere through the project I realised that if I refresh the viewer, nothing works. When I start the preview, everything is smooth. However, once refreshed inside the viewer, all the actors and rules don't function when clicked. So I troubleshooted by offing rules, deleting actors etc

    And then I realised when I deleted EVERYTHING, leaving only 2 scenes and 2 actors (to change between the 2 scenes), it still hangs when I refresh the viewer...

    Reason why I'm testing with refresh is to see if my tables are saving and if the appformative server based time is working (which so far it was until this bug)

    My question is
    1) Will this bug spillover to the app proper once published?
    2) How do I overcome this bug?

Sign In or Register to comment.