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

    Spawned Objects Exploration

    Scheduled Pinned Locked Moved Help and Support
    7 Posts 2 Posters 615 Views 1 Watching
    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 Offline
      TutorialDoctor
      last edited by TutorialDoctor

      I guess it's not a new issue that we find ourselves needing more access to spawned objects, but I think I stumbled across something.

      It seems that once a spawn behavior is used inside of an object, all subsequent objects are applied to the spawned object. If this is true, I'm wondering how I can get more control of these spawned objects. I see how IDs have been used in the enemy health bar bxample, but I want to understand the functionality at a more basic level.

      How do the spawn behaviors work?

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

        What do you need to know? Never make the spawned object spawn itself lol unless it's intended that the object duplicates itself apon an event like a broadcast message, if there's no event then they will spawn out of control instantly and crash hyperPad.

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

          @Aidan-Oxley

          Working on a sort of inventory.

          https://www.dropbox.com/s/u5jmy43clh8t5oo/Inventory 2.tap?dl=0

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

            Had a look, I don't see any spawning, what do you wanna use spawning for?

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

              @Aidan-Oxley 0_1492474259070_IMG_2153.PNG

              I'm spawning the fruit to simulate selecting fruit from the inventory and placing it in the world. I can even move the spawned object to another layer.

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

                A simple way could be having the fruit down in some sort of inventory bar in the bottom of the screen, when you tap on it, it spawns another of itself on top and turns off the spawn ability, then add a drag and drop behaviour in it. Have anything the fruit does disabled until you stop touching it (so that if the fruit is supposed to do stuff in the world, it won't do it in your inventory bar, it will do it when it's dropped in the world. For another scene, can't you just copy it and paste it into another scene, and duplicate your entire inventory bar maybe? Otherwise you could try having it on the global UI, and when you drop it it will move layers. I hope I'm making sense and understanding your problem properly.

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

                  @Aidan-Oxley I misspoke about moving it to a scene. I can move it to another layer.

                  The way it works now, it seems that the inventory bar isn't affected and I am wondering how. It seems that once I have spawned the object, each subsequent action on the object is applied to the spawned object. Check out the behaviors in one of the fruit at the top. You can see how the Scale To behavior doesn't scale the fruit at the top, but the spawned object only, even though it's applied within that object, to that object.

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