affectteam problem

Started by Odb718, March 15, 2012, 09:43:34 AM

Previous topic - Next topic

Odb718

So I'm making Samus' bomb from SSBB. It affects all players. The enemy gets hurt when they dont block it, but Samus doesnt get hurt if she lets it hit. She just tucks up into the ball.

I've made a hitdef that uses affectteam=b and it hits both players.
So I copy and paste the hitdef, and switch both affectteam=b lines to affectteam=f, and to affectteam=e.
The enemy still gets hit but it doesnt hit Samus at all. What the heck?!

What else do I have to change in order to have it hit Samus?
Is the affectteam=f only going to affect my partner in a 2v1 or 2v2 match??
vVv Gouken718 vVv SabreTooth718 vVv


Rajaa Retired

You're using two of the same parameters? Just use one of them and its value should just be "b."

http://www.elecbyte.com/mugendocs/sctrls.html#hitdef

Odb718

No, at first I was just using the exact same hitdef set up for testing purposes. No matter what I change it doesnt hit one or the other. The only way I can switch which character gets hit is by moving the hitdef e above hitdef f, or vise-versa. 
vVv Gouken718 vVv SabreTooth718 vVv


Cyanide

I think your question needs to be "why does samus tuck into a ball"

I doubt that's a hitsprite is it? What is the animation, follow it backwards. Work out why samus is entering a custom type state that obviously doesn't use movetype = H. You have confirmed that affectteam = B will hit both sides, but only the enemy is taking damage.

This means that either you're using a custom state on the attack and have sent samus into her own state. Or samus has some sort of helper contact thing that sends her to the ball state. Basically you're SENDING her there from somewhere else, find out where and you'll solve the issue.


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.

Odb718

Well, I dont have the source code for Super Smash Bros Brawl. I'm trying to duplicate it's actions.
I've gotten the actual custom hitstate moves working now. I just did one of them til it was correct, then moved the hitdef above the other and worked on it. [State 1525, HitThem]
type=hitdef
affectteam=E
trigger1=time =1
priority=6,Hit
attr=S,SA
damage=30,0
animtype=Up
hitflag=MAFD
guardflag=M
pausetime=0,6
sparkno=-1
guard.sparkno=s6001
guardsound=s2,0
ground.type=High
ground.slidetime=34
ground.hittime=34
ground.velocity=0,-11
ground.cornerpush.veloff=0
air.velocity=0,-10
p2facing=1
fall=1
fall.recover=0
getpower=0
palfx.color=32
palfx.sinadd=80,25,0,8
palfx.mul=512,256,128
palfx.time=70
ID=1525

[State 1525, HitUs]
type=hitdef
affectteam=F 
trigger1=time =1
priority=6,Hit
attr=S,SA
damage=0,0 
animtype=Up
hitflag=MAFD
guardflag=M
ground.type=High
ground.velocity=-2.5,-22
air.velocity=-2.5,-22
numhits =0
p2stateno =1551
^^^ Those are the two hitdefs I'm using. Only the bottom hitdef will activate. Cyanide I'm coding this character from scratch. What ever she's doing is my fault/skill :P
vVv Gouken718 vVv SabreTooth718 vVv


Cyanide

Why are you using p2stateno on affectteam = F?

Do what rajaa said. Affectteam = B. One hitdef only and get rid of that line altogether. It's a hit, It'll hit and samus will go to a hitstate.

What's state 1551 anyway? Bet she turns into a ball there...


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.

Odb718

Heh, Cyanide When I said
QuoteSo I'm making Samus' bomb from SSBB. It affects all players. The enemy gets hurt when they dont block it, but Samus doesnt get hurt if she lets it hit. She just tucks up into the ball.
I was describing what Samus does in the Wii game.
If I do affectteam = b then all four characters are damaged. Which isnt right.
If I do p1stateno = 1551 in affectteam = f, a clone appears of Samus. p2stateno sends me into a custom hitstate where I have
[Statedef 1551]
type = A
movetype = H
physics = A
ctrl = 0

[State 7697, vel]
type=hitvelset
trigger1=!time
x=-2
y=2

[State 7697, grav]
type=veladd
trigger1=1
y=gethitvar(yaccel)

[State 1551, SelfState]
type = SelfState
trigger1 = time = 4; 19
value = 1550
So that I can leave the custom hitstate I send myself into. Otherwise I can walk around but not punch anything. You have to be in
movetype = H
For 1 tic otherwise it wont work properly. But somehow when I use StateTypeSet and switch it back it doesnt work properly. I tried using hitover in a selfstate to do it, but that didnt work either.
State 1550 is the actual tuck into a ball state. She doesnt tuck into the ball if she's already the ball in 1550. Anyways,
There's only two major problems to work out.
Why doesnt it work with the two hitdefs, and the other is how to get non-Samus characters on Samus' team to go into a custom "bounce away" state. I guess I could check if the character's name is Samus and go from there.
vVv Gouken718 vVv SabreTooth718 vVv


Odb718

So I still havent gotten this to work. I did however make a work around. It involved me making a second identical state to the explode state. I then used a helper to call that second explode state and made the helper hit Samus.

If anyone knows how to get Affectteam = E and Affectteam= F hitdefs to work at the same time please let me know.
vVv Gouken718 vVv SabreTooth718 vVv