HOW TO DISPLAY SPECIFIC NUMBERS AS PICTURES?
Posts
Pages:
1
Hey guys. Some of you may be aware of a Skill System I'm setting up for my game.
http://rpgmaker.net/games/555/blog/2383/
However, I'm having a problem displaying a number in picture form; specifically a character's current 'Tech Points' as a picture to display on the main screen. I already have the actual numbers/pictures, but what's the most efficient way to do it?
http://rpgmaker.net/games/555/blog/2383/
However, I'm having a problem displaying a number in picture form; specifically a character's current 'Tech Points' as a picture to display on the main screen. I already have the actual numbers/pictures, but what's the most efficient way to do it?
Depending on the number of digits... Let's say 3 digits.
Have a series of fork conditions checking if the value... call it is over 900 or equal to.
If it is, display a 9 in the hundreds spot. If it's over 800 or equal to, display an 8. If it's over 700 or equal to, display a 7.... etc. etc. etc. Also for each of these, turn on a switch,
When you get down to 0, simply instead of displaying a graphic use erase picture and turn off the switch.
Now create a variable, , call it Temp or something and set it to the value of variable 1. Now use "Modulus" a value 100 to that variable. (under variable operations.) Essentially this gets rid of whatever is in the hundreds digit. So now... Have a series of fork conditions. If is over 90 or equal to, display a 9, etc. etc. etc. all the way down to 0. Now, have a fork condition checking if switch is on, if it's on, display a graphic for a 0, otherwise use erase picture.
Then it's the one's digit. Now "Mod" 10 to variable and check if it's 9, if so, display a 9, if it's 8, display an 8, etc. If it's 0 display a 0.
And that's it. It's a bit tedious and it's probably best to set the coordinates of the "show picture" or whatnot commands to a variable which you set beforehand so it won't be a hassle to move where the numbers show up if you want to shift them around later! Or if you want to paste the number-displaying commands for usage elsewhere, etc.
I wrote this pretty quickly but hopefully it makes sense.
Have a series of fork conditions checking if the value... call it is over 900 or equal to.
If it is, display a 9 in the hundreds spot. If it's over 800 or equal to, display an 8. If it's over 700 or equal to, display a 7.... etc. etc. etc. Also for each of these, turn on a switch,
When you get down to 0, simply instead of displaying a graphic use erase picture and turn off the switch.
Now create a variable, , call it Temp or something and set it to the value of variable 1. Now use "Modulus" a value 100 to that variable. (under variable operations.) Essentially this gets rid of whatever is in the hundreds digit. So now... Have a series of fork conditions. If is over 90 or equal to, display a 9, etc. etc. etc. all the way down to 0. Now, have a fork condition checking if switch is on, if it's on, display a graphic for a 0, otherwise use erase picture.
Then it's the one's digit. Now "Mod" 10 to variable and check if it's 9, if so, display a 9, if it's 8, display an 8, etc. If it's 0 display a 0.
And that's it. It's a bit tedious and it's probably best to set the coordinates of the "show picture" or whatnot commands to a variable which you set beforehand so it won't be a hassle to move where the numbers show up if you want to shift them around later! Or if you want to paste the number-displaying commands for usage elsewhere, etc.
I wrote this pretty quickly but hopefully it makes sense.
Thanks guys.
Uh, there's another problem that maybe you guys can help me with. Why does my skill system freeze up sometimes? I have it set to a Parallel Process Common Event, set up so that when you press '1', it comes up, but sometimes on certain maps it freezes and doesn't respond to any keys once the menu comes up. Why?
Uh, there's another problem that maybe you guys can help me with. Why does my skill system freeze up sometimes? I have it set to a Parallel Process Common Event, set up so that when you press '1', it comes up, but sometimes on certain maps it freezes and doesn't respond to any keys once the menu comes up. Why?
post=133695
Thanks guys.
Uh, there's another problem that maybe you guys can help me with. Why does my skill system freeze up sometimes? I have it set to a Parallel Process Common Event, set up so that when you press '1', it comes up, but sometimes on certain maps it freezes and doesn't respond to any keys once the menu comes up. Why?
that's a complicated question. it probably freezes because of how your event coding is setup. there is no inherent reason a parallel process common event should freeze your game, so it has to be something in the code, but what it is I couldn't tell you.
here's what I would do though, just a bit of advice.
have your parallel process common event activated by a switch that you turn on once the game has started. setup the check event for when 1 is pressed. when 1 is pressed, call a separate common event for your skills menu, an event that is on-call only. In that on-call event, turn off the switch that activates your parallel process event, and turn the switch back on when skills menu is exited. THIS WAY, you won't have a constant parallel process running, even through your menu. personal preference, I just think it's best not to always have a parallel process event running.
hopefully that made sense.
Pages:
1
















