Posted By
|
Message
|
phanto
Registered 21/09/2005
Points 70
|
27th November, 2007 at 11:54:39 -
Alright so I'm making an RPG, and when you put a point in Stamina you get +10 hp, and if you level up you gain +5 hp. Base hp is 20. But everytime I change the maximum value of 'HP' (normal Counter) with "change HP max value to ((max value of HP) +5)" MMF changes the current HP value to 0 aswell. Which is kind of annoying because then you die. Same if it's supposed to change max HP value when putting a point in stamina- it reduces current HP to 0 aswell as changing the max HP.
So anybody have a better idea of how to do this or know any way to work around this?
Thanks.
n/a
|
AndyUK Mascot Maniac
Registered 01/08/2002
Points 14586
|
27th November, 2007 at 12:29:59 -
Why does it change a different value?
if you're adding to the max hp vlue it should not change anything else unless you tell it to in the events somehow.
It's not really something we can fix unless you show us your source.
.
|
axel Crazy?
Registered 05/02/2005
Points 4766
|
27th November, 2007 at 13:06:16 -
Yeah, it shouldn't do that. It must be something with your code. If you can't fix it though, just use a separate variable to store the maximum value.
n/a
|
phanto
Registered 21/09/2005
Points 70
|
27th November, 2007 at 17:45:34 -
Yeah I guess it's something in the code then... I'll redo the whole thing, and if it doesn't work this time I'll give you the source to check
thanks
n/a
|
yuyu
Registered 13/05/2003
Points 202
|
27th November, 2007 at 18:15:01 -
I dont know why it would do that,
but before you add to the max value store the current value in a hidden counter and simply retrieve it after changing the max value.
n/a
|
phanto
Registered 21/09/2005
Points 70
|
27th November, 2007 at 19:21:02 -
I made separate counters for current and max values and made a horizontal health bar based on that, works great. thanks for the ideas
n/a
|
|
|