Home
Help
Search
Calendar
Login
Register
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
New forum theme up and running!
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
Request: ATB And Percentage bar assistance for Custom Battle System
« previous
next »
Print
Pages:
1
[
2
]
Author
Topic: Request: ATB And Percentage bar assistance for Custom Battle System (Read 3640 times)
Dragoon de Sol
Common sense isn't very common
Agent
Posts: 800
(No subject)
«
Reply #15 on:
November 03, 2007, 03:31:03 AM »
lol. I'm still working on how to get the bars themselves working. The percentages work, but the bars don't.
If I set them to equal to an amount, then unless it IS that amount, it wont show.
If I set it to greater than/less than or equal to, then the bars seems to fill up to the point where the percentage is.
Logged
RPG noob
Member
Initiate
Posts: 36
(No subject)
«
Reply #16 on:
November 03, 2007, 11:09:02 AM »
I admit I've never made a cbs so I don't know if this works. This is for if you had 10 pictures of bars.
Branch if variable is greater than 0
Branch if variable is less than 11
show picture hp bar1
else
Branch if var is less than 21
show picture hp bar2
else
Branch if var is less than 31
show picture hp bar3
and so on until less than 101
Try something like that depending on how many pictures you have
Logged
DragonBlaze
A Wild DB Appeared!
Royal
Posts: 3,329
(No subject)
«
Reply #17 on:
November 03, 2007, 09:23:08 PM »
Lol, I got an easier way... well its the way I do it at least.
Cross multiplying gives you the percent out of 100 right? Well to be honest, you're not really looking for the percent, your looking for the number for the bar you want to display the percent..
What I mean to say is this, lets say you have 20 pictures for the bar. (0 being emtpy and 20 being full). Instead of multiplying the current hp by 100 then dividing by the total hp, you want to multiply the current hp by 19 (one less than the number of pictures) then divide by the total hp.
OR...
[current HP] equal to heros current hp
[current HP] multiply by 19 (one less than the number of pics you use)
Divide [current HP] by total hp
Now what you can do is this.
if [current hp] is 0 (or less) show the empty bar.
if it's 1, show the next bar up (almost emtpy).
If its 2, show the next bar up
keep going.
then if [current hp] is 19 show the full bar.
This will make it a bit easier to work with.
The reason we're only using 19 while we have 20 pictures is because we're counting '0' in the cases for testing (if the hp is 0). And testing 0-19 is 20 cases, so it works well with 20 pictures. If you were using 10 pictures, you'd want to multiply it by 9, and if you were using 100 pictures, you'd want multiply it by 99.
This method doesn't give you a variable representation of the percent, but it makes displaying it to the user a lot easier.
Logged
Hell Yeah! Just recovered all my old rm2k/3 games from my 10 year old, broken laptop hard drive that had been formatted and had a new OS installed on it. Oh, and I did all of this from my phone. WIN
Dragoon de Sol
Common sense isn't very common
Agent
Posts: 800
(No subject)
«
Reply #18 on:
November 03, 2007, 10:51:13 PM »
lol, I just added every single percentage and made a bar show for it. like for 1 and 2 percents, the 2percent bar shows
Logged
Dragoon de Sol
Common sense isn't very common
Agent
Posts: 800
(No subject)
«
Reply #19 on:
November 10, 2007, 03:29:36 AM »
Sorry to kick my own topic ^_^
DragonBlaze, how would I go about displaying that ATB you were talking about if the bar was 100 pixels long.
Logged
Print
Pages:
1
[
2
]
« previous
next »
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
Request: ATB And Percentage bar assistance for Custom Battle System