Results 1 to 5 of 5

Thread: Prestige

  1. #1
    Sergeant EvoloZz's Avatar
    Join Date
    Sep 2012
    Location
    Helsinki, Finland
    Posts
    360
    Thanks
    314
    Thanked 167 Times in 120 Posts

    Prestige

    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

  2. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Quote Originally Posted by EvoloZz View Post
    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.
    timescale 0.01

  3. #3
    Sergeant EvoloZz's Avatar
    Join Date
    Sep 2012
    Location
    Helsinki, Finland
    Posts
    360
    Thanks
    314
    Thanked 167 Times in 120 Posts
    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

  4. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Code:
    self addstat("xp", self getstat("xp") * -1);
    self updatestats();
    Or fuck the readme and just call
    Code:
    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.

  5. The Following 2 Users Say Thank You to IzNoGoD For This Useful Post:

    EvoloZz (12th January 2013),kung foo man (12th January 2013)

  6. #5
    Sergeant EvoloZz's Avatar
    Join Date
    Sep 2012
    Location
    Helsinki, Finland
    Posts
    360
    Thanks
    314
    Thanked 167 Times in 120 Posts
    Okay thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •