you can't do it on mugen, at least not using real lifebars.but if you code your lifebars in your character, you can easyly do it using explods
Sam said, April 09, 2010, 12:54:45 amyou can't do it on mugen, at least not using real lifebars.but if you code your lifebars in your character, you can easyly do it using explodsCan you help me do it? How would I write the explode to react with health points and how can I have it bind to remaining life?I'm thinking it's this thing but I am not sure how to connect it together or if it'll even work? I think something has to be added to my attacks to make them rank up (rather down) my health meter and somehow calculate the binding explode to the right position?;bloodylife[State 0, ExplodBindTime]type = ExplodBindTimetrigger1 =ID = "bloody"time = 10;ignorehitpause =;persistent =[State 0, ModifyExplod]type = ModifyExplodtrigger1 =ID =pos = 0,0postype = p1 ;p2,front,back,left,rightfacing = 1vfacing = 1bindtime = 1vel = 0,0accel = 0,0random = 0,0removetime = -2supermovepausemovescale = 1,1sprpriority = 0ontop = 0shadow = 0,0,0ownpal = 0removeongethit = 0;ignorehitpause =;persistent =[State ]type = DisplayToClipboardtrigger1 = !(time % 2)text = ""params = var(1)
Is this a full game? How much of this effect do you wish to recreate?The blood on it's own would be a character effect that wouldn't require coding the whole lifebar as part of the character provided you were always in the same screenpack.The lifebar shake requires you to use a helper.This almost has to be full game material just so you can manage each side properly. Otherwise one character has to blank out the lifebars and code something specific for P2's life as well. Which is wanky and unpleasant. Made harder if you need to deal with simul mode.
Cyanide said, April 09, 2010, 03:46:52 amIs this a full game? How much of this effect do you wish to recreate?The blood on it's own would be a character effect that wouldn't require coding the whole lifebar as part of the character provided you were always in the same screenpack.The lifebar shake requires you to use a helper.This almost has to be full game material just so you can manage each side properly. Otherwise one character has to blank out the lifebars and code something specific for P2's life as well. Which is wanky and unpleasant. Made harder if you need to deal with simul mode.Yikes, so it's not even worth it? That does sound like a lot...Couldn't just each character have one for just there own life, and yes I wanted to "blank" or hide the original lifebars to make in character lifebars. Other characters would be made using the same system for a full game sense but still compatible with regular mugen with maybe an optional .def to hide it or remove it completely, I just really want to add in an extra spice that none other game has had.I'll look into the documentation on helpers, thanks. The shake isn't my main priority but a nice extra once I get it working. I'ma try and probably fail but I must find out.EDIT: Is there a character with this sorta thing in them somewhere and where can I find him, perhaps I can use that coding to give me a better idea on how to start it up?
Is this a full game first.I mean, if it's not, there's no point at all as you'd have to code the system into every character you add into mugen.If it is a full game, i'm happy enough to run through the how-to for creating a scaling lifebar, making it shake, and displaying falling explods.
Cyanide said, April 09, 2010, 08:35:50 amIs this a full game first.I mean, if it's not, there's no point at all as you'd have to code the system into every character you add into mugen.If it is a full game, i'm happy enough to run through the how-to for creating a scaling lifebar, making it shake, and displaying falling explods.Yes it is for a full game and I have been working on it for a long time with great dedication and have made lots of REAL progress on it.I DIDN'T WANT TO ADMIT IT BECAUSE IT'S UNFORTUNATELY A MORTAL KOMBAT GAME AND I KNOW THE RESPONSE TO THAT TYPE OF GAME I have completely made an entirely new character with sprites and new sounds with exceptional basics with no errors. I really wanted to add something spectacular to make it different from any other game.When adding the element of bloody lifebars, you increase the gore factor in a game and really make it deviously exciting!I'll do the coding myself, I just need to know what groups I need and how to link them to make it work. I've been reading the mugen docs a lot to
Lets do this simple then. I'm going to make the assumption your "damage" part of the lifebars is 100 pixels long.So 10 health = 1 pixel.Now we know that, we can work out how much we need to scale the bar to be 1000 life.Take an fvar and set it to your life/10[mcode][state -2]type = fvartrigger1 = alivefv = #value = life/10[/mcode]the helper that is the lifebar can then detect this value by redirecting to parent. parent,fvar(#) for an angledraw controllerYou will be able to display the explods simply by knowing that variable as well. The X position of the explod will be the same as the X scale of the lifebar. You can use vel and accel to make it move. If it needs to splash on the ground, you're looking at a helper instead.Now, as the helper is the lifebar, we can make it do other shit. When your parent is hit, we can shake[mcode]type = offsettrigger1 = parent, gethitvar(hitshakeover) = 0y = sin*3 (this will need tweaking)[/mcode]Lastly for that increase decrease effect... Just use afterimage. Give it a 2 tick time gap and turn it on permanently. The helper is never being hit so you won't lose it or have a need to turn it off.
What does "fv=#" mean? I can't find it in the triggger docs?Also where i n the life do I put that code? Do I make an explode first then add that code line under the explode?
I don't use actual values for my variables when explaining code. If you don't understand that bit, you're going to have a LOT of trouble with this. fv is short for fvar. It's also another method of defining a variable rather than just setting it to a value (which lots of people do)You set the variable to parent's life in state -2you create a helper that scales based on parent life.The helper binds a static explod to itself for the outline/bg. The helper manages everything else.Get it working in bits. If you try everything at once it WILL break.
Quote;Bloodybars[state -2]type = fvartrigger1 = alive = 1fv = #value = life/10[State -2, Helper]type = Helpertrigger1 = alive = 1helpertype = normal ;playername = "bloody"ID = 7028 ;blood animationstateno = 7028pos = 0,0postype = p1 ;p2,front,back,left,rightfacing = 1keyctrl = 0ownpal = 0size.xscale (float)[State -2, BindToParent]type = BindToParenttrigger1 = alive = 1time = 1[State -2, ExplodBindTime]type = ExplodBindTimetrigger1 = alive = 1ID = 7028time = 10[state -2]type = offsettrigger1 = parent, gethitvar(hitshakeover) = 0y = sin*3 ;(this will need tweaking)[State -2, AfterImage]type = AfterImagetrigger1 = alive = 1time = 1length = 1000Okay I am trying to link them in the way you said.So fvar will make whatever float above my life bars and the trigger will occur when I am still alive and it will occur at 10 pixels or something? Right? Then the helper puts the animation for the fvar floating thing to work with the life at the percent triggerings? And the bind to parent will keep it in the same place as P1's life?
It shouldn't ALL be in state -2 dude. I didn't say that. That's going to break so badly. Do you understand "Do it in bits or it WILL break"Start again. Get each piece working one by one.
Is there a visual tutorial somewhere so I can understand this stuff, a lot of it is just not making sense to me. I'm sorry for wasting your time Cyanide, I really want to code but it's very hard for me to follow stuff so precise, I've really only been able to code through copy/paste and mixing .air numbers together with play sounds and modify hit defs. I'ma keep trying because I really want to do this, it's no fun for me but I am not gonna quit.Quote[state -2]type = fvartrigger1 = alive =fv = #value = life/10[State 0, ParentVarSet]type = ParentVarSettrigger1 = alive = 1fv = #value = life/10BTW doing it in bits gives me the incomplete read mugen docs message Also I don't think i can make any parts work without having the other pieces to interact with it and complete the coding stream? Unless I don't understand the system of machine true and false concept that mugen uses? I am so noob at this
Helpers cannot read state -2. I'll break down where shit goes and the steps you should take.In state -2. You need that fvar set. You also need to create a helper IF the helper does not already exist. This means giving it an ID and ensuring the helper is not alive before creating it.In the helper. Display the correct anim. Get the explods working. Once it looks right and is in the right place you can move on with the next step.Start with the scaling, that's probably the hardest bit. THIS is where your fvar checking isscale = parent,fvar(#), 1See. This will require some tweaking. What i've given you will NOT work out of the box. I may even have the equation wrong (i hate math) as such, you're going to have to do this bit yourself. Once it's scaling right, (your lifebar should be 1 pixel wide in the .sff file) you can move on with the next bits. Afterimage should be easy. The explod might be a little more difficult, we'll do that when you get there. Shake is also easy. 99% of this code is inside the helpers state. You will only have 2 entries under state -2.
Okay I'll try this again and see what happens if I can't get this add004I gizmo codeCheck it outhttp://www.youtube.com/watch?v=8oupu7dO3H0I think that guy actually did it! His lifebars shake!
Found this, not sure if it's right though?http://crossing.main.jp/mugen_tmp.phpThey seem to use custom lifebars but I am not sure how it works together?
No more double posting thank you. That "shaking" is just envshake when blackheart lands. Nothing special. Don't care about the other one. And you searching isn't going to do you much good if you don't understand what you're looking at.