Vai al contenuto principale

Ricerca

Cannot get variable to persist

  • mmdev6

    Hi there!

    In you second level have you maybe got a variable modifier setting the variable anywhere in the scene that could be overriding the variable?

    And to be sure, the variable that is identical across both scenes, they both have an initial value of zero right? Although I don't believe this should cause an issue.

    Is your creation published? Or are you able to show some screengrabs of your logic involving the variables? As long as they're both in the same dream it should come across.

    Thanks,
    Catherine

  • LadyLexUK
    Conversation starter

    No, there is no modifier changing back to zero, and the variable has to be identical it was a remix of the level. I will try again and make a video if it still doesnt work.

  • LadyLexUK
    Conversation starter

    I remade the whole thing from scratch and now it works how I expect it to. All I can think was that the Dream level had not updated and was showing an earlier version of one of the linked levels without the correct code, though I thought I had ruled that out.

  • mmdev6

    Hey!

    That's great that it worked! Thanks for keeping me up to date!

    Less great on doing it all from scratch, perhaps it was an update issue!

    Generally the persistent variables are amazing and can allow you to do a lot of cool things, if you have any more issues don't hesitate to ask away LadyLex!

    Thanks,
    Catherine

  • Rabagast

    I have the same problem. It worked, but then I added another scene, then it didn't work anymore.

    I use a variable to check if it's 1 or 2 player game. When I click on 2 player, and start the scene, it starts 1 player. Does the variable needs to have an initial value of zero?

  • Rabagast

    I got it to work. I changed the name of the variable, so probably there is another variable with same name which cause the problem. I just need to find it. ?

Accedi per aggiungere un commento.