Code:
Problem description:
Can you please show me how to add a level cap? the var of level is just level
ID:139537
Dec 3 2010, 10:32 am
|
|
In response to Kaiochao
|
|
Ignore the comments. Probably something such as;
mob |
In response to Neimo
|
|
You'd want it to be Level < LevelCap, or else you'd be able to level up with a level equal to the cap, allowing level 11.
|
In response to Kaiochao
|
|
Kaiochao wrote:
You'd want it to be Level < LevelCap, or else you'd be able to level up with a level equal to the cap, allowing level 11. Eh, i'll edit it. Overlooked it. |
This is a basic limit that can simply take advantage of the greater than or less than operators. You would want to compare the current level with the level cap to see if the level cap is still greater than the current level. The code would go before the game actually raises your level, and it would stop the code from continuing at that point.