D
Dwighty4000
Guest
I have a game with a limited camera view that tracks only the player. What do I have to program if I want to enter a new room and the camera should follow now follow the player in the next room along?
If I now go through a door that brings me into a no room, then I would now ever prevent the camera gets stuck in the old roomThis really depends upon how all the rest of your code is set up. For the camera system I use nothing would change at all. So you'll need to post your code.
That is a very strange sentence. I'm not even sure how to answer it.If I now go through a door that brings me into a no room, then I would now ever prevent the camera gets stuck in the old room
At first I just wanted to be sure because I once had such a problem but your information that the camera is not tied to the room but only on a project has helped me a lot further!That is a very strange sentence. I'm not even sure how to answer it.
With the exception of room, none of those are built into GM, so you'll have to explain what you mean, and again post your code, if you want an answer. Also the way you're using the word room makes me wonder if you are referring to a GM room or something else.
- What is a door?
- What do you mean by room?
- How does a camera get stuck?
A GM camera cannot get stuck on anything. You can't even code it to 'get stuck' on something. You could make it track an object and have that object get stuck on something, but the camera can't. Also, camera's don't go from room to room, at least not if you're using the built in ones (which you should be). You just want code that takes a GM camera in a room and points it to whatever you want. Also, only persistent objects go from room to room. If your player is persistent then its id won't change so there would be no issue. If it is not persistent, then it is as simple as finding the id of the new player instance, or if there is only one, using the object id.