So, I'm having troubles with interactions. Basically, I'm trying to figure out how to have a dialogue box appear when the play is in an area 2D while also having pressed a button (in this case it's enter).
And while I did have it so that the game would crash when you did this, it no longer does.
Also to note, in case this is important, I have the code in the Area2D code. Thought I should point that out.
var inarea = false
export var text = ["A broken Cart."]
if inarea == true:
inarea = true
inarea = false
That is the code.
As you can see, I'm trying to call a variable from another script for the dialog box to display. It isn't working. Anyone have a solution?