View variable value like a debugger

Started by jomalin, Sat 23/02/2013 14:41:36

Previous topic - Next topic

jomalin

I'm new to AGS and I'm using the last version (3.2.1).

I'm debugging a game, I know AGS has the possibility to put breakpoints, and execute lines step by step, but, how can I see the value of variables like traditional debuggers? Has AGS got this feature?

THANKS

Demicrusaius

You can display variables with %d and show them in messages.
Examples ("I am currently wearing %d pairs of socks.", Sock_Variable);
There are also built in debug features for room movement, walkable-areas and inventory access, but you can always add more debug features and remove them later.
It is better to light one small candle than to curse the darkness.

monkey0506

#2
The debugger in AGS was a relatively recent addition (compared to some other outstanding issues) (meaning, no, the debugger doesn't allow that yet). Typically I will use GUI Labels with their text assigned a formatted string (String.Format) in repeatedly_execute for this purpose.

Display and even AbortGame can also be useful, depending on what you need to know.

Demicrusaius

I like the idea of making a specific GUI to handle whatever the debug needs in your game are. If you need to set variables, display them, move characters or anything else just set a keyboard shortcut to toggle the GUI on/off.
It is better to light one small candle than to curse the darkness.

Crimson Wizard

Quote from: Demicrusaius on Sat 23/02/2013 22:08:06
I like the idea of making a specific GUI to handle whatever the debug needs in your game are. If you need to set variables, display them, move characters or anything else just set a keyboard shortcut to toggle the GUI on/off.
There was a module for viewing object parameters: http://www.adventuregamestudio.co.uk/forums/index.php?topic=46442.0

SMF spam blocked by CleanTalk