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

    Start the same scene but from a different location?

    Scheduled Pinned Locked Moved
    Help and Support
    5
    32
    904
    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.
    • MelideM
      Melide @SplitMindGaming
      last edited by

      @SplitMindGaming Checkpoints? You can make this with Save to Files and Load from Files.

      For that I think I would save the position of the character when it trigger the event and after that it go to the next scene.

      But don't forget to put a load from Files and move to behavior that will trigger before your scene is starting. Like that, when you go back to the scene, it will move to the position saved. Don't forget to put the default value of the load from file to the initial position of your character.

      SplitMindGamingS 1 Reply Last reply Reply Quote 1
      • SplitMindGamingS
        SplitMindGaming @Aidan_Fire
        last edited by

        @Aidan-Oxley I have actually thought about this but would it be a performance issue for my game that is vertical and the rooms will be hidden off to the side that are 1000 of meters high in the air? Would it make it glitchy or does how high the game goes really dont matter in terms of performance issue.

        Aidan_FireA 1 Reply Last reply Reply Quote 0
        • SplitMindGamingS
          SplitMindGaming @Melide
          last edited by

          @XxWhiteHearrxX this is actually something i have not thought about and is very smart. Im going to look into this. Thank you for that.

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

            @SplitMindGaming I suppose it would depend on how many objects your rooms are made up of. If it's a lot of objects then yes maybe you might start getting performance issues. How far away you put them makes no difference though. What whitehearr said is actually one of the only few ways to do it I think.

            SplitMindGamingS 1 Reply Last reply Reply Quote 1
            • SplitMindGamingS
              SplitMindGaming @Aidan_Fire
              last edited by

              @Aidan-Oxley thanks so I kind of have an idea how to achieve what whitehear Said but It might take me like 3 days honestly to figure out lol. But I will keep you guys posted. Also if maybe one of you guys could create a simple file checkpoint structure that moves between scenes and would love to share it. That would help me and any other members here trying to build a similar game alot. :)

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

                @SplitMindGaming You can also set a hidden label/attribute on the Global Ui layer and it will not change as you move across scenes. So you could set an attribute to the position of the player on the ui (2, one for x one for y), and every time the main scene loads you run a block of logic that moves the player to this position.

                SplitMindGamingS 1 Reply Last reply Reply Quote 0
                • SplitMindGamingS
                  SplitMindGaming @Aidan_Fire
                  last edited by

                  @Aidan-Oxley thats smart. Question about global layers. Is it a bad idea to actually put all my characters and objects to the global layer. Is this considered bad coding or unethical you can say. The reason why I ask is because if I actually put everything to a global layer. I Can simply turn off certain behavior events when leaving the scene and easily turn them back on when returning to the current scene. It would be just as if i never left it. I just dont know the reprocussions of making everything a global layer. Also is there a way to move an object on the scene to a different layer? I dont see that option.

                  SplitMindGamingS Aidan_FireA 3 Replies Last reply Reply Quote 0
                  • SplitMindGamingS
                    SplitMindGaming @SplitMindGaming
                    last edited by

                    @SplitMindGaming i just noticed global layers dont have physics so please ignore that question.

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

                      @SplitMindGaming 1: the global layer does not change across scenes, so you will not be able to have multiple scenes.
                      2: I'm pretty sure physics are not allowed on ui layers
                      3: I don't think you can even move the screen on the ui layer (as in camera will not follow the player)

                      The ui layers are meant for ui objects, they really don't work with much else.

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

                        @SplitMindGaming said in Start the same scene but from a different location?:

                        Also is there a way to move an object on the scene to a different layer? I dont see that option.

                        Yep, the behaviour is called Set Z Order (in the transforms/blue tab)

                        1 Reply Last reply Reply Quote 0
                        • SplitMindGamingS
                          SplitMindGaming @Aidan_Fire
                          last edited by

                          @Aidan-Oxley yes i just realized that as I was attempting to do some testing. But is there a way to easily move an object to a different layer? Lets say i accidently dragged a trashcan object the screen. Spent many hours adding the coding to it then realized its in the wrong layer this entire time. Is there a way to move it within the iU.i without puting the move layer code to it ?

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

                            @SplitMindGaming Oh you wanna do it without logic, as in in the editor. Press and hold that object, you'll get the option to copy it. You can then navigate to the layer you want and then paste it using the stamp tool.

                            SplitMindGamingS 1 Reply Last reply Reply Quote 0
                            • SplitMindGamingS
                              SplitMindGaming @Aidan_Fire
                              last edited by

                              @Aidan-Oxley perfect thank you so much. Lifesaver

                              1 Reply Last reply Reply Quote 0
                              • SplitMindGamingS
                                SplitMindGaming @Aidan_Fire
                                last edited by

                                @Aidan-Oxley so I got it to work and you are right about the start of the main scene shown for split second. Is there any way around that besides trying to hide the background? Why does it do that by the way?

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

                                  The scene displays before any behaviours are executed.

                                  I personally put an object over everything else. Like a black colour that fades out (which hides the initial scene)

                                  You could also try enable preloading on that scene, but that probably won't help.

                                  SplitMindGamingS 2 Replies Last reply Reply Quote 1
                                  • Aidan_FireA
                                    Aidan_Fire @SplitMindGaming
                                    last edited by

                                    @SplitMindGaming Yeah do something like what kamdroid said. Now that you have logic that moves the player at the start of level loading, maybe you could put the player in a blank area to start with.

                                    1 Reply Last reply Reply Quote 0
                                    • SplitMindGamingS
                                      SplitMindGaming @Kamdroid
                                      last edited by

                                      @Kamdroid Thanks i will try this out.

                                      SplitMindGamingS 1 Reply Last reply Reply Quote 0
                                      • SplitMindGamingS
                                        SplitMindGaming @SplitMindGaming
                                        last edited by

                                        Also with the scene displaying first before any behaviors are executed. Is that just a hyperpad thing or can you somehow code this out yourself to have it look for any priority behaviors before the screen loads?

                                        1 Reply Last reply Reply Quote 0
                                        • SplitMindGamingS
                                          SplitMindGaming @Kamdroid
                                          last edited by

                                          @Kamdroid how did you get the black screen to fade out? I dont see a set opacity option.

                                          MelideM 1 Reply Last reply Reply Quote 0
                                          • MelideM
                                            Melide @SplitMindGaming
                                            last edited by

                                            @SplitMindGaming Set color also change the opacity.

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