Modifying level up scripts

+
Modifying level up scripts

Hello,

I'm having an issue trying to mod the level up scripts in player.ws...I am trying to make it so you receive 1 talent point from levels 1-14, 2 from 15-29, and 3 from 30-35.
I successfully modded the values, but the issue I'm having is when I hit level 15 or 30, I level up twice. I go straight from 14-16 and from 29-31. Any idea what I'm doing wrong?

Here are the values I edited
 

Attachments

  • scripting.jpg
    scripting.jpg
    87.1 KB · Views: 56
I would see an issue with level 14, not 15. With level 14 it would level to 15 then in the next if block to 16.
so use an if - else if - else if construct for your code instead of an if - if - if sequence.

I would suggest to replace for example
if (level >= 15) if (level < 29)
by
if ((level >= 15) && (level < 29))

to get the else if construct easily applied.
 
Last edited:
Top Bottom