Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
hyperPad

hyperPad Forum

  1. Home
  2. Help and Support
  3. Is it possible to nest objects / labels?

Is it possible to nest objects / labels?

Scheduled Pinned Locked Moved Help and Support
10 Posts 4 Posters 1.7k Views 3 Watching
  • 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.
  • R Offline
    R Offline
    reynslagdev
    wrote on last edited by
    #1

    Hi
    I'm currently trying out HP and in the process I'm building a small educational game.
    I have a scene, where fruits are dropping from the sky and I want them to show a letter and in stead of making a new frame displaying a new letter, I want to make a label which is nested to the fruit. Is that possible, is there a smart workaround or do I have to go with the tedious solution and make a new frame for showing different letters?

    Thanx in advance

    Jack de WildeJ 1 Reply Last reply
    0
    • R reynslagdev

      Hi
      I'm currently trying out HP and in the process I'm building a small educational game.
      I have a scene, where fruits are dropping from the sky and I want them to show a letter and in stead of making a new frame displaying a new letter, I want to make a label which is nested to the fruit. Is that possible, is there a smart workaround or do I have to go with the tedious solution and make a new frame for showing different letters?

      Thanx in advance

      Jack de WildeJ Offline
      Jack de WildeJ Offline
      Jack de Wilde
      wrote on last edited by
      #2

      @reynslagdev if you use a label to display the letter, I think you can make it a passable physics object and use the 'weld attach' behaviour to attach it to the fruit. I haven't used labels as physics objects, but I'm assuming it works because there is a physics option for them.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        reynslagdev
        wrote on last edited by
        #3

        I've tried that of a sort. The problem is, that i cant get it to work since I'm spawning the fruit. I haven't found a way to dynamically attach the label to the fruit.

        R 1 Reply Last reply
        0
        • R reynslagdev

          I've tried that of a sort. The problem is, that i cant get it to work since I'm spawning the fruit. I haven't found a way to dynamically attach the label to the fruit.

          R Offline
          R Offline
          reynslagdev
          wrote on last edited by
          #4

          @Jack8680 But yes. It works fine using physic's on labels.

          Jack de WildeJ 1 Reply Last reply
          0
          • R reynslagdev

            @Jack8680 But yes. It works fine using physic's on labels.

            Jack de WildeJ Offline
            Jack de WildeJ Offline
            Jack de Wilde
            wrote on last edited by
            #5

            @reynslagdev yeah, that's a bit more complex. You could use a loop set to 'for each' with a tag so you loop through each object and for example use an attribute to determine which one to weld attach to. You could also use collisions with a tag to do this. For example, if you want the label to attach to the latest spawned fruit you could move them both to the same spot offscreen and use collided with tag then weld attach to tag. This works because it carries the object in the tag it collides with down to all attached behaviours that select that tag. You can then turn collided off after it happens the first time so it only attaches once.

            R 1 Reply Last reply
            0
            • Jack de WildeJ Jack de Wilde

              @reynslagdev yeah, that's a bit more complex. You could use a loop set to 'for each' with a tag so you loop through each object and for example use an attribute to determine which one to weld attach to. You could also use collisions with a tag to do this. For example, if you want the label to attach to the latest spawned fruit you could move them both to the same spot offscreen and use collided with tag then weld attach to tag. This works because it carries the object in the tag it collides with down to all attached behaviours that select that tag. You can then turn collided off after it happens the first time so it only attaches once.

              R Offline
              R Offline
              reynslagdev
              wrote on last edited by
              #6

              @Jack8680 Interesting. I'll try your suggestion. Thank you for your answer.

              iTap DevelopmentI 1 Reply Last reply
              0
              • R reynslagdev

                @Jack8680 Interesting. I'll try your suggestion. Thank you for your answer.

                iTap DevelopmentI Offline
                iTap DevelopmentI Offline
                iTap Development
                wrote on last edited by
                #7

                @reynslagdev with the changes to the broadcast/receive message behaviors in the next update, controlling spawned objects is really easy.

                R 1 Reply Last reply
                0
                • T-StudiosT Offline
                  T-StudiosT Offline
                  T-Studios
                  wrote on last edited by
                  #8

                  Put the apple in a group called apple, set the apple to spawn a label on itself upon creation, next go into the label, add a behaviour making it so whenever it collides with anything in the apple group, it will weld to it

                  R 1 Reply Last reply
                  0
                  • T-StudiosT T-Studios

                    Put the apple in a group called apple, set the apple to spawn a label on itself upon creation, next go into the label, add a behaviour making it so whenever it collides with anything in the apple group, it will weld to it

                    R Offline
                    R Offline
                    reynslagdev
                    wrote on last edited by
                    #9

                    @T-Studios Interesting! I'll try that out. Thanks.

                    1 Reply Last reply
                    0
                    • iTap DevelopmentI iTap Development

                      @reynslagdev with the changes to the broadcast/receive message behaviors in the next update, controlling spawned objects is really easy.

                      R Offline
                      R Offline
                      reynslagdev
                      wrote on last edited by
                      #10

                      @iTap-Development That sounds nice.

                      1 Reply Last reply
                      0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Search