GM:S 1.4 Object appearing in room despite never being placed or created?

Discussion in 'Programming' started by Craiie, May 30, 2018.

  1. Craiie

    Craiie Member

    Joined:
    Apr 22, 2017
    Posts:
    9
    Hello.

    I have my character obj_player and I call it from another room. The player is set to persistent so if I change rooms, the character keeps it's stats and stuff. But, for some reason, when I enter this one room the character appears 2 times but one is in the middle and is unmovable.

    I tried to change the rooms in hopes that my door system was maybe broken. So, I changed the first room to be where the character spawning is twice. I checked the room for a double instance of the player all over and nothing is there. I place the character into the room and the two characters still appear, but if I go into the room upstairs it's only one. But, if I go back into that ONE ROOM another spawns but is just static and directly at 0,0.

    I really don't understand why two of the same objects would spawn in the same room but not in any other room in the game?

    No other room does this.
     
  2. Becon

    Becon Member

    Joined:
    Jul 13, 2016
    Posts:
    109
    Did you check the actual room and see if you accidentally dropped an obj_player somewhere on the map? I have done that before outside viewing area and it drove me nuts. Also...what object actually spawns your character? Do you have something that spawns it or did you drop it in the room?
     
  3. Craiie

    Craiie Member

    Joined:
    Apr 22, 2017
    Posts:
    9
    Nope, there's nothing on the map at all. The character is static and when I do anything it doesn't move. I have my character placed in the center of another room and is persistent so it carries over. I just finished a door system but all that does is set the x and y to the coords of the character and then go to the room, so no despawning of anything.
     
  4. NightFrost

    NightFrost Member

    Joined:
    Jun 24, 2016
    Posts:
    2,052
    Check all your draw commands. Since the second player is not responding to movement controls it doesn't sound like an extra copy of the player object, but rather just a draw command somewhere planting the sprite into the room.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice