Once a function is called and it has it's parameters, the parameters can be thought of as local variables, you can use them much like variables in triggers except that you shouldn't be altering the value of a parameter, which is why programmer's usually create local variables inside a function and then SET it to a parameter, so they can always modify that new local variable without messing with the parameter.
This is so wrong I want to hit you. Please, never, EVER, post such obviously wrong crap.
When you act on a parameter, unless it is a pointer-type (unit, doodad, actual in-game objects that the variable is referring to) it is not changed. Parameters are copied by value, not reference. This is true of every single freaking programming language ever, unless you specifically state you want to pass a variable by reference.
Furthermore, if it is a pointer-type, setting a variable equal to it still does nothing. You still get a reference to the same object.
int, char, String, boolean or bool, double, float, and many more.
This is not Java. It is "bool", "string", "fixed" (instead of double/float). Lowercase. Galaxy cares about that. Please learn the language you are writing a tutorial on.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
This is so wrong I want to hit you. Please, never, EVER, post such obviously wrong crap.
When you act on a parameter, unless it is a pointer-type (unit, doodad, actual in-game objects that the variable is referring to) it is not changed. Parameters are copied by value, not reference. This is true of every single freaking programming language ever, unless you specifically state you want to pass a variable by reference.
Furthermore, if it is a pointer-type, setting a variable equal to it still does nothing. You still get a reference to the same object.
This is not Java. It is "bool", "string", "fixed" (instead of double/float). Lowercase. Galaxy cares about that. Please learn the language you are writing a tutorial on.