Split 3 or 4 digit number.
Hy,needed to show HP and MP for a event in my demo project but it needed to be so the character can move, so show text ect.. was out of the question since you cant move and i dont want to use any scripts / plugins...
So the only way i could have managed that is with "show pictures" but there was no way i will make 999 different images or beware even 9999 if you got 4 digits... so i thought of another way, to break the digits down and show them individually, i searched around but found really nothing and after a little bit of playing around with numbers ect.. i actually found a way to break the digits down into their number so lets say from 5432 you break them down in 4 different variable 5,4,3,2 and can show pictures individually, wich is still some work but by far not nearly as much as making 9999 different pictures and branches ect..
data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
Here is the event:
In my case, digit 1 is saved on variable 135, digit 2 on 134. digit 3 on 133 and digit 4 on 132.
All there is left to do is put the 0-9 pictures in branches, copy + paste them and just change the variable + finetune the x / y positions.
With this you can show HP-MP, stepcounter in real time or any other moredigit number you want to show without the use of plugins.
If you need to break only 3 digits down, then just cut at the -----1st digi-(1k)----- comment. (the first event actually was 3digits only but i added then the 4th one as well)
Since i could not find anything else like this, i thought why not share, maybe someone can use it.
本贴来自国际rpgmaker官方论坛作者:Spaske处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/split-3-or-4-digit-number.143522/
页:
[1]