Nachorl250
Towns Guard
- Xy$
- -0.10
Hi!
So in my game I use conditional branches to check the percentage of HP, MP, etc and for example if the result is 50 the game will show a life bar only half full using a Show picture event. The thing is I have several HUD items (HP, MP, Exp, and a couple more) and it takes about 400-500 conditional branches to do it, so if I want to change the scale of the pictures, the position, or anything really I have to do it 400 times, which is very inefficient.
My idea to solve this was to use the script call $gameScreen.showPicture and then using for example "HPvariable6" as the file name, where variable 6 would store the percentage of HP, so if the variable is 62, the game would look for the picture HP62.png and show it.
Any ideas to use the variable for part of the filename?
Thank you for your attention!
So in my game I use conditional branches to check the percentage of HP, MP, etc and for example if the result is 50 the game will show a life bar only half full using a Show picture event. The thing is I have several HUD items (HP, MP, Exp, and a couple more) and it takes about 400-500 conditional branches to do it, so if I want to change the scale of the pictures, the position, or anything really I have to do it 400 times, which is very inefficient.
My idea to solve this was to use the script call $gameScreen.showPicture and then using for example "HPvariable6" as the file name, where variable 6 would store the percentage of HP, so if the variable is 62, the game would look for the picture HP62.png and show it.
Any ideas to use the variable for part of the filename?
Thank you for your attention!