[SOLVED]Scene Transition Glitch

RosalinaGalaxer

  • Posts: 239
Hey all, I'm back with that glitch I was talking about!

I've attached the code for the scene transition, but I'm pretty much going to let the gif speak for itself. Both scenes are connected to each other: I'm not popping into a scene I didn't know about.



Also, please ignore the giant six above my head, that was for testing purposes and I forgot to remove it.

« Last Edit: April 16, 2018, 01:49:29 pm by RosalinaGalaxer »
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

corbanwolf

  • Posts: 223
Try replacing [Y] with [Y-2]. The [x - x] can be found in maths actions. Try again if it happens, please
♪♪♪♪♪♪

JeffreyDriver

  • Posts: 2262
So those are the two same scenes?  And you're just going back and forth? Can I see the code that set your X and Y attributes.

RosalinaGalaxer

  • Posts: 239
Try replacing [Y] with [Y-2]. The [x - x] can be found in maths actions. Try again if it happens, please
Odd request, but whatev. Tried it, and it spawned the player two pixels higher, as expected. The glitch still happened, however.

So those are the two same scenes?  And you're just going back and forth? Can I see the code that set your X and Y attributes.
Correct. If I leave "Test 1" and enter "Test 2" once, it's fine. If I enter "Test 1" again and re-enter "Test 2", the above occurs. I tried messing around in "Test 1" for awhile after re-entering it, but it made no difference. Code is attached. The code is located in the player, obviously.
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

JeffreyDriver

  • Posts: 2262
Can you try sticking that code in a 'when actor exits scene'

RosalinaGalaxer

  • Posts: 239
When I tried that, it didn't trigger, so now I have an invisible actor with physics off that only collides with the player.
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

letmethink

  • *
  • Posts: 2545
Is the y game attribute being set or changed anywhere else?
~Letmethink

RosalinaGalaxer

  • Posts: 239
Not as far as I know. I'll check next time I'm on Stencyl.
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

NickamonPoppytail

  • Posts: 1141
I think that the reason the player gets stuck in the ground may be because they’re being created where they would be as if the two scenes are connected, but since the scene you get stuck in the ground begins with a square collision tile higher than what the ground was on the scene beforehand. Because the player is placed at the same height from the previous scene, they are created from inside the ground.

Two potential solutions I can think of are destroying the first tile higher than the ground level on the first scene, or if you really want to keep that you need to figure out some way of detecting the ground height from the bottom of the scene and then creating your player accordingly. Maybe checking a game attribute?
Upcoming Projects
Poppytail 5 and Pixeltail: Fifth and sixth main instalments in Poppytail series. A Game About Trimming Hedges: Final Version: An updated version of the original AGATH. One Million: Last-one-standing style small project. The Poppytales: Platformer boss rush with character collecting. Skies n' Fall: Boss rush shooter prequel to Rise n' Brawl. Precious: Weird platformer. Christmas Time 2: Sequel to Christmas Time 1.

RosalinaGalaxer

  • Posts: 239
Is the y game attribute being set or changed anywhere else?

The y attribute is not being changed anywhere.

I think that the reason the player gets stuck in the ground may be because they’re being created where they would be as if the two scenes are connected...

Both scenes start at seven  tiles high. Though that is a valid thought.


EDIT: I tested connecting "Test 1" to a third, completely unrelated scene, and the same glitch still occurs.
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

letmethink

  • *
  • Posts: 2545
If you use "y of 1st actor" rather than the game attribute y does the glitch still occur?
~Letmethink

RosalinaGalaxer

  • Posts: 239
Nope. Weeeeeiiiiird. Oh well. Now I just have to figure out why it spawns multiple characters on scene change.
Nevermind, fixed it.





Woot! 100th post!

« Last Edit: April 16, 2018, 01:50:00 pm by RosalinaGalaxer »
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz