Is there a way to dump/print an objects information to the console or something else that is human readable?
For-instance, if I have the fallowing lines of code:
var flag = wade.getSceneObject('moveflag');
wade.iso.moveObjectToTile(flag,1,1);
Is there any way to print out the full contents of the variable "flag"?
So far, the best I can do is either use "console.log(flag)" or "console.log(flag.some_property_to_show_that_it_is_object_moveflag)". The first will just print out "[object Object]" which at least tells me it is defined and the second will give me what ever property i set which I would think tells me the right object is being referenced. However, that doesn't seem to be enough because something is going wrong and those methods aren't telling me what.
Like when using the above 2 lines of code; in a behavior I'm working on, I get the fallowing error after almost every other moveObjectToTile function call:
Uncaught TypeError: Cannot read property 'object' of undefined (isoCharacter.js, 378:39)
Literally, the function call only works about half of the time. It goes off without a hitch the first time, fails the second time, works the third, fails the forth, works the fifth, sometimes the sixth but usually not, definitely the seventh, maybe the eighth...etc. It's weird. If it always failed, it'd be easier to figure out but this sometimes working, sometimes not is confusing me. I figure, if there was a way i could get more info about the, well, info being passed to the function, i might stand a better chance of figuring out what i did wrong.
Anyway, thanks all!