YesNoOk
avatar

smoking character (Read 5032 times)

Started by eishiba, June 24, 2019, 05:30:56 pm
Share this topic:
smoking character
#1  June 24, 2019, 05:30:56 pm
  • avatar
  • **
    • USA
Is there anyway to make your character smoke as they get lower on health?
Re: smoking character
#2  June 25, 2019, 07:09:12 am
  • *****
  • Shame on you!
    • USA
yeah, it should be pretty easy.
You can just spawn a helper that monitors your life. That helper spawns explods, or just 1 explod if you got it like that.


[State 0, Helper]
type = Helper
triggerall = life <= 250
trigger1 = numhelper(99) = 0
ID = 99
;fill in the rest

Then make the helper's state how you want it. You could even add sound if you wanted.
vVv Ryuko718 Updated 10/31/22 vVv
Re: smoking character
#3  June 25, 2019, 07:22:54 am
  • avatar
  • **
    • USA
So what is an explod? I have only learned to do projectiles from the list selection in the states.
Re: smoking character
#4  June 25, 2019, 09:55:42 am
  • *****
  • Shame on you!
    • USA
Look up most everything you dont know in
http://mugenguild.com/forum/mugen-class.415
If you need a quick run down on things, I always suggest
http://mugenguild.com/forum/topics/mugen-101-things-you-need-know-169758.0.html
Personally, I gained the most insight the fastest by reading
http://mugenguild.com/forum/topics/hitdef-sctrls-169450.0.html

But an explod is just a simple animation. A hitspark, an explosion, a trail of dust, SMOKE, anything you want to display, anywhere.
Using a helper establishes where it's going to be focused around. 

If you want P1, your char, to start smoking when the instant the life comes off, you'll need to loo into statedef -2.
If you want a certain animation to trigger once the hit is over you can do that too.
vVv Ryuko718 Updated 10/31/22 vVv
Re: smoking character
#5  June 30, 2019, 06:14:09 am
  • avatar
  • **
    • USA
yeah, it should be pretty easy.
You can just spawn a helper that monitors your life. That helper spawns explods, or just 1 explod if you got it like that.


[State 0, Helper]
type = Helper
triggerall = life <= 250
trigger1 = numhelper(99) = 0
ID = 99
;fill in the rest

Then make the helper's state how you want it. You could even add sound if you wanted.

So I have been toying with this but can't seem to get it to work. Does the helper just go anywhere in the states?
Re: smoking character
#6  June 30, 2019, 08:39:19 am
  • *****
  • Shame on you!
    • USA
If you want P1, your char, to start smoking when the instant the life comes off, you'll need to loo into statedef -2.
If you want a certain animation to trigger once the hit is over you can do that too.
The helper's Statedef/State can be pretty much anywhere. OUTSIDE of another state. I would put it above or below StateDef -2 so you dont have to scroll far when you're editing thing. That's what you mean right?

If you're having trouble making the state and positioning it and stuff, make a temporary animation. Use that anim in the Statedef and you'll be able to see where it's at. Once you have the helper locked on to where you want it, you can set it to a blank animation. Then only the explods youre using will be visible.

If you're having trouble getting it to spawn by watching the life, you can make a second call for it. I almost always use State 200 when I'm having trouble. This way I KNOW I've activated the state and it HAS to load.
vVv Ryuko718 Updated 10/31/22 vVv
Re: smoking character
#7  July 01, 2019, 05:33:02 am
  • avatar
  • **
    • USA
If you want P1, your char, to start smoking when the instant the life comes off, you'll need to loo into statedef -2.
If you want a certain animation to trigger once the hit is over you can do that too.
The helper's Statedef/State can be pretty much anywhere. OUTSIDE of another state. I would put it above or below StateDef -2 so you dont have to scroll far when you're editing thing. That's what you mean right?

If you're having trouble making the state and positioning it and stuff, make a temporary animation. Use that anim in the Statedef and you'll be able to see where it's at. Once you have the helper locked on to where you want it, you can set it to a blank animation. Then only the explods youre using will be visible.

If you're having trouble getting it to spawn by watching the life, you can make a second call for it. I almost always use State 200 when I'm having trouble. This way I KNOW I've activated the state and it HAS to load.

I dont have any statedef -2 in my states. I'm not sure whether the ID or the stateno is where i put the animation number so ive put the animation number on each one and nothing happens. Where do I put the animation number at? I put the helper itself at the bottom of the states but nothing happens. I also tried putting it in State 200 at the bottom but it makes clones appear. I dont have an explod. If I need an explod where does it go? Under the helper?
Re: smoking character
#8  July 01, 2019, 08:53:42 am
  • *****
  • Shame on you!
    • USA
