YesNoOk
avatar

Life Bar Effects Help (Read 955 times)

Started by AxKeeper, April 08, 2010, 11:34:12 pm
Share this topic:
Life Bar Effects Help
#1  April 08, 2010, 11:34:12 pm
  • avatar
  • ***
    • USA
Can anyone help me make this?



I am not sure how to start it and how to link it to life being drained?
Seek Truth
Spoiler, click to toggle visibilty

Sam

Re: Life Bar Effects Help
#2  April 09, 2010, 12:54:45 am
  • avatar
  • ***
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
I'm trying to improve my english, so be patient xD
Re: Life Bar Effects Help
#3  April 09, 2010, 03:19:51 am
  • avatar
  • ***
    • USA
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

Can 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 = ExplodBindTime
trigger1 =
ID = "bloody"
time = 10
;ignorehitpause =
;persistent =

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =
ID =
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;persistent =

[State ]
type = DisplayToClipboard
trigger1 = !(time % 2)
text = ""
params = var(1)
Seek Truth
Spoiler, click to toggle visibilty
Last Edit: April 09, 2010, 03:38:15 am by AxKeeper
Re: Life Bar Effects Help
#4  April 09, 2010, 03:46:52 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
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.


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.
Re: Life Bar Effects Help
#5  April 09, 2010, 04:12:41 am
  • avatar
  • ***
    • USA
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.

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?
Seek Truth
Spoiler, click to toggle visibilty
Last Edit: April 09, 2010, 04:27:01 am by AxKeeper
Re: Life Bar Effects Help
#6  April 09, 2010, 08:35:50 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
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.


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.
Re: Life Bar Effects Help
#7  April 09, 2010, 09:55:12 pm
  • avatar
  • ***
    • USA
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.

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  :-\
Seek Truth
Spoiler, click to toggle visibilty
Re: Life Bar Effects Help
#8  April 09, 2010, 11:57:05 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
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 = fvar
trigger1 = alive
fv = #
value = life/10
[/mcode]
the helper that is the lifebar can then detect this value by redirecting to parent. parent,fvar(#) for an angledraw controller

You 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 = offset
trigger1 = parent, gethitvar(hitshakeover) = 0
y = 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.


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.
Re: Life Bar Effects Help
#9  April 10, 2010, 12:23:30 am
  • avatar
  • ***
    • USA
Okay, here goes, I'ma give this a shot, I'll be back as I try this out.
Seek Truth
Spoiler, click to toggle visibilty
Re: Life Bar Effects Help
#10  April 10, 2010, 12:45:32 am
  • avatar
  • ***
    • USA
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?
Seek Truth
Spoiler, click to toggle visibilty
Re: Life Bar Effects Help
#11  April 10, 2010, 12:49:32 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
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 -2

you 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.


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.
Re: Life Bar Effects Help
#12  April 10, 2010, 01:12:18 am
  • avatar
  • ***
    • USA
Quote
;Bloodybars
[state -2]
type = fvar
trigger1 = alive = 1
fv = #
value = life/10

[State -2, Helper]
type = Helper
trigger1 = alive = 1
helpertype = normal ;player
name = "bloody"
ID = 7028 ;blood animation
stateno = 7028
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.xscale (float)

[State -2, BindToParent]
type = BindToParent
trigger1 =  alive = 1
time = 1

[State -2, ExplodBindTime]
type = ExplodBindTime
trigger1 =  alive = 1
ID = 7028
time = 10

[state -2]
type = offset
trigger1 = parent, gethitvar(hitshakeover) = 0
y = sin*3 ;(this will need tweaking)

[State -2, AfterImage]
type = AfterImage
trigger1 =  alive = 1
time = 1
length = 1000

Okay 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?
Seek Truth
Spoiler, click to toggle visibilty
Re: Life Bar Effects Help
#13  April 10, 2010, 01:18:51 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
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.


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.
Re: Life Bar Effects Help
#14  April 10, 2010, 01:22:20 am
  • avatar
  • ***
    • USA
Sorry, yes of course, I'll try again.
Seek Truth
Spoiler, click to toggle visibilty
Re: Life Bar Effects Help
#15  April 10, 2010, 01:53:34 am
  • avatar
  • ***
    • USA
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 = fvar
trigger1 = alive =
fv = #
value = life/10

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = alive = 1
fv = #
value = life/10

BTW 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  :-X
Seek Truth
Spoiler, click to toggle visibilty
Re: Life Bar Effects Help
#16  April 10, 2010, 02:13:14 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
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 is

scale = parent,fvar(#), 1

See. 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.


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.
Re: Life Bar Effects Help
#17  April 10, 2010, 02:17:05 am
  • avatar
  • ***
    • USA
Seek Truth
Spoiler, click to toggle visibilty
Re: Life Bar Effects Help
#18  April 10, 2010, 02:42:20 am
  • avatar
  • ***
    • USA
Seek Truth
Spoiler, click to toggle visibilty
Re: Life Bar Effects Help
#19  April 10, 2010, 03:07:04 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
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.


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.
Re: Life Bar Effects Help
#20  April 13, 2010, 06:46:15 pm
  • avatar
  • ***
    • USA
Life bars have been coded, thank you for your help ;) Topic Locked.
Seek Truth
Spoiler, click to toggle visibilty