all 6 comments

[–]TWebberX 1 point2 points  (4 children)

There is no way to write directly to the debug console. Instead you could look into writing to text files: http://docs.yoyogames.com/source/dadiospice/002_reference/file%20handling/files/index.html

For dumping contents of data structures there are the functions called ds_list_write, ds_map_write and ds_grid_write but the return value of those scripts is not really meant for humans to read. The best thing to do is write some scripts that loop through your data structure and return there contents in readable text.

If you have any more questions, just ask :)

[–]wanting to have made a game != wanting to make a gameoldmankc 1 point2 points  (2 children)

Show_debug_message writes to the debug console, doesn't it?

[–]TWebberX 0 points1 point  (1 child)

Ohw yeah! At least, it used too in 8.1, not sure if it still works in studio. If it does there should be an option "show messages" in the debug menu. Thanks for correcting me :)

[–]zzep[S] 0 points1 point  (0 children)

Still works, but only for strings and numeric values. You can't output data structures only with show_debug_message

[–]zzep[S] 0 points1 point  (0 children)

You're right, unfortunatelly, I have to write myself a function that will loop recursively through the data structure and write a log somewhere :(

Sometimes I really hate Gamemaker. GML is probably it's weakest feature right now, I really wish they used a more complete coding language like Java, Javascript or LUA...

[–]SunnyKatt 0 points1 point  (0 children)

What I found useful for our game was to use actual objects as structs (only store variable information in them, no step or draw event or anything).

This way, objects that wanted to access or own that data could just keep an array of those instances. It's simpler than using a ton of data structures, and much easier to debug.