Start the same scene but from a different location?
-
@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. :)
-
@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.
-
@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.
-
@SplitMindGaming i just noticed global layers dont have physics so please ignore that question.
-
@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.
-
@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)
-
@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 ?
-
@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.
-
@Aidan-Oxley perfect thank you so much. Lifesaver
-
@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?
-
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.
-
@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.
-
@Kamdroid Thanks i will try this out.
-
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?
-
@Kamdroid how did you get the black screen to fade out? I dont see a set opacity option.
-
@SplitMindGaming Set color also change the opacity.
-
So guys I did mention that i got this to work. But i did it in kind of a cheesy way using add values because thats what I know how to use for now. What would be the proper coding structure for the logics when the player goes to the secret room and comes back out and the game no longer allows them to go back in. Do i use attributes for this? For example set an attribute for secret room door open and when the player enters it changes it to close?
-
@SplitMindGaming Yes, you can use attributes. Then use get attribute along with a condition. So if the door is closed, don't let the player enter.
-
@RobinsonX thanks. To me for some reason Im having a hard time wrapping my head around the concept of attributes. How would i set it up exactly. Sounds easy to say in my head but when it comes down to trying to code and make it happen it gets really confusing. How would you set this up. A player goes into the room. When he leaves. He cant go back in? This is how far i think I can get.
Door (Collided) with player
(Get attribute) door 1 enteredNow what would be the logic that does let him go back in when he comes back out. Sorry guys i know im an idiot.
-
@SplitMindGaming Do you know how labels work? Have you ever used a label as some value, and you use Set Label and Get label? An attribute is basically the same thing, but invisible.