Results 1 to 6 of 6

Thread: Object Lua Script - only original values show in Lua Editor?

  1. #1

    Object Lua Script - only original values show in Lua Editor?

    I've been meaning to ask this for some time. When I right click an object on the table and display it's Lua script. Any displayed variables defined in the script are not current, but are whatever the original definition was when the object was instantiated. This is less than ideal for debugging purposes.

    Is this by design?
    Can it be changed to display current variable and table values?

  2. #2
    I'm not sure, what you're asking for. But a separate window, that shows the current values of the variables of an object, would be a good idea.

  3. #3
    Join Date
    Mar 2016
    Wait, were you expecting Lua script inside an object that sets a variable or table to a value (let's say, "variable=1") to somehow automatically update when the value of "variable" is changed by code?

    Values in memory certainly change when code changes them, but non-transient values encoded in script do not change unless you read/rewrite the Lua script (and then, a save/reload is required to instantiate those new scripted values)

    Not sure if that's what you are expecting, but thought I'd clarify at least that part.

  4. #4
    Yeah - its silly but I thought the values would change.

  5. #5
    Join Date
    Mar 2016
    I wouldn't call it silly. It's something that might seem intuitively right. It's just not the way that code works.

    I do love the idea of some kind of dashboard in Atom that would show the value of variables in memory, and update them realtime, but that's heavy IDE type functionality that I don't expect to see anytime soon.

  6. #6
    You can fake it with Global.onUpdate() getting objects' Guids and printing data that is exposed in the game console and in Atom's JS console.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts