0
\$\begingroup\$

I've been busy working with Gamemaker Studio 2 and I've noticed that it has quite some build-in variables. Like 'x', 'y', 'speed', 'health'. These variables have already a set function, and it overlaps the variable I've set by myself.

I was earlier looking at a tutorial that adds an underscore to all his variables so these will appear on top once written out completely, While it worked, I didn't liked the look of all these uinderscores. hence why I was asking myself if it could be done easier.

So, does anyone knows an other method to make custom variables without the chance to have the build-in variables overlapping them?

\$\endgroup\$
  • \$\begingroup\$ GMS2 highlights built-in variables and functions with other color. And if you want to use GMS you should know built-in variables (most part of them). \$\endgroup\$ – Dmi7ry Oct 4 '17 at 14:26
0
\$\begingroup\$

After some time playing around, I've found my own way.

I can just use my own variables without the underscore at the end, and if it happens that I need to use a variable with the same name as a build-in variable. Then I'll simply add 'my' at the front, like mySpeed or myhealth.

These can appear even earlier in the intellisense as well as 'my' is pretty unique conpared to the build-in variables.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.