Aller au contenu

Photo

Encountering an odd bug when increasing character attributes


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
sea-

sea-
  • Members
  • 264 messages
Need some help here.  I'm trying to run a script that increases the player's maximum stamina when run.  It's supposed to add the fixed amount of 10.  However, when run, it seems to add varying amounts - a character with 105 stamina gets boosted by 15 to 120, and a character with 125 gets boosted to 160.  The script I'm running to do this contains the following logic:

SetCreatureMaxStamina(oPC, (GetCreatureMaxStamina(oPC) + 10));

I tried using the following setup instead:

object oPC = GetHero();
int iOldStamina = GetCreatureMaxStamina(oPC);
int iNewStamina = iOldStamina + 10;
               
SetCreatureMaxStamina(oPC, iNewStamina);

However, that led to the same result.  Any help here?

Modifié par sea-, 27 avril 2011 - 01:03 .


#2
sea-

sea-
  • Members
  • 264 messages
Sorry to bump this, but any ideas at all from anyone would be appreciated.