Global Variables

global.interact

global.interact is used inside Undertale to determine the current state the game should be insde. The following is the usage for global.interact in UNDERTALE

global.interactDescription
0 Free movement, not interacting with anything
1Cutscene or when interacting with an object
2Specific to Ruins, post-spare Toriel cutscene in basement
3Room transition (entering battle, shops, and some cutscenes count as well)
4Used when falling through the floor. Examples are the cracked tiles in Ruins and falling off the Snowdin ice puzzle
5Menu is open. Setting to any other value will close the menu if it is open
6Specific to Ruins, used when Toriel leads you across the bridge of spikes
99Specific to Ruins, used when you flip a “plot switch” (wall-mounted switch to disable spikes) and during Toriel’s hand-holding cutscene in her house.