Endless actors Scene switching(SOLVED 3/13/2014)

duke22122

  • Posts: 33
So I am making a endless survival game. Right now I have a main character that has to dodge blocks that come flying at him. When I load into the game from the main screen the first time the game goes fine. When I load into the game after a death from the death screen there are no flying blocks coming at me to avoid. Just my character jumping around having nothing to dodge. I am very new to building games so hopefully this is a simple fix. Please help any input would be great! When I restart the game I am brought back to the main screen where I started. So the first time playing through I have blocks to avoid. Every time after that there are no blocks when I restart the game.

« Last Edit: March 13, 2014, 08:37:59 am by duke22122 »

sdieters

  • Posts: 2068
can you post a screenshot of your behaviors that spawn the blocks?
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

duke22122

  • Posts: 33
photo is attached.

duke22122

  • Posts: 33
This is my main scene switch from main scene to scene that the game is played on.

sdieters

  • Posts: 2068
what i think is that the block is created behind a layer so you cant see it the second time. try spawning the blocks in the middle or even the front
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

sdieters

  • Posts: 2068
btw can you show me the behavior that is attached to the blocks?
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

duke22122

  • Posts: 33
Middle caused the blocks to not be visible the first time round but they still hit my character and killed him. once contact was made the blocks were visible. They were still not there second time around. Front was the same result as middle.

duke22122

  • Posts: 33

sdieters

  • Posts: 2068
okay so it is a layer problem. why exactly do you have the extra layer? cant you simply use 1 layer?

and i see a problem with your block behavior, since the blocks will always be active. this will mean that if you dodged 300 blocks, your pc still needs to controll all of them, even if they are off screen. you could say something like:

when created,
do after (time it takes to leave the screen) seconds,
kill self
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

duke22122

  • Posts: 33
The reason I have two layers is 1 for everything on the screen. The second layer is the restart Letters that show up. They are a hidden layer while playing and then when the character dies the layer becomes unhidden to tell the player to press enter to restart the game. That is how I learned it in a tutorial on youtube.

As for the blocks I will add that in there now. Thank you!

sdieters

  • Posts: 2068
i cant figure it out this way. would you mind sending me the sstencyl project so i can have a better look? you can do this in a pm if you want.
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

duke22122

  • Posts: 33
I just downloaded stencyl yesterday. Honestly don't even know how to do that yet.

sdieters

  • Posts: 2068
file >> export game. this creates a .stencyl file, that is what i need =)
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

duke22122

  • Posts: 33
Can't find a way to insert an attachment in a PM lol.

sdieters

  • Posts: 2068
you need to upload it to something like dropbox and send me the download link =)
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p