Page 1 of 1

Global Variables and debug mode

Posted: Tue Mar 30, 2021 12:28 am
by cartons
I've noticed when I turn on debug mode, that the engine calaculates Global variables every 'heartbeat'. I can imagine this will get quite heavy (and make debug mode kind of unwieldy) as I add more Global variables to the game.

My question is: Within what parameters are Local variables calculated? Will they remain constant whenever I return to the map or conversation it is located in, or is it reset?

Any tips on managing variables so my debug won't list a hundred Global calcs with every step?

Re: Global Variables and debug mode

Posted: Wed Mar 31, 2021 3:06 am
by slowdive
I wasn't aware that all global variables are printed out to the log on each heartbeat. Maybe that is something Karl added in more recent versions? It used to only print out the variable information when a variable check was being made.

Local variables are stored on an object are retained, not reset. Global variables are stored on the module itself.

I think there is a variable editor (the "variables" button by conditionals and actions) in the conversation editor that allows you to track your use of variables and their states.