Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Request: Making a ABT

Injury

Awesome Bro

I don't want a link to some script, I want to be shown step by step how to make an active timer bar for battles. I think everyone should stop asking for people do work for them, and come together and understand what it is that has to be done. That is real programming, not copying someone's code and modifying it to your use and calling it yours.

I would honestly like to learn. Anyone willing to reply with instructions?
 
BRAVO!

Well it can be done in a number of ways. To start with your going to need a base counter. In the case of scripting this will always be your graphics count. SOOOOO you can set up a variable that is set to the $game_system.graphics.count (Is that right? I'll have to check) which measures how many times the graphics have gone by ORRR you can do it in the update which dose pretty much the same thing since it updates every time the graphics count lol. Now that you have that down your going to want to divide it by 60 to get human and understand able time (Since in VX it's 60 frames a second, we divide it by 60 so every 60 frames it reads as 1 second!) Then it's a simple matter of setting variables to this 1 second change and making that variable in to the normal bar time algorithm (Bar.width = x (Max width) * y (your current time) / z (your max time) ) this will make it so when y = z (lets say z = 10 which means y = 10 seconds, which means 600 frame updates...) then the bar will be at max. Then you though in a Boolean (True/False) in there to make it say "Okay stop making it bigger! It's at max now!" which is easy... (If y = z then... bar_is_on? = true ...else ...bar_is_on? = false) Then you use the Boolean in the update menu and say if it's on then call up the command window that let's you input a command like attack or skill and all of your normal battle functions. Then once executed it will make y (our time reference) equal to zero resetting the bar.

Now then you have to remember this is the Method. A scripter (maybe not in this case because this is a really reduced and well dumb version because I'm tired) would look at that and go "thanks! Now I can go script it!" but you want to learn to script it no? Well there's your method! Go look at some Tuts and learn scenes and windows. (My tutorials kind of go over them) but don't think I'm flaking on ya. I'll be back to give code examples... Just to tired right now.

Hope what I put up there will help you out for now... If not them I'm sorry to waste your time. I've got this bookmarked so I'll add code notes next time! Till then~

~Matt (Necro) ^.^
 

Injury

Awesome Bro

Thanks, it helps to understand what is involved in a script before you learn to script something. Concepts need foundation! Anyways, I think that there could be a few things I could ask, like:

Do new methods that utilize global variables have to be instated above main, or can I modify existing code in the base scripts?

I'm honestly confused as to how to display a graphic from a file, I think that it would help to learn that as well.

Thanks for the extensive explination! Merry X-Mas, or whatever form of celebration you enjoy!
 
Graphics can be displayed a number of ways. Simply use the Sprite.new function and set it to an array!

EX:

@Guy.bitmap = Sprite.new

then just use that array to display appropriately.

please mind my coding I'm rusty at the moment doing this conversion BS thing... DAMN YOU XP FOR NOT HAVING A GRAPHICS MODULE!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top