LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Health Points and Decimals

Root / Programming Questions / [.]

ReddfairchildCreated:
Okay, I'm not sure what making your own command is called but here's a part of my code: MYHP=10 FishHP=10 Locate 5,5:?"HP:",MyHP Locate 10,10:?"HP:",FishHP Another thing is with those commands for the HP, they don't print properly. There's large gaps between the text when more than one value is printed. Anybody know how I can fix this? Also, I developed a basic fighting system, and now I'm trying to figure out how to make items work. I know how to deduct health, but I don't know how to add to it. (I hope this makes sense. I'm not entirely sure how to describe it.)

Your code has large gaps because you used a comma. It should be.
Locate 5,5;? "HP:";MYHP
and if you want to add health just do
INC MYHP,#
alternatively, MYHP=MYHP+# If I wasn't clear enough or you have more questions just ask.

Also, in the little documentation that we have, It has been determined that MYHP=MYHP+# is probably faster than INC MYHP,#.

Alright! Thanks for the help, both of you! :)