News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Attaching Helpers to the Character

Started by PlasmoidThunder, July 12, 2012, 09:53:55 PM

Previous topic - Next topic

PlasmoidThunder

Hi again!

I have a character that has its sprites taken from a flash game. This character has a surrounding...aura shall we call it, that has transparency to it, whereas the actual body of the character obviously isn't transparent - this would mean two separate animations for each state (one is the actual anim and one is the aura). For reference, the aura is a helper.

I've got it all so the aura follows the character, animates in time with the character, and disappears when not in the state it's supposed to appear in. However, when pushing against a character or being pushed against, the aura becomes out of line with the character; this is noticeable due to the aura having the shape of the character in the middle of it, and therefore only looks correct when they are properly aligned.

Is there a way so that the helper is fully attached and will always be in-line with the character?

Quote from: Iced on July 24, 2013, 01:25:14 AM
Oh, I want a diagram. I fucking love diagrams.

2OS

[State Helper]
type=playerpush
trigger1=1
value=0
ignorhitpause=1

PlasmoidThunder

Quote from: 2OS on July 12, 2012, 10:09:25 PM
[State Helper]
type=playerpush
trigger1=1
value=0
ignorhitpause=1

That'd be ignorehitpause :P

All this does is cause the player to pass through things, and has no effect on the helper. Would posting a picture of my problem  better explain things?

Thanks for pointing this one out to me though, because I definitely know I'll need it for his dodge.

Quote from: Iced on July 24, 2013, 01:25:14 AM
Oh, I want a diagram. I fucking love diagrams.

2OS

first typo ever lol.

put that in the helper state not the player state.


if that's what you did then yes a picture always helps.

PlasmoidThunder

Quote from: 2OS on July 12, 2012, 10:30:16 PM
first typo ever lol.

put that in the helper state not the player state.

I tried both.

Quote from: 2OS on July 12, 2012, 10:30:16 PM
if that's what you did then yes a picture always helps.

Very well:
- All lined up.

- Not lined up.

Quote from: Iced on July 24, 2013, 01:25:14 AM
Oh, I want a diagram. I fucking love diagrams.

Cyanide

If the helper has bindtoroot/parent on it, why does it continue to move when the parent pushes?

I could understand posadd giving a couple of pixels, but what you're showing is a DRASTIC difference


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.

PlasmoidThunder

Quote from: Cyanide on July 13, 2012, 12:36:09 AM
If the helper has bindtoroot/parent on it, why does it continue to move when the parent pushes?

That's what I've been wondering this whole time - it's DEFINITELY binding it, because it stays attached when moving.

I really hope the only answer isn't to put hitboxes on every helper animation. With some of this guy's anims being several frames long, and having to position each hitbox in the exact same place as the actual anim...that could take AGES! Unless there's a way to copy and paste hitboxes...

Quote from: Iced on July 24, 2013, 01:25:14 AM
Oh, I want a diagram. I fucking love diagrams.

Cyanide

bindtoparent shouldn't cause that effect at all. Is your WIDTH right on your character? Ie, more or = to the size of your clsn boxes?

If that doesn't give us anything, post the helpers code for any problem state.


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.

Seravy

Playerpush is off on helpers by default.
You do have a bindtoparent or bindtoroot in there, right?
Could be that playerpush on your player is applied after the binding instead of before...in which case we have found another engine bug related to binding.

Cyanide

I've found bindtoparent/root pretty reliable on that front. I THINK it's probably a width thing as getting that wrong causes some pretty funky shit and he is walking in that screenshot.


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.

PlasmoidThunder

Quote from: Cyanide on July 14, 2012, 12:46:29 AM
bindtoparent shouldn't cause that effect at all. Is your WIDTH right on your character? Ie, more or = to the size of your clsn boxes?

If that doesn't give us anything, post the helpers code for any problem state.

Well, I adjusted the ground.front, etc. but to no avail. It appears that his walking velocity slightly interfered with the displacement, but it really shouldn't matter.

But anyway:

The generic helper state:
Spoiler (click to show)
;---------------------------------------------------------------------------
; Electricitywalk1
[Statedef 22]
type    = U
movetype= I
physics = N
ctrl = 0
sprpriority = 1
anim = 22

[State 22, BTR]
type = BindToRoot
trigger1 = 1
facing = 1
pos = 0, 0

[State 22, TURNEH]
type = Turn
trigger1 = root,facing != facing

