Player Disappears On Next Scene

somewhatjustin

  • Posts: 16
That pretty much sums it up. I made two Regions. One in the first room, and one in the second.
It moves on to the next room, but the player doesn't want to join.
I've done it before...I have no idea how to fix it.
Another question: I've noticed that in a lot of the tutorials, the 'Scene change' doesn't require a second region for the
next room. Whats up with that? Shouldn't the game need some coordinates to move the player to?

ajimundi

  • *
  • Posts: 230
That's not what regions are for. A region is used to designate a specific area of the scene for some special game mechanic.  For example, you can use it to create something like hostage safe zone in FPS games.

Next, changing scene will kill all actors inside the old scene. In other word, actors don't carry over to the next scene. Most games would just create a new player actor for each scene. If you want persistence, simply save informations ingame attributes and apply to the newly created actor in the new scene
::: It's never too late, unless you're dead. Maybe not even then. :::

PhilIrby

  • Posts: 545
You can use this just before a scene transition.

somewhatjustin

  • Posts: 16
That's not what regions are for. A region is used to designate a specific area of the scene for some special game mechanic.  For example, you can use it to create something like hostage safe zone in FPS games.

Next, changing scene will kill all actors inside the old scene. In other word, actors don't carry over to the next scene. Most games would just create a new player actor for each scene. If you want persistence, simply save informations ingame attributes and apply to the newly created actor in the new scene

Thanks. I thought that was the case. But, when I did that, my and test game, my character would simply start on the second scene. But, I may have accidentally pressed  'Test Scene'.

Also, can you give me something of a step by step walk through as to how to 'save information ingame attributes' and so on? I've used attributes before, but it seems everytime I try to use them in behaviors, my created event/behavior doesn't show.

I have one more question, however:
Theirs no way to just have the player appear on the second scene at a certain location?
Because I want two room transitions, and it may look confusing for a player if the player just appear where the player was placed instead of outside the respective doors which they came.

somewhatjustin

  • Posts: 16
Okay, so now I understand completely. Thanks guys!
I just have to create the character in a new location, and have the scene change.

somewhatjustin

  • Posts: 16
You can use this just before a scene transition.


Crap. Sorry. One more thing Cant seem to find '350 Height of sonic' (Only with my actor and coordinates) or a code similar to that. :/. I looked into the user Input since they seem to be color coated in green, and I couldn't find it.   
So its not working.  A bit of direction?
Still new to this. But hey, its a good introduction to writing code, I would say.

somewhatjustin

  • Posts: 16
You can use this just before a scene transition.


Okay, so I did it without that code and just reversed how they are organized and it seems to work okay. Thanks a lot. :)

PhilIrby

  • Posts: 545
LOL, that is just how I wanted my y coordinate calculated.  I had a scene height of 350  and I subtract the height of my player to get the y coordinate so It would be standing on the ground instead of dangling  up in the air.

ajimundi

  • *
  • Posts: 230
That's not what regions are for. A region is used to designate a specific area of the scene for some special game mechanic.  For example, you can use it to create something like hostage safe zone in FPS games.

Next, changing scene will kill all actors inside the old scene. In other word, actors don't carry over to the next scene. Most games would just create a new player actor for each scene. If you want persistence, simply save informations ingame attributes and apply to the newly created actor in the new scene

Thanks. I thought that was the case. But, when I did that, my and test game, my character would simply start on the second scene. But, I may have accidentally pressed  'Test Scene'.

Also, can you give me something of a step by step walk through as to how to 'save information ingame attributes' and so on? I've used attributes before, but it seems everytime I try to use them in behaviors, my created event/behavior doesn't show.

I have one more question, however:
Theirs no way to just have the player appear on the second scene at a certain location?
Because I want two room transitions, and it may look confusing for a player if the player just appear where the player was placed instead of outside the respective doors which they came.

Ho, I didn't realize there is a 'create actor in next scene block'. My bad. :)
It did exemplify my point, though. Regions did not connect scenes, it simply provide a place to a specific mechanic, which in this case happens to be to designate a transit area.

As for your question, you probably no longer needed the answer, but let me put it in anyway.
1. I would created game attributes for my persistent actor. Let's say it's a simple RPG and he has stats and inventory. I'd put those things as game attribute. That way, every time I transitioned to another scene, all those attributes will be accessible and I can apply to the newly created actors all the necessary attribute that affects them visibly, e.g. equipment ID which would affect how the actor should wear or carry.
2. In the game I am creating now, I designed several ways to move between levels. Player can exit a level via several 'transit point' which individually may or may not be accessible.  It's something like: "If you have a key card, you can take the secured elevator, otherwise you just have to use the regular elevator or the emergency stair. But the elevator maybe out of power or the stair entrance maybe blocked. So, good luck." :D
To do this, I assigned some 'door' objects and regions where player may transit if they have the means/stat/whatever. Since I aim to be able to do this dynamically for future expansions, I concocted several transit schemes. One is to have the transit point to provide coordinate for the player to enter the next scene, which would be applied during actor creations. Another is to check if the destination level has matching, accessible transit object and  handle accordingly.
::: It's never too late, unless you're dead. Maybe not even then. :::


somewhatjustin

  • Posts: 16
Okay, folks. I have one last issue: My characters like to duplicate on transition...eventually they start to look like a human tower.  I've been trying to kill my actor before transition (Which, I'm guessing is what that extra code from sonics was for.) but I can't seem to find it...

somewhatjustin

  • Posts: 16
LOL, that is just how I wanted my y coordinate calculated.  I had a scene height of 350  and I subtract the height of my player to get the y coordinate so It would be standing on the ground instead of dangling  up in the air.

I realize that. Wasn't giving you a hard time, I was just putting emphasis on my understanding.

ajimundi

  • *
  • Posts: 230
Okay, folks. I have one last issue: My characters like to duplicate on transition...eventually they start to look like a human tower.  I've been trying to kill my actor before transition (Which, I'm guessing is what that extra code from sonics was for.) but I can't seem to find it...

Maybe the actor creation code was triggered multiple times? Perhaps you should post a screenshot of your behavior so everyone can look into it and see what's wrong.
::: It's never too late, unless you're dead. Maybe not even then. :::