xoros's Forum Posts

  • I am getting an error "Order is not defined" when I "load all" and than do "for each itemID" on load_all complete. I tried to log the loaded results to JSON and it loads everything correctly.

  • Oh, but I thought it will create server traffic )

  • What do you think, is there any solution how to save updated values onDisconnect only? Sort of an auto save?

  • So it's ok to call it every time? It will not create server traffic?

    How does exactly onDisconnect work? It saves the value locally and the server listenes to on disconnect and than when user disconnects from firebase calls this stored value from client side?

  • Yes, I think its coming from the server and refers to the value called instantly on start of the layout. I might try C2's browser event on "going offline".

    What do you mean by another store on disconnect private variable?

    If I call on disconnect set value each time the variable changes, will something be trigger on the server each time or only when I disconnect? It's difficult to explain ))

  • I modified your example in order to show what I want to achieve. If I change the variable value after I set a callback, it saves the old value on disconnect.

    https://www.dropbox.com/s/7pgqt6r0jzpap9h/set%20value%20on%20disconnect1.capx?dl=0

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That's exactly what I am doing. But it saves old values from the dictionary on disconnect. I assume it stores the value from the dictionary on callback and does not update it.

    May be it's not even possible the way I am trying to do that.

  • Hmm, the thing I want to achieve is that it saves updated values on disconnect. And now it saves the values which were on "start of layout".

  • rexrainbow

    about disconnection event handlers: if you pass a variable value or any value that can change onDisconnect handler and after that variable changed, the old variable is saved to the database on disconnection instead of a new value. Is it possible to update the passed value on disconnection? I assume the variable value stored somewhere and not gets updated

    Example

    ->on start of layout add disconnect handler with variable value (5)

    ->change variable to 12

    -> disconnect saves 5

  • thank you!

  • rexrainbow

    firebase_timer plugin throws an undefined error on Timer.Remove action

  • True, it works, but something is missing. In order to get a local variable autocompleted, you have to specify an object first. Would be cool if it will start suggesting an object+variable after you started to type it.

    E.g. object "sprite" has a local variable "health". By typing "hea.." auto complete shows the option "sprite.health".

  • Hello there,

    Ashley - There's auto-complete for function and group names, but why is there no auto-complete for variables (global/local/object variables)?

  • R0J0hound

    Sometimes objects with chipmunk physics do not register standard overlapping/ on collision events. Actually they do not register most of the time. They tend to register standard collision only if collision impact is very strong (was moving at high speed). Is it a bug or a feature?

  • по идее плагин должен более эффективно использовать ресурсы, чем ивенты С2, если он грамотно написан конечно. И здесь вопрос не в том, что самому ивенты писать или нет, а в удобстве использования и модулярности. Где ты видел чистый код в конструкторе?