-1
\$\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\$
1
  • \$\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\$ Commented Oct 4, 2017 at 14:26

1 Answer 1

-1
\$\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\$
1
  • \$\begingroup\$ To the one who downvoted both my own question and answer out of sudden after 2,5 years, please give me a reason to do so. \$\endgroup\$ Commented Apr 30, 2020 at 6:35

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.