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

    Get Collisions

    Scheduled Pinned Locked Moved
    Comments & Feedback
    3
    6
    468
    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.
    • TutorialDoctorT
      TutorialDoctor
      last edited by TutorialDoctor

      One thing I noticed is that we don't have the ability to get collisions or colliding bodies. It'd be nice if we could get the attributes of an object upon collision or any other type of interaction.

      Is box "A" colliding with the ground? With an enemy? I know we have tags but not many behaviors with tags currently.

      Edit: I was able to simulate it below.
      0_1487548464377_IMG_1863.PNG

      1 Reply Last reply Reply Quote 0
      • MurtazaM
        Murtaza Admin
        last edited by

        Why wouldn't tags work here? I'm not sure what you mean by many behaviours don't have tags.
        Any behaviour that can affect an object, should be able to be substituted with a tag.

        If you want to check against multiple collision types, why not have multiple collided behaviours?
        One "Collided" for enemy, one collided for ground, etc.

        1 Reply Last reply Reply Quote 0
        • DGames135D
          DGames135
          last edited by

          If you're trying to make something like when the player colides with the ground something happenes but if it stops colliding it deacivates I know that if you stop colidind with even one of the ground tiles it deactivates. The thing to solve that could be use a empty object with the tag and strect it along the ground tiles. If this isn't the answer then I'm soryy for wasting your time.

          1 Reply Last reply Reply Quote 0
          • TutorialDoctorT
            TutorialDoctor
            last edited by

            I was looking to check variable collisions. I was able to get the effect I wanted though, using tags and attributes. Any object that my object is aware of should have a unique attribute.

            DGames135D 1 Reply Last reply Reply Quote 0
            • DGames135D
              DGames135 @TutorialDoctor
              last edited by

              @TutorialDoctor i still don't get atributes:/

              TutorialDoctorT 1 Reply Last reply Reply Quote 0
              • TutorialDoctorT
                TutorialDoctor @DGames135
                last edited by TutorialDoctor

                @DGames135 The way I would explain attributes is:

                Say you have an object/character and he has different properties:

                Name: "Joe"
                Age: "24"
                Height : 6
                

                Perhaps one objects's name is Joe and another object's name is Sarah. You could add both the Joe and Sarah objects to a tag labeled "Human" (tags I will equate to classes in regular programming and attributes to properties). Now you can do something like this:

                if A collides with "Human" get the attribute (name) of that collision.

                -or-

                If A collides with (name) then....

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