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

    Move Layer, or everything in it, easily?

    Scheduled Pinned Locked Moved
    Help and Support
    4
    15
    424
    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 Deeeds

      Is there a way to associate a transform behaviour with an entire layer and all its content?

      Or an easy way to select all the contents of a layer and apply a single transform behaviour to all its content?

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

        @Deeeds You could use the highlight tool to select everything, copy then paste into another layer. Why do you want to move everything to a new layer anyway? Why not just keep the old layer and make a new one for whatever you want it to have. You can rename and change which layers are on top of each other.

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

          @Aidan-Oxley Sorry, not making myself clear.

          I'm wanting to move the entire contents OF the layer, inside the game. This is why I used the word "transform", because I'd like to do things like scale, rotate and move within the game world... sometimes everything in a layer, sometimes only some of the elements in the layer.

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

            @Deeeds So you want all of the stuff in one of your layer to move, e.g move everything to the right a metre?

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

              @Aidan-Oxley Yes, exactly like that, animate over time through rotation, scale and movement.

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

                @Deeeds You could try highlight all your layer using the highlight tool then drag them around or something? Highlight tool is on the left of the screen, looks like a box.

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

                  @Aidan-Oxley Sorry, still not making myself clear.

                  If I was talking about a normal programming world, I'd say I want to do one of these:

                  a) Iterate over every object in a layer, transforming each in the same way (with code, in the game, not in the editor, by the use of a "behaviour")

                  or

                  b) anchor all objects in a layer to a master object, and move that object (with code) and have that create anchored transformations of the other objects. (commonly called "parenting")

                  or

                  c) attach a behaviour (code) to the layer, that causes everything in the layer to move in the same way, as though they're all parented to the layer.

                  But I can't find anything like this in hyperPad...

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

                    @Deeeds Oh, so you want all objects to transform somehow (move etc) at the same time, using behaviours. Put all the objects in that layer into a Tag, then run your behaviour on that tag. I’ll try to take some screenshots for you if you want. (Tags can be added to object by selecting the object then using the bottom right corner button).

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

                      @Aidan-Oxley Yes, please. Very confused about what "tags" are within hyperPad, and how you can run a behaviour on a tag.

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

                        1_1509015127457_6E1041E0-E4B3-4CA9-A7DF-F50117151F17.png 0_1509015127451_254FFBEE-2AFB-4A39-8C96-07E2A758F63C.png

                        Look in the bottom right corners

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

                          @Aidan-Oxley Yes, I know where tags are, and have tried using them, but I don't know what they're analogous to within the world's of software and sorting ideas I've seen tagging used for in other environments.

                          eg. How do you "run a behaviour" on a tag?

                          And what is this doing in the background?

                          Does hyperPad create dictionaries or arrays of all objects with the same tag, and then iterate over them? FAST?

                          Or does it have to run a search through every object in the game world and find each one with the right tag, then operate on it? SLOW?

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

                            @Aidan-Oxley And... is this the ONLY way to transform all the contents of a layer?

                            1 Reply Last reply Reply Quote 0
                            • HamedH
                              Hamed Admin @Deeeds
                              last edited by

                              @Deeeds said in Move Layer, or everything in it, easily?:

                              Does hyperPad create dictionaries or arrays of all objects with the same tag, and then iterate over them? FAST?

                              Yes it does it the fast way that you described.

                              @Deeeds said in Move Layer, or everything in it, easily?:

                              @Aidan-Oxley And... is this the ONLY way to transform all the contents of a layer?

                              This is the best way that I know of!

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

                                @Hamed THANK YOU very much Hamed!

                                This gives me enormous confidence in tags, and a little insight into how they work and why they're there.

                                One more tricky question:

                                How can I apply a behaviour to a tag?

                                Jack8680J 1 Reply Last reply Reply Quote 0
                                • Jack8680J
                                  Jack8680 @Deeeds
                                  last edited by Jack8680

                                  @Deeeds when you tap on a behaviour there's a tab for tags right at the bottom (look at Aidan's second screenshot). Select or create a tag and have all your objects in that tag, then the behaviour will run on all of them. This doesn't work underneath a collided behaviour with the same tag though because it would only run on the object you collide with. Tags can also be used in a loop with "for each" selected, making it Loop over every object in that tag.

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