• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

 Text auto-completion shows other instances object variables?

D

Daruu

Guest
Is that by-design, or just a bug? In the first case, I don't see the point...

I name my variables something like iv_var (instancevariable_var) and I expected them to not show on autocompletion in other objects.
 

Tthecreator

Your Creator!
I like this way of auto completion, but that it gets the variables for all objects is a bummer.

Then, if you are working on a script, it might get used in different objects, or the IDE might not know what object it's in.
To fix this they would have to make some checking stuff to check if functions are used or not.
That gives another problem for when the developer creates a script but didn't put it in an object yet.
 

Mike

nobody important
GMC Elder
It's not possible to know what variable belongs to what instance. Since there is no object definition, and you can define variables anywhere, at any time, the compiler does not know what variable belongs to what. This is only clear at runtime.
 
D

Daruu

Guest
Then I think this autocompletion does more evil than good... I'd imagine how this would be in a project with a lot of objects :)...
 

Jobo

Member
GMC Elder
You still know where your variables are. The developer should know where variables have been declared... Autocomplete just helps you write them.
 
D

Daruu

Guest
You still know where your variables are. The developer should know where variables have been declared... Autocomplete just helps you write them.
It certainly doesn't help when it lists all instance variables for all instances, might as well have the create event of an object on the other half of the screen.

That being said, I understand the limitations of the engine, built as it's built, but that doesn't make this good, haha. And yes, I normally remember where my variables' at, but I think it still isn't the developer fault to don't recall how exactly something was named, that's why some of us start instance variables with "_" which, by the way, auto-complete doesn't recognize until you input a letter after it (and that yeah, it's a matter of time to improve, I know).
 
I

Inge Jones

Guest
This could be solved by introducing the idea of user-defined object Properties, which are defined on the Object Properties panel. I am happy to do without this feature for variables "declared" in the Create event etc.
 
J

James Gonzalez

Guest
I think I'm experiencing the same nuisance.

EXAMPLE:
I have two objects named obj_one and obj_two in my resource tree.
In obj_one create event code, I initialize a variable named m_object_health = 100;
Now in obj_two create event, if I type "m_" then press "ctrl+spacebar" I see obj_one's m_object_health variable.

I know I'm not scoping incorrectly, but this is now misinforming me of what variables I have available in my current scope.
Is this the same thing you all are experiencing?:confused:
 
P

psyke

Guest
The problem I'm having with showing EVERYTHING in the auto-completion dialog is that it gets slower overtime.
My project right now is very big and has lots of variables, it takes up to 5-6 seconds to show the dialog when I type ".", and the engine freezes for that period of time.
 
C

Claire

Guest
The problem I'm having with showing EVERYTHING in the auto-completion dialog is that it gets slower overtime.
My project right now is very big and has lots of variables, it takes up to 5-6 seconds to show the dialog when I type ".", and the engine freezes for that period of time.
Please report this as a bug at https://account.yoyogames.com/report-bug and please include a link to your project hosted on dropbox or something similar (rest assured your project will be kept private).
 
Top