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

    Behavior Request: Colliding

    Scheduled Pinned Locked Moved
    Comments & Feedback
    3
    11
    1.2k
    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.
    • GameCRAZYG
      GameCRAZY @Thecheater887
      last edited by

      @Thecheater887 you could already do this! Without the behavior!

      timer (every 0 seconds)

      Get position (of selected object)
      If (get position X > x)
      If (get position X < y)
      If (get position Y < z)
      If (get position Y < n)
      behaviors...

      The ifs set the object boundary.
      They can be changed using "set input field" behaviors per moving object.
      It's harder but it works!

      T 1 Reply Last reply Reply Quote 0
      • T
        Thecheater887 @GameCRAZY
        last edited by

        @GameCRAZY Thanks, but I need to be tag and loop heavy when using this in most cases, so having this for say 250 different object would bog down the project a LOT.

        Additionally, I see "if"s like hammers.

        A necessary tool, but deadly when misused. There it would be like giving 1000 three year olds hammers, letting the, loose, and expecting them all to behave and survive.

        This for the suggestion though! I'll use it in smaller projects!

        GameCRAZYG 1 Reply Last reply Reply Quote 0
        • GameCRAZYG
          GameCRAZY @Thecheater887
          last edited by

          @Thecheater887 I'm using it for my level creator in my game. It's a pretty big scene and will be a huge system. Thing is, it isn't causing me any bugs.

          It's hint you could still get what you want out of the sequence. If behaviors are one of the most important behaviors.

          1 Reply Last reply Reply Quote 0
          • T
            Thecheater887
            last edited by

            What device are you on? I'm on an older one, and any time I have 250 "if"s running, my game slows down to a crawl.

            GameCRAZYG 1 Reply Last reply Reply Quote 0
            • GameCRAZYG
              GameCRAZY @Thecheater887
              last edited by

              @Thecheater887 I'm on a first generation iPad Mini. I have tons of lag - but this isn't inluded in my list :)

              T 1 Reply Last reply Reply Quote 0
              • T
                Thecheater887 @GameCRAZY
                last edited by

                @GameCRAZY I'm on iPad mini 2, and lots of lag as well, unfortunately, the ifs are on my list XD

                1 Reply Last reply Reply Quote 0
                • iTap DevelopmentI
                  iTap Development
                  last edited by

                  If I understand your question, the simplest way to do this is to have an attribute with a default of 0 and when the objects collide set the attribute to 1 then when they stop colliding set it back to 0.
                  So, all you have to do is to get that attribute and if it is equal to 1 that means they are currently colliding!
                  Hope this makes sense, if you have any questions about this just ask!

                  GameCRAZYG 1 Reply Last reply Reply Quote 1
                  • GameCRAZYG
                    GameCRAZY @iTap Development
                    last edited by

                    @iTap-Development ooh, I like that one... Works in most cases... Sounds so good... XD.

                    iTap DevelopmentI 1 Reply Last reply Reply Quote 0
                    • iTap DevelopmentI
                      iTap Development @GameCRAZY
                      last edited by

                      @GameCRAZY thanks! Just curios, you said works on most cases...what cases would it NOT work on? I'm not saying there aren't any!

                      GameCRAZYG 1 Reply Last reply Reply Quote 0
                      • GameCRAZYG
                        GameCRAZY @iTap Development
                        last edited by

                        @iTap-Development I'm not sure XD.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post