Changing a movement path after clicking

BasGoodboyBasGoodboy Member, PRO Posts: 310
Hey all, I want to add a small minigame in my game,

A bird actor got the following rules:

Move to > 358, 476 relative to scene
Speed: 92

If touch is released, do:
move to > 160, -17 relative to scene

So when player touches bird, the bird falls down..
Only.. it doesnt fall down, apparently the first rule is so strong it doesn't break when clicked, cause when player clicks nothing happends, the bird keeps flying first position 358; 476.

Anyone who can help me out?

Goodboi Gamestudios | Monster Jumper now on the App Store

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    You need to cut the first rule off. So use a self attribute integer. Plus touch is released isn't good to use for this as it functions like turning a light switch on it stays on. Touch is pressed is monetary.

    Rule

    Your other conditions. And Self.(integer) = 0

    Move (do not check run to completion)

    Rule

    When touch is pressed. And. Self.(integer) = 0

    Change attribute Self.(integer) to 1

    Rule

    When Self.(integer) = 1

    Move (do not check run to completion)

    Rule (if you want to change it back or to another)

    When Self.(integer)= 1 and any other condition you want

    You could also put a timer here.

    Change attribute Self.(integer) to 0







  • BasGoodboyBasGoodboy Member, PRO Posts: 310
    edited August 2013
    @FryingBaconStudios,

    I'm blackedout.. Can't see my fault here:
    Dropping when clicked still don't work:

    image

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited August 2013
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited August 2013
    The first move needs to be in the first rule so it gets cut off when you press. Rules control when a behavior runs or doesn't run. By having it outside a rule it will run the whole time and conflict with the other move. Actually looking again you need three rules like I showed. Make a rule that say when self = 0 and put that first move in it.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Watch my video series on GS logic it will help you understand the theory of how to assemble logic. Just click the video tutorials link in my signature.
  • BasGoodboyBasGoodboy Member, PRO Posts: 310
    I understand now Frying, it works now! Thanks for the small explanation of logics, I have now put the first movement in a rule, when 'huntinggrounds' boolean is true, move.
    Since it's always true, unless you click, it will move.

    If you click it now it falls down ^.^

    Thanks a lot mate.

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited August 2013
    Any time. I"m always willing to help people who want to learn. Subscribe to my youtube site I have tons of videos and I always update with more. I teach as well as show how and why we do things in GS.
  • mataruamatarua Auckland, New ZealandMember Posts: 854
    Yep - there are tonnes of good videos on the youtube channel to help. Good content there :)
Sign In or Register to comment.