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

    Spawn a label with a specific Value

    Scheduled Pinned Locked Moved
    Help and Support
    2
    12
    399
    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.
    • D
      Deeeds
      last edited by

      How do I spawn a label and send it a value to be set at?

      And then spawn another, and give it a different value?

      Aidan_FireA 1 Reply Last reply Reply Quote 1
      • Aidan_FireA
        Aidan_Fire @Deeeds
        last edited by Aidan_Fire

        @Deeeds I’d just broadcast a message immediately after spawning the object. The message would contain the text for the label. When the label receives the message, set to the text given or do whatever else you want with the broadcast information, thne use behaviour off to disable the broadcast message so that it won’t change every time a new object spawns.

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

          @Aidan-Oxley Here's the problem.

          To a spawned object... sending a broadcast message, is pointless because the labels don't have a sense of self, so they can't set themselves with that value they receive.

          Aidan_FireA 1 Reply Last reply Reply Quote 0
          • Aidan_FireA
            Aidan_Fire @Deeeds
            last edited by Aidan_Fire

            @Deeeds Yeah they can. If you add a set label into an object you intend to spawn multiple of, and have it select itself (it will by default), all the spawned ones should select themselves, not the paren/original.

            D 1 Reply Last reply Reply Quote 1
            • D
              Deeeds @Aidan_Fire
              last edited by

              @Aidan-Oxley I've tried this. In the parent, it selects itself, and then I'd hoped spawned versions would cop to the fact that it's SELF, but they seem to retain reference to the parent. So can't set themselves.

              Aidan_FireA 1 Reply Last reply Reply Quote 0
              • Aidan_FireA
                Aidan_Fire @Deeeds
                last edited by

                @Deeeds I’m gonna take a look at this. If I can get it to work, I’ll give to a link to a mini test project.

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

                  @Aidan-Oxley cool, this can’t be the right way to solve this...

                  0_1510894916706_23A2D48D-2CBE-4E5F-AD40-845698BB0BEB.png

                  Aidan_FireA 1 Reply Last reply Reply Quote 0
                  • Aidan_FireA
                    Aidan_Fire @Deeeds
                    last edited by

                    @Deeeds Lol I have no idea what’s going on there. Here’s the link though: http://bit.ly/2A6y4Vx
                    You can’t have broadcast message and spawn object in the same line because the spawned object doesn’t seem to pick it up, so I added a short delay, which could probably actually be heaps smaller than what it already is.

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

                      @Aidan-Oxley what do I do with this link?

                      Aidan_FireA 1 Reply Last reply Reply Quote 0
                      • Aidan_FireA
                        Aidan_Fire @Deeeds
                        last edited by

                        @Deeeds Copy it and paste it into your web browser (usually safari). Then open the file that comes up in hyperPad.

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

                          @Aidan-Oxley THANK YOU!!

                          It worked. Time to experiment with this delay...

                          THANK YOU!!!

                          Aidan_FireA 1 Reply Last reply Reply Quote 0
                          • Aidan_FireA
                            Aidan_Fire @Deeeds
                            last edited by

                            @Deeeds NP :)

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