News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Transformation Problem...

Started by jailuis, January 05, 2010, 01:54:12 AM

Previous topic - Next topic

jailuis

So look, im trying to work on a char with transformation, in this case Goku, but every time he's hitted he uses NORMAL char animation instead of hurted...look at the code:

[State 0, VarSet]
type = VarSet
triggerall=var(11)=0
trigger1 =time=0
v = 10  
value = 10000
ignorehitpause=1

Thats the var..I set it on a simple punch for testing purposes..., so now, this is the way im working:
;---------------------------------------------------------------------------
; HITG_SHAKE
[Statedef 5000]
type    = S
movetype= H
physics = N
velset = 0,0

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000+var(10),5010+var(10)) + GetHitVar(animtype)

[State 5000, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030+var(10)

[State 5000, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047+var(10) + GetHitVar(animtype)))
value = 5047+var(10) + GetHitVar(animtype) ;5051 - 4 + type

[State 5000, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5000, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = Pos Y != 0
statetype = a

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0 && !GetHitVar(fall)
value = 5001 ;HITG_SLIDE

[State 5000, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000+var(10)
trigger2 = anim = 5010+var(10)
persistent = 0
time = 6
waveform = square

[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001+var(10)
trigger2 = anim = 5011+var(10)
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012+var(10)
trigger2 = anim = 5002+var(10)
trigger3 = anim = 5030+var(10)
persistent = 0
time = 15
waveform = sinesquare
ampl = 140


IDK if the code its right....Its a way I realized could work but brings this issue...so Plz if some one could tell me whats wrong..

Laxxe23

Yeah except with fullgames, you cant have transformations. 
Shades 2 site:Shades of Manhattan

jailuis

-.- R U CRAZY!? havent u seen TONS of chars with transformations? its just about variables..

Laxxe23

*waits for byakko or cyanide to prove me wrong*
when they are put into custom states I guess I should have mentioned
Shades 2 site:Shades of Manhattan

jailuis

there yeah, I know, but I DONT CARE about custom states...Personally I varelly use custom states..and DBZ chars VARELLY use custom states...so i dont really need to care...

Juano16

when your morph char enter in a custom state of the enemy you cant control the changeanim and changeanim2, that can be solved in full games, but in regular mugen is hard, maybe impossible, a example of that is my shang tsung

jailuis

But I didnt ask for nothing of that -.- I asked for  how to solve my prob...not if it wasnt going to work...MY PROBLEM IS NOT EVEN RELATED TO TROWS!

kakkoii superhero

#7
you can transform into whatever, from merely palfx and changeanim.

when being hit if you want to have "i feel nothing, I'm numb, I'm retarded" insert changeanim on every hit related states with other anim no like 0 for standing and so on with trigger like time = 0.
and give extra trigger to other default change anims so they wouldn't be triggered when you're on your transformed form.

just for your info, custom state would be applied on you whether you like it or not, when somebody throw your character or do some special move.

while in custom state the opponent is the one who choose which sprite/ animation they like to put on you, and they can't detect if your char is in normal or transformed state, so that is what everybodyelse tried to warn you about.

unless you give nothitby property for any throws during that transformed state, and maybe give an auto dash back or aura explosion whenever opponent get too close on you in cmd, to prevent any chance of being thrown.

jailuis

It dont work yet...im still looking how :S

Cyanide

You have more gethit states than that. You have to override all of them.

Nothing wrong with that one, it's just not the whole lot. I bet you get a partial transform, even when hit but a number of your hitstates won't change at all (air, crouch)


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.

kakkoii superhero

there is a perfect example for that, search CVSXmai  :) (by bigapple? I think..)
she has all hitstate for her normal and unclothed version, and working well.

jailuis

Thx its solved now...new Mugen told me every error :D but old didnt