10:09am - Time for work at last. I'm working on the out-scene teleport system, and writing the World.gd script. It'll handle switching out the scenes as they're unloaded and loaded into the game. The out-scene teleports will trigger that.
In order for it to work, the World.gd script needs to have functions to handle the switching. I'm having trouble thinking straight to figure out what I need though. ^.^;;
10:49am - I'm still having trouble thinking straight. I spent a while just trying to think up what I needed and having my mind drift. I think my music was making me sleepy too, so I just switched it up. I've got less than an hour before I've got to go, though, so I don't know if I'll finish what I'm working on anyways.
The tricky thing I'm trying to figure out is just what the scene changing function needs to operate.
I'm thinking that the Out-Scene teleport will pass the scene it leads to and the NodePath of the teleport target in that scene that it leads to. I'm not sure if it'll work, though.
Let's work along the logic first, that should help.
Okay so it starts when the player collides with an out-scene teleporter. Then the teleporter's script calls on the parent of its containing scene, getting the World container. It calls a function like SwitchScene() which will take the scene it's switching to, and the teleport target in that scene to teleport to. Then it switches the scene and places the player object in that scene on the teleport target's location.
I don't want anything but players being teleported like this so I'll make it only work on a player group, as well.
11:11am - Had to take a bathroom break, but I'm back now.
So, I guess I just need the SwitchScene() function in the World script for now.
11:23am - Almost out of time. I realized I also need a direction in the switch_scene() function so that it knows what way to point the player when they arrive. Though on second thought, maybe that should be included in the teleport target somehow? I'll need it for the in-scene teleports too, now that I think of it. They worked so far because I just happened to be teleporting in the direction I was facing in the tests. But that might not always be the case.
11:36am - Out of time. Have to do more later.
In order for it to work, the World.gd script needs to have functions to handle the switching. I'm having trouble thinking straight to figure out what I need though. ^.^;;
10:49am - I'm still having trouble thinking straight. I spent a while just trying to think up what I needed and having my mind drift. I think my music was making me sleepy too, so I just switched it up. I've got less than an hour before I've got to go, though, so I don't know if I'll finish what I'm working on anyways.
The tricky thing I'm trying to figure out is just what the scene changing function needs to operate.
I'm thinking that the Out-Scene teleport will pass the scene it leads to and the NodePath of the teleport target in that scene that it leads to. I'm not sure if it'll work, though.
Let's work along the logic first, that should help.
Okay so it starts when the player collides with an out-scene teleporter. Then the teleporter's script calls on the parent of its containing scene, getting the World container. It calls a function like SwitchScene() which will take the scene it's switching to, and the teleport target in that scene to teleport to. Then it switches the scene and places the player object in that scene on the teleport target's location.
I don't want anything but players being teleported like this so I'll make it only work on a player group, as well.
11:11am - Had to take a bathroom break, but I'm back now.
So, I guess I just need the SwitchScene() function in the World script for now.
11:23am - Almost out of time. I realized I also need a direction in the switch_scene() function so that it knows what way to point the player when they arrive. Though on second thought, maybe that should be included in the teleport target somehow? I'll need it for the in-scene teleports too, now that I think of it. They worked so far because I just happened to be teleporting in the direction I was facing in the tests. But that might not always be the case.
11:36am - Out of time. Have to do more later.