Instance variables

Hello there. So I found GDevelop the past few days, and it served me well for what I want to do. But there’s a little feature that I feel wasn’t documented well, and one that I feel is important.

Suppose I made an instance Obj_Enemy1. I clicked on the instance and then on Variables in the properties window of it and added instance variables to it. All is good. Now the problem is, how do I call this variable later on? I know that global variables follow the ‘GlobalVariable(var)’ format, and scene variables the ‘Variable(var)’ format. What about instance variables?

The main reason I want to make use of instance variables is to make drag and drop enemies that work while only requiring a one time setup. Otherwise I would have to make a new object of said enemy and refactor for it.

Thanks in advance.

An instance variable is just an object variable applied to a single instance of an object. So, that’s the same as an object variable.

So I take it that I can make special instance variables for specific instances? For example, if the cooldown to an enemy is 1 second, I could make it 2 seconds through an instance variable for an instance?

Yes. You can “specialize” the content of the variable.