P
PoiKat
Guest
Apparently this post wasnt supposed to be in the Visual Studio Development forum. Oops. Anyway, here we go...
Im working on a character creator for a table-top game. One thing I want the program to do is be extremely user-friendly.
For example, when a gamer increases the strength (base score) by 1, the hit points (secondary score) increase as well. When they increase the hit points by 1, only the hit points increase. That part Ive figured out, for the most part. Heres where Im having trouble. If someone increases their strength, then increases their hit points as well, but decides to decrease their strength again, I want the hit point total to remain scaled to the strength. For example:
Strength = 10 + 1 (11) Hit Points = Strength (11)
Hit Points = Hit Points + 1 (12) Strength = Strength (11)
Strength = Strength - 1 (10) Hit Points = Strength + 1 (or 11 because the base score was reduced, but the secondary score was not)
I keep running into the problem that when I change the value of "Strength," "Hit Points" changes to whatever Strength is rather than keeping its own increase or decrease in value.
What I keep getting is this:
Strength = 10 + 1 (11) Hit Points = Strength (11)
Hit Points = Hit Points + 1 (12) Strength = Strength (11)
Strength = Strength - 1 (10) Hit Points = Strength (10)
It doesnt seem to be keeping the extra hit points when the strength is changed and Im unsure how to fix it. The Hit Points need to be based off Strength, but also be able to be increased or decreased independently.
The other thing it keeps doing is adding weird numbers. Im not really sure how its miscalculating things, but when I add + 1 to Strength, then add +1 to Hit Points, the points spent should be 12 but they end up being 14 (2 points per extra hit point). Plus, when I decrease the Hit Points, it still adds points as though I spent them rather than gained them back. So, when Ive spent 14 points and decide to take 1 Hit Point off, the Hit Point number goes down, but the points spent goes up.
Any help would be greatly appreciated! Let me know if Im supposed to send code. Ive not posted here in a long while.
Thanks!
PoiKat
Continue reading...
Im working on a character creator for a table-top game. One thing I want the program to do is be extremely user-friendly.
For example, when a gamer increases the strength (base score) by 1, the hit points (secondary score) increase as well. When they increase the hit points by 1, only the hit points increase. That part Ive figured out, for the most part. Heres where Im having trouble. If someone increases their strength, then increases their hit points as well, but decides to decrease their strength again, I want the hit point total to remain scaled to the strength. For example:
Strength = 10 + 1 (11) Hit Points = Strength (11)
Hit Points = Hit Points + 1 (12) Strength = Strength (11)
Strength = Strength - 1 (10) Hit Points = Strength + 1 (or 11 because the base score was reduced, but the secondary score was not)
I keep running into the problem that when I change the value of "Strength," "Hit Points" changes to whatever Strength is rather than keeping its own increase or decrease in value.
What I keep getting is this:
Strength = 10 + 1 (11) Hit Points = Strength (11)
Hit Points = Hit Points + 1 (12) Strength = Strength (11)
Strength = Strength - 1 (10) Hit Points = Strength (10)
It doesnt seem to be keeping the extra hit points when the strength is changed and Im unsure how to fix it. The Hit Points need to be based off Strength, but also be able to be increased or decreased independently.
The other thing it keeps doing is adding weird numbers. Im not really sure how its miscalculating things, but when I add + 1 to Strength, then add +1 to Hit Points, the points spent should be 12 but they end up being 14 (2 points per extra hit point). Plus, when I decrease the Hit Points, it still adds points as though I spent them rather than gained them back. So, when Ive spent 14 points and decide to take 1 Hit Point off, the Hit Point number goes down, but the points spent goes up.
Any help would be greatly appreciated! Let me know if Im supposed to send code. Ive not posted here in a long while.
Thanks!
PoiKat
Continue reading...