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

    Changed Label Properties aren't Spawn Compatible

    Scheduled Pinned Locked Moved
    Bug Reports
    3
    14
    355
    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

      In behaviours, set a label's textual value to something.

      Then use a behaviour to set a label's colour to something other than default

      Now Spawn a "copy" of it.

      The spawned label reverts to the default textual content of the label and its default colour.

      This isn't a spawn of the label, it's a spawn of what the label once was.

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

        @Deeeds Yeah when objects are spawned they do not take on any of the current state of the parent, just the state it was in from the editor. You’d have to do it manually.

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

          @Aidan-Oxley Do what manually? I don't see how I can create a bunch of labels with different text.

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

            @Deeeds If I understand right, you wanna spawn an object with the same state as the object that spawned it?

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

              @Aidan-Oxley Yes, that might be successful. But I don't know how to think in hyperPad's limited world of spawning.

              I want to spawn a lap time, and present it.

              Then, a little later, another lap time is completed, and I want to spawn and present that.

              etc... down the side of the screen, a bunch of lap times in a list grows as each lap is completed.

              Each lap time has a unique number, obviously. And I thought this should be as easy as changing the master/parent to the lap time, then spawning a copy and positioning it on the list.

              KamdroidK 1 Reply Last reply Reply Quote 0
              • KamdroidK
                Kamdroid @Deeeds
                last edited by

                @Deeeds I personally wouldn’t bother trying to make a system to dynamically spawn a list (w/ each different text), at least not until HyperPad gets a better way to spawn an object and apply unique manipulation to it.

                One way I was experimenting with it, was using the broadcast and receive behaviours is to create a unique Callback ID for each spawned object, based on their spawned location.

                Once all objects are spawned, I reloop the array for broadcasting each individual object their needed unique information as an array, (text, in this case), using the unique Callback ID as the broadcast key, so the broadcast won’t conflict with other spawned objects.

                This works for me, but I find it extremely horrible to do it this way.

                TD;LR: It’s possible, but kind of messy and unconvinent and if you don’t need to make it right now, I’d wait for HyperPad to get a better way to do this.

                KamdroidK D 2 Replies Last reply Reply Quote 1
                • KamdroidK
                  Kamdroid @Kamdroid
                  last edited by

                  @Kamdroid They should just give an option to either copy the original state of the spawned object, or the current state.

                  D 2 Replies Last reply Reply Quote 0
                  • D
                    Deeeds @Kamdroid
                    last edited by

                    @Kamdroid Couldn't agree more with you. At all.

                    But must get lap timer done... and with a bit of a scoreboard, so doing it anyways... and it's ridiculous. IN EVERY SINGLE WAY.

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

                      @Kamdroid It's a long read, but somewhere I gave @Murtaza a little thesis on how important references, instances and copying are to coding environments.

                      He tuned out.

                      KamdroidK 1 Reply Last reply Reply Quote 0
                      • KamdroidK
                        Kamdroid @Deeeds
                        last edited by

                        @Deeeds You could also just use the “Combine Text” behaviour to make one label object, and just keep adding text to it. However, in most cases, this limits you too much.

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

                          @Kamdroid I didn't even know about that "feature". Will look into it!

                          Cheers!!!

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

                            @Kamdroid THIS: https://forum.hyperpad.com/post/3687

                            Sorry, it's boring. And so am I.

                            KamdroidK 1 Reply Last reply Reply Quote 0
                            • KamdroidK
                              Kamdroid @Deeeds
                              last edited by Kamdroid

                              @Deeeds Also, this is a way you could add to the list, simply do a broadcast to “+label_timescore” (or whatever your broadcast key is)

                              NOTE: whoops, don’t forget to add the set label to apply the combine text result to the label.

                              I just like this, since it’s like a function,
                              (You could also number the label using a label or attribute keeping track of the list number, and using another combine text)0_1510899905709_D1C76765-4B5C-48B1-8D9F-397A24E5CB76.png

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

                                @Kamdroid This is a very cool cheat!

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