Mugen Generations Comunidad de Mugen Latino donde podrás encontrar noticias, información, tutoriales (Pixelart y Programación) ayuda, y lo que desees. |
| | Problema con variables para los combos | |
| Author | Message |
---|
gabe555 Administrator
Nº de Posteos : 1962 Fecha de inscripción : 2009-10-30 Edad : 35 Localización : Argentina
| Subject: Problema con variables para los combos Mon Feb 08, 2010 3:35 pm | |
| Bueno, Yo tengo combos con Changetstate, pregunte a varias personas como hacer que un state por ejemplo en mi caso el state 349 golpee por ejemplo 4 veces seguidas con el mismo boton y luego con el mismo boton rematar el combo con otro state, pregunte por algun que otro trigger para el changestate pero creo que no se puede. Lo logre de una forma burda que seria crear el state 349, el 351, el 353 y el 355 (todos esos states con el mismo golpe y luego del state 355 pasar al 500 para que remate el combo. Quedo bueno, pero yo he visto que hay otra forma con variables, asi que lo probe, y eh aqui el code. - Spoiler:
; Light Punch [StateDef 200] type = S movetype= A physics = S juggle = 1 velset = 0,0 ctrl = 0 anim = 200 poweradd = 20 sprpriority = 2
[State 200, 1] type = HitDef trigger1 = AnimElem = 2 attr = S, NA damage = 20 animtype = Light guardflag = MA hitflag = MAF priority = 3, Hit pausetime = 10, 10 sparkno = 0 sparkxy = -10, -76 hitsound = S40, 0 guardsound = 6, 0 ground.type = High ground.slidetime = 2 ground.hittime = 12 ground.velocity = -4 airguard.velocity = -1.9,-.8 air.type = High air.velocity = -1.4,-3 air.hittime = 12
[State 200, ChangeState] type = ChangeState trigger1 = command = "x" && var(10) = 1 value = 220 ctrl = 0
[State 200, end] type = ChangeState trigger1 = AnimTime = 0 value = 0 ctrl = 1
;---------------------------------------------------------------------------
; Strong Punch [StateDef 220] type = S movetype= A physics = S juggle = 1 velset = 0,0 ctrl = 0 anim = 220 poweradd = 20 sprpriority = 2
[State 220, 1] type = HitDef trigger1 = AnimElem = 2 attr = S, NA damage = 25 animtype = medium guardflag = MA hitflag = MAF priority = 3, Hit pausetime = 10, 10 sparkno = 0 sparkxy = -10, -76 hitsound = 5, 0 guardsound = 6, 0 ground.type = High ground.slidetime = 1 ground.hittime = 18 ground.velocity = -4 airguard.velocity = -1.9,-.8 air.type = High air.velocity = -1.4,-3 air.hittime = 18
[State 220, ChangeState] type = ChangeState trigger1 = command = "y" && var(10) = 2 value = 301 ctrl = 0
[State 220, end] type = ChangeState trigger1 = AnimTime = 0 value = 0 ctrl = 1
;---------------------------------------------------------------------------
;Codo 1 [StateDef 301] type = S movetype= A physics = S juggle = 1 velset = 0,0 ctrl = 0 anim = 301 poweradd = 20 sprpriority = 2
[State 301, 1] type = HitDef trigger1 = AnimElem = 2 attr = S, NA damage = 20 animtype = medium guardflag = MA hitflag = MAF priority = 3, Hit pausetime = 10, 10 sparkno = 0 sparkxy = -10, -76 hitsound = s40, 1 guardsound = 6, 0 ground.type = High ground.slidetime = 0 ground.hittime = 30 ground.velocity = -4 airguard.velocity = -1.9,-.8 air.type = High air.velocity = -1.4,-3 air.hittime = 28 envshake.time = 15 envshake.freq = 64 envshake.ampl = -
[State 301, ChangeState] type = ChangeState trigger1 = command = "y" && var(10) = 3 value = 349 ctrl = 0
[State 301, end] type = ChangeState trigger1 = AnimTime = 0 value = 0 ctrl = 1
;---------------------------------------------------------------------------
;Golpe al estomago 1 [StateDef 349, Teleport que antecede el golpe] type = A movetype= A physics = N juggle = 1 velset = 0,0 ctrl = 0 anim = 500 poweradd = -200
[State 464, 2] type = PlaySnd Trigger1 = AnimElem = 1 value = 20,1 volume = 5
[State 464] type = PosAdd trigger1 = time = 8 x = p2bodydist x + 80 y = p2bodydist y + 0
[State 464, turn] type = Turn trigger1 = P2dist X < 0
[State 464,2 ] type = ChangeState trigger1 = Time = 11 value = 350 ctrl = 1
[Statedef 350 Golpe al Estomago 1] type = S MoveType =A physics = S sprpriority = 0 ctrl = 0 anim = 350
[State 350, HitDef] type = HitDef trigger1 = animelem = 4 attr = S,NA ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT hitflag = MAF ;HLAFD+- ;affectteam = E ;B,E,F animtype = Hard ;light,medium,hard,back,up,diagup air.animtype = Light fall.animtype = Back ;priority = 4,Hit damage = 50,2 pausetime = 20,20 animtype = light ground.type = high ground.velocity = -7,-5 air.velocity = -7,-5 ground.slidetime = 10 ground.hittime = 42 sparkno = -1 sparkxy = -20,-40 fall = 1 hitsound = s70,1 guardsound = S70, 5 air.hittime = 22 envshake.time = 30 envshake.freq = 50 envshake.ampl = -4
[State 350, ChangeState]; Para golpe al estomago 2 type = ChangeState trigger1 = command = "y" && var(10) = 4 value = 351 ctrl = 0
[State 350, ChangeState]; Para golpe al estomago 2 type = ChangeState trigger1 = command = "y" && var(10) = 6 value = 351 ctrl = 0
[State 350] type = ChangeState trigger1 = AnimTime = 0 ctrl= 1 value = 0
;---------------------------------------------------------------------------
[StateDef 351, Teleport que antecede el golpe] type = A movetype= A physics = N juggle = 1 velset = 0,0 ctrl = 0 anim = 500 poweradd = -200
[State 351, 2] type = PlaySnd Trigger1 = AnimElem = 1 value = 20,1 volume = 5
[State 351] type = PosAdd trigger1 = time = 9 x = p2bodydist x + 130 y = p2bodydist y + 0
[State 351, turn] type = Turn trigger1 = P2dist X < 0 ;ignorehitpause = ;persistent =
[State 351 ] type = ChangeState trigger1 = Time = 10 value = 352 ctrl = 1
[Statedef 352, Golpe al Estomago 2] type = S MoveType =A physics = S sprpriority = 0 ctrl = 0 anim = 350
[State 352, HitDef] type = HitDef trigger1 = animelem = 4 attr = S,NA ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT hitflag = MAF ;HLAFD+- ;affectteam = E ;B,E,F animtype = Hard ;light,medium,hard,back,up,diagup air.animtype = Light fall.animtype = Back ;priority = 4,Hit damage = 50,2 pausetime = 20,20 animtype = light ground.type = high ground.velocity = -7,-5 air.velocity = -7,-5 ground.slidetime =10 ground.hittime = 42 sparkno = -1 sparkxy = -20,-40 fall = 1 hitsound = s70,1 guardsound = S70, 5 guard.sparkno = S7190 air.hittime = 22 envshake.time = 30 envshake.freq = 50 envshake.ampl = -4
[State 352, ChangeState]; Para golpe al estomago 1 type = ChangeState trigger1 = command = "y" && var(10) = 5 value = 349 ctrl = 0
[State 352, ChangeState] ; Para golpe al estomago 1 type = ChangeState trigger1 = command = "y" && var(10) = 7 value = 349 ctrl = 0
[State 352, ChangeState]; Para Remate del combo type = ChangeState trigger1 = command = "y" && var(10) = 8 value = 500 ctrl = 0
[State 352] type = ChangeState trigger1 = AnimTime = 0 ctrl = 1 value = 0
;---------------------------------------------------------------------------
[Statedef -2]
[State -2, VarSet] type = VarSet trigger1 = prevstateno = 200 ; light punch trigger2 = prevstateno = 220 ; Hard Punch trigger3 = prevstateno = 301 ; Otra piña trigger4 = prevstateno = 349 ; Golpe al estomago 1 trigger5 = prevstateno = 351 ; Golpe al estomago 2 trigger6 = prevstateno = 349 ; Golpe al estomago 1 trigger7 = prevstateno = 351 ; Golpe al estomago 2 trigger8 = prevstateno = 500 ; Remate del combo trigger9 = movetype = H || stateno = 0 v = 10 value = 0
[State -2, VarSet] type = VarSet trigger1 = stateno = 200 && movehit v = 10 value = 1
[State -2, VarSet] type = VarSet trigger1 = stateno = 220 && movehit v = 10 value = 2
[State -2, VarSet] type = VarSet trigger1 = stateno = 301 && movehit v = 10 value = 3
[State -2, VarSet] type = VarSet trigger1 = stateno = 349 && movehit v = 10 value = 4
[State -2, VarSet] type = VarSet trigger1 = stateno = 351 && movehit v = 10 value = 5
[State -2, VarSet] type = VarSet trigger1 = stateno = 349 && movehit v = 10 value = 6
[State -2, VarSet] type = VarSet trigger1 = stateno = 351 && movehit v = 10 value = 7
[State -2, VarSet] type = VarSet trigger1 = stateno = 500 && movehit v = 10 value = 8
Bueno todo lindo, me di cuenta que los combos con variables son muchos mas efectivos. Pero mi problema es este: mi combo llega hasta el state 349, faltanto encadenar el state 351, nuevamente el 349, el 351 y el 500 que seria el fin del combo. Bueno agredecere la ayuda, Saludos. |
| | | sawady Contributor
Nº de Posteos : 1731 Fecha de inscripción : 2009-10-29 Edad : 33
| Subject: Re: Problema con variables para los combos Mon Feb 08, 2010 9:56 pm | |
| mira... es un problema de triggers en los combos...
igualmente no me gusta mucho como está estructurado... dentro de lo posible no uses el statedef -2... a menos que sea de vida o muerte...
agarro este pedazo nada mas, para explicarte donde falla...
[State -2, VarSet] type = VarSet trigger1 = prevstateno = 200 ; light punch trigger2 = prevstateno = 220 ; Hard Punch trigger3 = prevstateno = 301 ; Otra piña trigger4 = prevstateno = 349 ; Golpe al estomago 1 trigger5 = prevstateno = 351 ; Golpe al estomago 2 trigger6 = prevstateno = 349 ; Golpe al estomago 1 trigger7 = prevstateno = 351 ; Golpe al estomago 2 trigger8 = prevstateno = 500 ; Remate del combo trigger9 = movetype = H || stateno = 0 v = 10 value = 0
[State -2, VarSet] type = VarSet trigger1 = stateno = 200 && movehit v = 10 value = 1
[State -2, VarSet] type = VarSet trigger1 = stateno = 220 && movehit v = 10 value = 2
Te hago el seguimiento de la variable...
La variable es la 10, estas en el stateno 200, impacta bien el golpe... la variable vale uno, el changestate del state 200 hace que pases al 220... el prevstateno (trigger1 del varset primero) se activa y resetea la variable a cero... cuando impacta el golpe en el stateno 220, POR UN SOLO TIC, la variable pasa a valer 2... y vuelve a valer cero...
Explico por qué... el prevstateno 200 esta vigente durante todo el state 220, ya que siempre ese fue su state anterior, entonces como que aunque se active por un tic el otro varset y pase a valer 2, lo vuelve a resetear por seguir siendo el prevstateno igual a 200...
Olvidando eso... te recomiendo usar otro sistema diferente...
En vez de changestate dentro de los statenos de los golpes, usalos en el statedef -1 (en el cmd)... y para las variables, usalas dentro de los statenos y no en el statedef -2 (no vas a necesitar pensar en triggers complicados y el seguimiento se hace mas facil)...
en el 200 agregale un var add con var(10) que la incremente en 1... lo mismo para todos los demas golpes consecutivos... entonces sabes que cada golpe que encadena, pasa a valer 1 mas que el anterior, el seguimiento lo haces por el numero de golpes que encadenaste...
El varadd lo podes activar con un trigger Time = 0 cosa de que la incremente aunque no haya acertado y en el cmd al changestate le pones, ademas del valor de la variable, un movehit (para que pase al siguiente golpe solo cuando haya impactado)... le podes agregar en el cmd un trigger con stateno = "stateno actual de golpe", cosa de que no se fije solo en la variable y que haya impactado, sino que tambien se fije en que esta en el stateno actual con el que pasas al siguiente golpe...
Te recomiendo otra cosa... hay un supercontrol que se llama displaytoclipboard... sirve para ver diferentes datos en pantalla a traves del debug de mugen... podes por ejemplo ver valores de las variables que escojas (entre muchas otras cosas)... copialo del goku legend si queres, ponelo en el statedef -2 (esta ubicado ahi para actualizarse cada tic) y ponele la variable que queres seguir... sino lees el debug muy seguido, acostumbrate a hacerlo, asi es muy facil detectar errores o saber que cosa tenes que cambiar...
espero que hayas entendido masomenos... sino hago un tuto con el sistema que explique en lineas anteriores... |
| | | Meta Gouki Lv 4
Nº de Posteos : 346 Fecha de inscripción : 2009-10-29 Edad : 38 Localización : Santiago, Chile
| Subject: Re: Problema con variables para los combos Mon Feb 08, 2010 10:10 pm | |
| Pero no crees que pcupar la variable para todo el combo es complicarse la vida? Saldria mucho mas facil solo usarla y activarla durante los states que se repiten dentro del combo, asi te evitas usar tambien el state-2. Hablo desde mi perspectiva de simplicacion de codigo. |
| | | ro Lv 2
Nº de Posteos : 162 Fecha de inscripción : 2009-11-02 Edad : 36
| Subject: Re: Problema con variables para los combos Tue Feb 09, 2010 8:51 am | |
| Yo pienso igual que metagouki , yo modificaria el valor de la variable al pasar por cada state y entre cada changestate simplemente verificaria con movehit si ha habido golpe para pasar al siguiente state |
| | | gabe555 Administrator
Nº de Posteos : 1962 Fecha de inscripción : 2009-10-30 Edad : 35 Localización : Argentina
| Subject: Re: Problema con variables para los combos Tue Feb 09, 2010 1:59 pm | |
| - sawady wrote:
espero que hayas entendido masomenos... sino hago un tuto con el sistema que explique en lineas anteriores... Gracias, Me aclaraste muchisimo, igualmente jamas estaria demas un tuto explicado por vos, te lo a gradeceria mucho |
| | | Sponsored content
| Subject: Re: Problema con variables para los combos | |
| |
| | | | Problema con variables para los combos | |
|
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| |
|