Discussion Persistent objects not working in GMS2

Discussion in 'GameMaker Studio 2 Community Tech Support' started by samyak, Dec 16, 2018.

  1. samyak

    samyak Member

    Joined:
    Jul 19, 2016
    Posts:
    81
    In GMS 2, persistent objects do not seem to work normally when the room is changed. Only the variables in it work normally.
     
  2. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,217
    Could you give an example of the issue? "not working properly" doesn't really tell us what the issue is.... I'm using a persistent controller object in my current WIP that draws the cursor or gamepad/keyboard commands to the screen, and it's working fine.
     
  3. gnysek

    gnysek Member

    Joined:
    Jun 20, 2016
    Posts:
    1,245
    Never have an issue with them during last 2 years in GMS2, so it's rather you have a mistake in code, or mistake how they works. Or you have placed two objects at same position, and they seems to break (I have issue like this once, and it took me 2 days to find it out!).
     
  4. samyak

    samyak Member

    Joined:
    Jul 19, 2016
    Posts:
    81
    https://drive.google.com/open?id=15ssmcCLMlxFJC9LUVCKB-pk1u2z_hPZT

    Plz check this sample project. The box doesn't rotate when the room changes
     
    Last edited: Dec 16, 2018
  5. gnysek

    gnysek Member

    Joined:
    Jun 20, 2016
    Posts:
    1,245
  6. samyak

    samyak Member

    Joined:
    Jul 19, 2016
    Posts:
    81
    It took me so many hours , just to prove to myself that I was not dumb. I tried so many things to bypass this problem in a game I was making, inithe end I had to do the job without using persistent object

    Thank you for confirming.
     
  7. gnysek

    gnysek Member

    Joined:
    Jun 20, 2016
    Posts:
    1,245
    @samyak from description in ticket, it seems that changing position of object fixes this issue, so maybe try to write "x = x+1; x = x-1" in "room start" event, as a bypass for now ? not sure if this "movement" to bypass need to be done in 1 frame or 2 frames of game, but I doubt there will be an update this year, so you won't get it until mid-January - it's about one month, so finding another solution is a good idea :)
     
    samyak likes this.
  8. samyak

    samyak Member

    Joined:
    Jul 19, 2016
    Posts:
    81
    Aside from the bugs, GMS2 in the latest update freezes on various occasions, fails to open many times, game starting/compilation time on an average is now longer, etc etc. It's frustrating
     

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