Negative numbers in integer attribute problem.

DanielDoeDanielDoe Member Posts: 307
Is there a way to keep integer attribute always positive or equal 0 (e.x. 5-10=0)? I thought that integer is always positive, but during a game I realized that it gets negative numbers as well. In my game I have simple leveling system. When you progress (higher player level) you gain less points for killing enemies, but you kill them much easier.

MyLevelProgress=MyLevelProgress+(MonsterScore-PlayerLevel)

If the killed monster with score=5 and my players current level=10 I get -5 which makes the progress of payer impossible.

Answers

  • DanielDoeDanielDoe Member Posts: 307
    Thanks! I checked it in GS Manual (official) and there was no information that Integer can be negative... only positive exaples.
Sign In or Register to comment.