logo hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    Dont know how to use IF

    Scheduled Pinned Locked Moved
    Help and Support
    5
    6
    941
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      Lucio Aquino
      last edited by Lucio Aquino

      I know this May be a simple one, i have an object that Adds force up each time its touched. But i want to enable only 1 touch and then wait until it stops moving. Ive tried to use IF and the event “stop moving” but couldnt get it to work

      GameCRAZYG Jack8680J P 3 Replies Last reply Reply Quote 0
      • GameCRAZYG
        GameCRAZY @Lucio Aquino
        last edited by GameCRAZY

        @lucio-aquino Started touching

        If less than or equal to 0, trigger something
        Add force underneath as well, and then you are good to go.

        Should never be triggered again.

        You know about input fields right?

        1 Reply Last reply Reply Quote 0
        • Jack8680J
          Jack8680 @Lucio Aquino
          last edited by Jack8680

          @lucio-aquino I might be misunderstanding what you're trying to do, but I'm guessing it's an object that jumps when you tap it when it is on the ground, in which case you'd probably want something like this:
          0_1530190874854_311ECB84-608E-45BC-9842-E0A98C90CC4A.jpeg

          The 'while touching' can be replaced with a 'started touching' if you don't want players to be able to keep holding it.

          The behaviours basically apply a force once when you tap, then disable the applying of force until the object stops falling again.

          The two behaviours on the right are to stop the object from being able to jump mid-air if it walks off a ledge, they can be removed if the object doesn't walk off ledges.

          The biggest issue I can see is that it probably won't work well with vertically moving platforms, though I haven't tested it.

          Let me know if I've completely misunderstood what you're asking for. This is very similar to the functionality of the jump with button behaviour, so I'm guessing there's a chance I've misunderstood what you're asking.

          1 Reply Last reply Reply Quote 1
          • P
            Pinkie Pie @Lucio Aquino
            last edited by

            @lucio-aquino what does IF mean!

            GameCRAZYG D 2 Replies Last reply Reply Quote 0
            • GameCRAZYG
              GameCRAZY @Pinkie Pie
              last edited by

              @pinkie-pie IF is a behavior.

              1 Reply Last reply Reply Quote 0
              • D
                Deeeds @Pinkie Pie
                last edited by

                @pinkie-pie It's hard to know IF this is a serious question.

                IF it is:

                _
                  "If" is a conditional, and shorthand for:
                      "if this condition is true, then do this.
                       If not true, then don't."
                
                  An If behaviour needs three things:
                
                    1. An input that can be assessed for true or false
                    2. A condition criteria checking if input is true or false    
                    3. An Output Behaviour to perform if the above is true
                
                 Else if having a lark, this is for others. 
                ˘
                
                1 Reply Last reply Reply Quote 0
                • First post
                  Last post