Camera not following player (SOLVED)


I had an idea on how to save on levels in the editor. What if the level select was on the same level as all the levels in the game, which leaves me with extra levels to do other things. But the camera object refuses to follow the player for some reason I can’t fix. can someone help me fix this stupid bug?

can u link the game

Ok through my own game Monster County heres what to do just have your camera block look like this.

I really don’t know whats causing this. Probably a bug.

It’s because it’s taking the Player’s X and Y value and is constantly adding it to the number.

If the player is on the coordinates 32 by 32, it’ll keep adding 32 to the number indefinitely. You want to put the Globals into the Set input of the number.

If you want to add a level select screen that takes place before the game starts, put switches before the globals that are turned off until a level is selected. And then use custom coordinates into the Camera’s Set X and Set Y input so that the camera is mounted at the level select screen before being shifted over to the player.

I made extra number blocks that resets the main blocks to 100, (for an offset) so that shouldn’t do anything.

Made a new code chunk:

And I’m not dumb I know how to use the camera block, I just need to make the camera move with the player from a different object.

I never said you were dumb but I just did not know if you knew how to use a camera besides I had no idea what your game was and what situation you were using the camera in so I gave what I thought would be helpful advice.

2 Likes

Okay, sorry but this bug is weird. If I change the camera block onto the player instead of the camera object, It still doesn’t work, so it is a very weird bug, or I had somehow broken the camera in my game

Think of something that’s specific to you something like your internet provider or perhaps your device or anything else and that’s probably the reason why its not working and it could even be your location. but whatever it is is more specific to you. and maybe other people as well.

image
New unworking system. Anyone have any new ideas?

EDIT: Should I @ someone?

What do you want the camera to do?

So I have a camera object that follows the player, I made a level selector on the same level page as the levels. I need the camera to move to the selected level after it has been selected, but it refuses to move even when I make it by default on the level and won’t even move with the player.

can you link the game

Should we call CodeAppalca or Grazer? Maybe they could help?

If you send the link to the game, then I’m sure someone already here would be able to help.

I am an idiot, The level selector was a ui object, so it was always plastered on the screen!
It has been solved

Nice it was solved sadly I was at school though what a shame.

IKR?