G
gloomytoad
Guest
Hello,
I have been doing some pretty complex stuff in GameMaker recently and one thing that would really help is having script local macros. For instance in networking my scripts receive an array for an argument. My scripts are specific to each different packet identifier, and the data in the provided array will be different every time.
So instead of having (trivial example)
I could instead do.
And this would not auto populate in the auto complete from other scripts, as well as not being accessible. Basically on compile an "lmacro" would only work in that script that it was defined in. This would help keep things much cleaner for a lot of stuff I do.
I have been doing some pretty complex stuff in GameMaker recently and one thing that would really help is having script local macros. For instance in networking my scripts receive an array for an argument. My scripts are specific to each different packet identifier, and the data in the provided array will be different every time.
So instead of having (trivial example)
Code:
_receivedData[0];
_receivedData[1];
Code:
#lmacro X 0
#lmacro Y 1
_receivedData[X];
_receivedData[Y];