[State 22, AS]
type = AssertSpecial
flag = noshadow
trigger1 = 1

[State 22, You can't hit aura!]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AT,AP

[State 22, DS]
type = DestroySelf
trigger1 = root,anim !=20

The activation:
Spoiler (click to show)
[State 20, Electric Aura1]
type = Helper
triggerall = command = "holdfwd"
trigger1 = animelem = 1
helpertype = player
name = "Buzzywalk1"
ID = 22
stateno = 22
ownpal = 1
size.xscale = Const(size.xscale)
size.yscale = Const(size.yscale)

Quote from: Iced on July 24, 2013, 01:25:14 AM
Oh, I want a diagram. I fucking love diagrams.

Cyanide

Oh, you're doing it like that, ugly.

In addition come to think of it, why a helper? An explod would make a lot more sense here. For the sake of testing, please use explod for this and see if you get the same result.


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.

PlasmoidThunder

Quote from: Cyanide on July 15, 2012, 01:14:18 AM
Oh, you're doing it like that, ugly.

In addition come to think of it, why a helper? An explod would make a lot more sense here. For the sake of testing, please use explod for this and see if you get the same result.

Because the aura animates and loops, and I cannot get explods to loop. I'll report back tomorrow.

Quote from: Iced on July 24, 2013, 01:25:14 AM
Oh, I want a diagram. I fucking love diagrams.

2OS


Seravy

Quotehelpertype = player
I bet all your problems originate from this. Player type helper is both deprecated, unsafe to use, and in this case, also inappropriate. This is a normal helper...

PlasmoidThunder

Quote from: 2OS on July 15, 2012, 01:22:04 AM
removetime=-1

After all this time, I did not know that :P

Quote from: Seravy on July 15, 2012, 08:11:11 AM
I bet all your problems originate from this. Player type helper is both deprecated, unsafe to use, and in this case, also inappropriate. This is a normal helper...

The reason it = player is because before I knew about BindtoRoot/Parent, I was just changing values to see if it had any effect. After it worked, I just forgot about it. By changing it to Normal, there was no difference.

Anyway, I changed the stuff to Explods, and it WORKED!...well, the binding part -_-. I can't get the buggers to go away when the animation they appear in isn't playing. The "root,anim =" or "anim =" tags don't appear to work on Explods. They also only face one way, so If the character turns, the Explod doesn't.

Quote from: Iced on July 24, 2013, 01:25:14 AM
Oh, I want a diagram. I fucking love diagrams.

2OS

Quote from: Seravy on July 15, 2012, 08:11:11 AM
Quotehelpertype = player
unsafe to use

no





[State ]
type=explod
trigger1=
id=2

[State ]
type=modifyexplod
trigger1=1
id=2
facing=facing

[State ]
type=removeexplod
trigger1=anim!=
id=2

PlasmoidThunder

Quote from: 2OS on July 15, 2012, 09:50:18 PM
[State ]
type=removeexplod
trigger1=anim!=
id=2

"anim! =" tag (well, "root,anim !=", but I've tried both) is what I've been using, yet the explod does not want to disappear.

Quote from: Iced on July 24, 2013, 01:25:14 AM
Oh, I want a diagram. I fucking love diagrams.

2OS

you don't use root,anim or parent,anim unless it's owned by a helper.

if the stuff i typed aren't in negative states put them in one. that's the only way i can think of as far as not working goes.

Seravy

Quoteunsafe to use
no
Player type helpers are detected by P2 triggers and positions, but are treated nonexistent by enemynear redirections. Normally, P2 triggers and enemynear redirections always refer to the same player, but player type helpers mess that up. This can cause all sorts of unwanted and unpredictable side effects on the opponent, for example Trigger1= !enemynear,ishelper && P2Life>300 will trigger on the helper if it has over 300 life and is the nearest, because P2life will check the helper, but Ishelper will check the opponent.
Additionally, it will also cause all the bugs that simul modes can on characters not intended for simul use, simply by having an additional player around that shouldn't be there.

I wouldn't have wasted several days recoding everything I coded with player type helpers if I wasn't having problems with it.

It's also unsafe in the sense that there is no guarantee that future Mugen versions will support it....although with Elecbyte missing again, this is not an issue right now.

(by the way, what a player type helper does different from normal are having access to the minus states and the opponent turning towards it as though it was a player)