PDA

View Full Version : Level Conditional Script


harIII
09-27-2009, 01:18 PM
I'm am making a force power that is suppose to increase in strength as you level up. I need a conditional script that states something to the effect of, "if the PC is at level 1, the power does 10 units of damage; if the PC is at level 2, the power does 20 units of damage and so on."

Nirran
09-27-2009, 02:08 PM
try this


int nDamage;
int nPCLevel = GetGlobalNumber("G_PC_LEVEL");
if(nPCLevel == 1){
nDamage = 10;
}
else if (nPCLevel == 2){
nDamage = 20;
}


that wont compile,but its one way of doing it

Nirran

harIII
09-27-2009, 02:12 PM
wow, thanks; that was quick. I'm not at the point to where I can start working on the power yet, but I'm close and I'll try it then.