YesNoOk
avatar

Reading time, damage, and hitcounts with vars (Read 298 times)

Started by Noctis, April 20, 2012, 08:16:07 pm
Share this topic:
Reading time, damage, and hitcounts with vars
#1  April 20, 2012, 08:16:07 pm
  • ****
  • Hey, I'm Grump!
    • USA
    • soldier.ucoz.net/
I know that the one I use for how much damage I take is GetHitVar(damage), but what do I use for how much I do?
And what do I do for counting the time? I just assumed it's a bunch of vars reading the milliseconds, seconds, and minutes and then you play an explod based on what the vars are at, but I don't know how to do that without having like a million explods for each var. Example of vars counting time below in spoilers.
Spoiler, click to toggle visibilty

As for hitcounts, I'm not quite sure how to do this either. Say I attack 10 times and I have a varadd for every hit. My var should now be var(0)=10. How would I make it so it stays at that var until I get something higher?
The damage has to be done the same way as the hitcounts, too.


In short.....how do I do the ranking system at the end of a battle like in Card Sagas Wars?

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."
Re: Reading time, damage, and hitcounts with vars
#2  April 20, 2012, 08:36:12 pm
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
You don't need a var at all for tracking the time, just do the check on the current gametime.

Code:
Type = Explod
triggerall = GameTime <= 36000
trigger1 = (GameTime % 3600) = 0

Regarding the var and the hitcounts, I don't understand exactly what are you trying to do. Vars always keep their values until  they are reset or their value is changed. So, in other words, after 10 hits "it will stay at 10, until you get something higher". However if you want to cap the variable and prevent it from getting higher than 10, use Ifelse, cond, Varset... whatever you feel more comfortable with, so it sets the value 10 every time it gets higher.

XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Reading time, damage, and hitcounts with vars
#3  April 20, 2012, 10:27:11 pm
  • ****
  • Hey, I'm Grump!
    • USA
    • soldier.ucoz.net/
If I did it like that, wouldn't I have to use like hundreds of explods?

Gah, what I want is to add a var for every hit as long as I'm in movetype = A and once you're done attacking, I want that var it reached to be remembered. Say I hit 10 times. I want it to remember that I hit 10 times and nothing lower. That's the amount that will be shown at the end of the match with explods.
If I don't have it reset, it'll just keep on adding to that var. And if it does that, it'll be like a "Total Hits" kind of thing instead of a "Max Combo" kind of thing.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."
Re: Reading time, damage, and hitcounts with vars
#4  April 21, 2012, 05:25:13 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
state -2

trigger1 = target, gethitvar(hitcount) > var(1)
var(1)
value = target, gethitvar(hitcount)


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.