Change Scene After One Touch/Click

Hello,

I am making a game where an actor follows a path that the user draws. I want the user to be able to draw only make one path, and once they're done making the path and the actor follows it, change the scene. How can I do this?
Thanks!

Comments

  • carlblanchetcarlblanchet Member Posts: 755
    use When touch is released -> change scene
    Assuming that when touch is pressed ->begin path.
  • alibinzahidalibinzahid Member Posts: 3
    Thanks, but this doesn't work.

    If I do that, then it goes on to the next scene as soon as the scene starts (because the touch is already is release mode).
  • carlblanchetcarlblanchet Member Posts: 755
    Then add a boolean attribute that is changed to true when touch is pressed.
    and now if touch is released and attribute is true -> change scene.
  • alibinzahidalibinzahid Member Posts: 3
    It does kind of work. But, now the scene changes right after touch is released.
    But after the touch is released, I want the actor to follow the path and then I want the scene to be changed.
    I tried putting in a timer but that won't work either.

    Thanks again.
  • carlblanchetcarlblanchet Member Posts: 755
    If touch is released and attribute is true, disable path drawing
    (meaning you can no longer draw) then,
    if att is true and the actor's self position x and y are equal to the last piece of the path
    -> change scene.

    If you can figure out how to add this to your rules, it should do the trick.
  • alibinzahidalibinzahid Member Posts: 3
    Yep, after a lot of trial and error and trying different things it works. Thanks!
Sign In or Register to comment.