So you need a run down of everything. You really should be using Fighter factory 3 to make your character.
It's very unlikely you dont have a statedef -2 in your character. But if you dont, you should copy it out of your common1.cns in your Data folder. So look in your mugen>data folders and see if you have a common1.cns. it might just be named common.cns. Copy and paste ALL of it into your character, near the bottom of the character.

Making a helper is 2 main parts. The call to make the helper, and the helper's state(s).
This is what you use to call/create the helper. Read this to understand what the ID, StateNo, and everything else does.
http://mugenguild.com/forum/topics/helper-sctrl-1-0-1-1b-169754.0.html


The helper's states are just like P1's states, except they control the helper. So the anim isn't listed in the call. You just make a new Statedef for the helper. You can put the anim in the statedef or make a changeanim inside the state. You use changestates just like normal, but you can use destroyself to make the helper go away.

"Inside the states" usually means below the Statedef and above the Changestate. Sometimes there isn't a Changestate, but most of the time there is.
The clones popping up is a good thing. You need your two animations. So you need to add the pics to your SFF and make the animation in the AIR file. Make sure your new animation isn't using a number that's already been used. CTRL+F will bring up the box to search. Then you can put in your number and see if it's been used. You decide the Anim.

Once you have the StateDef made you want to control it. That's the job(s) of the State Controllers. (the control the state....)
http://mugenguild.com/forum/msg.2159570
This is how you tell Mugen how, and what, and when you want, things to happen. The triggers are the "Why"

After you get the animation for the smoke working in the AIR file, you can add an explod inside the helper.
You don't have to have an amazing animation for the Helper at first. Because it's going to be a blank animation, try to find a small effect or some type of spark inside your AIR file. You can actually make a new animation pretty easy using just 1 frame of a hit spark, or any other effect. You might want to pic a sprite that's smaller so it's a little more accurate on where you're placing it.

In FF3 go to the animations and move all the way right to the end of them. Hit the + to make a new animation. At this point it'll be blank. So find the image you want, remember the value, and scroll back to your new animation. Type it into the Group and Index boxes and you should see that sprite. That's all you need for that anim. Again, make sure your new anim's anim number isn't used by anything else. Put that value into your Statedef.

Make the Explod too.
http://mugenguild.com/forum/topics/explode-sctrls-169499.0.html
In FF3 you can scroll down to your helper's state. Click inside it, and then double click the Explod on the right side and this will pop up.
Spoiler, click to toggle visibilty
Fill in the stuff you want/need.

Once you get this far, guess what. You're still going to have issues but we'll help you iron those out.
vVv Ryuko718 Updated 10/31/22 vVv
Re: smoking character
#9  July 05, 2019, 03:19:14 am
  • avatar
  • **
    • USA
So currently I have in my Statedef 200 is...
[State 0 , Helper]
type = Helper
triggerall = life < 999
trigger1 = numhelper(99) = 0
helpertype = Normal
name = "smoke"
ID = 530
stateno = 530
pos = 0,0
postype = P1
facing = 1
keyctrl = 1
ownpal = 0
everything else below is greyed out.

Do I have my helper written correctly?
Re: smoking character
#10  July 05, 2019, 10:34:53 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
No, because you are checking for helper 99 but the ID that you are assigning is 530 instead
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: smoking character
#11  July 12, 2019, 06:54:00 pm
  • avatar
  • **
    • USA
[State 0 , Helper]
type = Helper
triggerall = life < 999
trigger1 = numhelper(530) = 0
helpertype = Normal
name = "smoke"
ID = 530
stateno = 530
pos = 0,0
postype = P1
facing = 1
keyctrl = 1
ownpal = 0
So this is now what I have. Is this correct?
Re: smoking character
#12  July 14, 2019, 12:25:22 am
  • *****
  • Shame on you!
    • USA
Do you have State 530 going?
And with an effect, you might want it to be State 2530, or 9530, 10530. Something higher. Most additional things people add on are past the 1000s.
0 thru 999 are for basic attacks and such,
1000 thru 2999 are usually special moves,
3000 thru 3999 are usually ultra moves.
You don't have to follow this, but a lot do, so some AI is coded around using it.

Your Helper looks good to fire off though. Use Debug to see if you're getting any error flood in the top left. CTRL+D
vVv Ryuko718 Updated 10/31/22 vVv