PDA

View Full Version : Prestige



EvoloZz
11th January 2013, 19:24
Hey, i have made a prestige system with 5 prestiges (using IzNoGod's account system (will of course give credit)), so i just need to know if there is any way to set some stat to some value for example, "self.something = 10;". Is that possible to do with izno's stat system? I need that to remove all xp the player got, when he goes to prestige. But doing it like "self addstat ("xp",-999)" is not good way to do it. And also "self.stats["xp"] = 0;" is not recommended way to do it as said in the readme. I hope someone who has used the file or just someone who knows might help me :P

kung foo man
12th January 2013, 03:46
And also "self.stats["xp"] = 0;" is not recommended way to do it as said in the readme.

What readme do you mean? Resetting xp/rank seems obvious, since they get a new prestige-icon for it.

I would add a stat like player.stats["prestige"] = 0; and increment it on each prestige while resetting xp/rank.

EvoloZz
12th January 2013, 08:33
Thats exactly what i am doing, but IzNoGod made his own functions for almost everything. In the readme it says:
Example of what NOT TO DO: player.stats["xp"] = 30; Do not assign values manually to the array. Thats why i am not sure what to use when i need to reset xp

IzNoGoD
12th January 2013, 10:33
self addstat("xp", self getstat("xp") * -1);
self updatestats();


Or fuck the readme and just call


self.stats["xp"] = 0;
self updatestats();


Readme is written for people that have no clue what they are doing, and noob-proof.
Only reason why you shouldnt call self.stats["xp"] = 0 is because the xp-stat might not exist. The addstat() handles that exception.

EvoloZz
12th January 2013, 10:37
Okay thanks