Redunct,
that will only server to confuse the reader further, it's not even remotely close to what I was showing, I was showing how to use constants to control the results of a script, by outlining to the script reader that you can use constants to control a script, which makes it easier for a scripter to modify a script to control how the script functions essentially.
Where the above argument started was me calling the constants = switches, so to clarify my statement, which was spurred upon the title, more than giving constants another name, I'm using constants as control switches to turn functions on / off or to change how something within the coding of script works...
example:
//Set this # to control what level the PC must be in order for
this to happen
const int THIS_CONSTANT = 5;
void main()
{
object oPC = GetLastUsedBy();
int nVar = GetHitDice(oPC);
//if the PC is the level set above, then do this...
if (nVar == THIS_CONSTANT)
{
//do
this..
}
}
Very simple scripting, truly..
Modifié par Genisys, 06 septembre 2010 - 10:15 .