Here is my problem.
I have set up my var_custom 2DA and it works, but how do you change the values of the variable declared there?
I want to keep track of the player's moral choices through a global int. I created a function that seems to work, but the EvilGood value does not stick! It always comes back as zero.
I call the function below from a trigger and it SHOULD make my PCEvilGood value keep adding up as I run back and forth across the trigger, but it does not.
void ModifyEvilGood(int x)
{
int iChange=x;
int iEvilGood = GetLocalInt(oMod,"PCEvilGood");
int iNewValue=iEvilGood+iChange;
SetLocalInt(oMod,"PCEvilGood",iNewValue);
if(iDebug!=0)
DisplayFloatyMessage(oPC, "EvilGood - Change:"+IntToString(iChange)+" Total:"+IntToString(iNewValue), FLOATY_MESSAGE, 14654488, 6.0);
}
Modifié par georage, 07 décembre 2009 - 04:56 .





Retour en haut






