YesNoOk
avatar

Problems with making a character's attacks less cheap(AGAIN..) (Read 350 times)

Started by Saohc, February 01, 2010, 07:15:33 pm
Share this topic:
Problems with making a character's attacks less cheap(AGAIN..)
#1  February 01, 2010, 07:15:33 pm
  • ****
  • Working on MGS1 Snake's VR missions in MGS2
    • USA
http://mugenguild.com/forumx/index.php?topic=110890.0

You probably remember this topic..

But now I have one of La=Gooth's(no laughing..I'm working on the character..) attacks less spammable but.. I can't make the other attacks less spammable...

I tryed using the same coding I did with the one attack I tryed to make less spammable and guess what..

IT DIDN'T WORK...The attack remained spammable..


Could someone resolve this problem?

Stuff from the .cmd file..
[mcode];---------------------------------------------------------------------------

[State -1, A_S_H]
type = ChangeState
value = 1595
triggerall = command = "UP_x"
triggerall = command = "holdfwd"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact
triggerall = numhelper(1295) = 0

[State -1, A_S_H]
type = ChangeState
value = 1596
triggerall = command = "UP_y"
triggerall = command = "holdfwd"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact
triggerall = numhelper(1495) = 0

[State -1, A_S_H]
type = ChangeState
value = 1597
triggerall = command = "UP_z"
triggerall = command = "holdfwd"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact
triggerall = numhelper(1495) = 0

[State -1, A_S_H]
type = ChangeState
value = 1495
triggerall = command = "x"
triggerall = command = "holdfwd"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact
triggerall = numhelper(1295) = 0

[State -1, A_S_H]
type = ChangeState
value = 1496
triggerall = command = "y"
triggerall = command = "holdfwd"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact
triggerall = numhelper(1495) = 0

[State -1, A_S_H]
type = ChangeState
value = 1497
triggerall = command = "z"
triggerall = command = "holdfwd"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact
triggerall = numhelper(1495) = 0



[State -1, A_S_H]
type = ChangeState
value = 1395
triggerall = command = "UP_x"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact
triggerall = numhelper(1295) = 0

[State -1, A_S_H]
type = ChangeState
value = 1396
triggerall = command = "UP_y"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact
triggerall = numhelper(1495) = 0

[State -1, A_S_H]
type = ChangeState
value = 1397
triggerall = command = "UP_z"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact
triggerall = numhelper(1495) = 0
;---------------------------------------------------------------------------
;Anoter Space Hole (uses one super bar)
;‹óŠÔ‚ÌŒŠ
[State -1, A_S_H]
type = ChangeState
value = 1295
triggerall = command = "x"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact
triggerall = numhelper(1295) = 0

[State -1, A_S_H]
type = ChangeState
value = 1296
triggerall = command = "y"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact
triggerall = numhelper(1495) = 0

[State -1, A_S_H]
type = ChangeState
value = 1297
triggerall = command = "z"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact
triggerall = numhelper(1495) = 0[/mcode]

.cns stuff..

[mcode];---------------------------------------------------------------------------
; Another Space Hole

[Statedef 1250]
type=S
movetype= A
physics = S
ctrl = 0
triggerall= varset= 0
velset = 0,0
anim = 1299
sprpriority = 2

[State 0,pv]
type = parentvaradd
trigger1 = time = 0
v = 21
value = 1

[State 0]
type = afterimage
trigger1 = animelem = 1 || animelem = 5 || animelem = 10 || animelem = 12
trigger2 = animelem = 3 || animelem = 7 || animelem = 9 || animelem = 11
trigger3 = animelem = 2 || animelem = 4 || animelem = 6 || animelem = 8
paladd = 50,0,0
palmul = 0.6,0.6,0.6
palcolor = 256
palinvertall = 0
palbright = 0,0,0
palpostbright = 0,0,0
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 50

[State 1250, 1]
type = HitDef
trigger1 = Anim = 1299
persistent = 0
attr = S, SA
animtype  = Hard
damage    = 12,4
priority  = 4
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,2
guardsound = 6,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 6
ground.velocity = -11, -6
guard.velocity = 4
air.velocity = -10,-5
airguard.velocity = 2.9,-2.8
air.juggle = 3

[State 1250, 2]
type = ChangeState
trigger1 = time = 140 + parent,var(41) + parent,var(42)
persistent = 0
value = 1300

[State 1250, 3]
type = ChangeState
trigger1 = MoveContact
Persistent = 0
value = 1300

[Statedef 1300]
type = S
anim = 1300
ctrl = 0

[State 0,pv]
type = parentvaradd
trigger1 = time = 84
v = 21
value = -1

[State 0]
type = afterimage
trigger1 = animelem = 1 || animelem = 5 || animelem = 10 || animelem = 12
trigger2 = animelem = 3 || animelem = 7 || animelem = 9 || animelem = 11
trigger3 = animelem = 2 || animelem = 4 || animelem = 6 || animelem = 8
paladd = 50,0,0
palmul = 0.6,0.6,0.6
palcolor = 256
palinvertall = 0
palbright = 0,0,0
palpostbright = 0,0,0
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 50

[State F]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 909

[State F]
type = DestroySelf
trigger1 = Time = 200
trigger1 = Anim = 909


;---------------------------------
[Statedef 1295]
type=S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = -4

[State 1295, snd]
type=PlaySnd
trigger1= animElem = 1
value=850,8

[State 1295, H]
type = Helper
trigger1 = AnimElem = 1
ID = 1295
pos = 115, -55
postype = p1
stateno = 1250
helpertype = normal
keyctrl = 0
ownpal = 0

[State 1295, H]
type = Helper
trigger1 = time = 0
trigger1 = var(41) =  [8,10]
ID = 1295
pos = 155, -90
postype = p1
stateno = 1250
helpertype = normal
keyctrl = 0
ownpal = 0

[State 1296, 3]
type = ChangeState
trigger1 = Time = 25 - var(41)
trigger1 = var(41) =  [2,10]
value = 0
ctrl = 1

[State 1295, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;--------------------------------
;A_S_H mediam
[Statedef 1296]
type=S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = -4

[State 0,pv]
type = parentvaradd
trigger1 = time = 0
v = 21
value = 1

[State 1296, snd]
type=PlaySnd
trigger1= animElem = 1
value=850,8

[State 1296, H]
type = Helper
trigger1 = AnimElem = 1
ID = 1296
pos = 185, -55
postype = p1
stateno = 1250
helpertype = normal
keyctrl = 0
ownpal = 0

[State 1296, 3]
type = ChangeState
trigger1 = Time = 25 - var(41)
trigger1 = var(41) =  [2,10]
value = 0
ctrl = 1

[State 1296, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------
;A_S_H  Hard
[Statedef 1297]
type=S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = -4

[State 0,pv]
type = parentvaradd
trigger1 = time = 0
v = 21
value = 1

[State 1297, snd]
type=PlaySnd
trigger1= animElem = 1
value=850,8

[State 1296, H]
type = Helper
trigger1 = AnimElem = 1
ID = 1296
pos = 245, -55
postype = p1
stateno = 1250
helpertype = normal
keyctrl = 0
ownpal = 0

[State 1296, H]
type = Helper
trigger1 = time = 3
trigger1 = var(41) =  [8,10]
ID = 1296
pos = 215, -115
postype = p1
stateno = 1250
helpertype = normal
keyctrl = 0
ownpal = 0

[State 1296, 3]
type = ChangeState
trigger1 = Time = 25 - var(41)
trigger1 = var(41) =  [2,10]
value = 0
ctrl = 1

[State 1297, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Another Space Hole(High)
[Statedef 1395]
type=S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = -4

[State 0,pv]
type = parentvaradd
trigger1 = time = 0
v = 21
value = 1

[State 1395, snd]
type=PlaySnd
trigger1= animElem = 1
value=850,8

[State 1395, H]
type = Helper
trigger1 = AnimElem = 1
ID = 1395
pos = 115, -115
postype = p1
stateno = 1250
helpertype = normal
keyctrl = 0
ownpal = 0

[State 1296, 3]
type = ChangeState
trigger1 = Time = 15 - var(41)
trigger1 = var(41) =  [2,10]
value = 0
ctrl = 1

[State 1395, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;--------------------------------
;A_S_H mediam
[Statedef 1396]
type=S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = 0

[State 0,pv]
type = parentvaradd
trigger1 = time = 0
v = 21
value = 1

[State 1396, snd]
type=PlaySnd
trigger1= animElem = 1
value=850,8

[State 1396, H]
type = Helper
trigger1 = AnimElem = 1
ID = 1396
pos = 185, -115
postype = p1
stateno = 1250
helpertype = normal
keyctrl = 0
ownpal = 0

[State 1296, 3]
type = ChangeState
trigger1 = Time = 15 - var(41)
trigger1 = var(41) =  [2,10]
value = 0
ctrl = 1

[State 1396, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------
;A_S_H  Hard
[Statedef 1397]
type=S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = 0

[State 0,pv]
type = parentvaradd
trigger1 = time = 0
v = 21
value = 1

[State 1397, snd]
type=PlaySnd
trigger1= animElem = 1
value=850,8

[State 1397, H]
type = Helper
trigger1 = AnimElem = 1
ID = 1397
pos = 255, -115
postype = p1
stateno = 1250
helpertype = normal
keyctrl = 0
ownpal = 0

[State 1296, 3]
type = ChangeState
trigger1 = Time = 15 - var(41)
trigger1 = var(41) =  [2,10]
value = 0
ctrl = 1

[State 1397, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------
[Statedef 1495]
type=S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = -4

[State 1295, snd]
type=PlaySnd
trigger1= animElem = 1
value=850,8

[State 1295, H]
type = Helper
trigger1 = AnimElem = 1
ID = 1295
pos = 315, -55
postype = p1
stateno = 1250
helpertype = normal
keyctrl = 0
ownpal = 0

[State 1296, 3]
type = ChangeState
trigger1 = Time = 15 - var(41)
trigger1 = var(41) =  [2,5]
value = 0
ctrl = 1

[State 1295, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;--------------------------------
;A_S_H mediam
[Statedef 1496]
type=S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = -4

[State 0,pv]
type = parentvaradd
trigger1 = time = 0
v = 21
value = 1

[State 1296, snd]
type=PlaySnd
trigger1= animElem = 1
value=850,8

[State 1296, H]
type = Helper
trigger1 = AnimElem = 1
ID = 1296
pos = 395, -55
postype = p1
stateno = 1250
helpertype = normal
keyctrl = 0
ownpal = 0

[State 1296, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------
;A_S_H  Hard
[Statedef 1497]
type=S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = -4

[State 0,pv]
type = parentvaradd
trigger1 = time = 0
v = 21
value = 1

[State 1297, snd]
type=PlaySnd
trigger1= animElem = 1
value=850,8

[State 1296, H]
type = Helper
trigger1 = AnimElem = 1
ID = 1296
pos = 485, -55
postype = p1
stateno = 1250
helpertype = normal
keyctrl = 0
ownpal = 0

[State 1297, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Another Space Hole(High)
[Statedef 1595]
type=S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = -4

[State 0,pv]
type = parentvaradd
trigger1 = time = 0
v = 21
value = 1

[State 1395, snd]
type=PlaySnd
trigger1= animElem = 1
value=850,8

[State 1395, H]
type = Helper
trigger1 = AnimElem = 1
ID = 1395
pos = 385, -115
postype = p1
stateno = 1250
helpertype = normal
keyctrl = 0
ownpal = 0

[State 1296, 3]
type = ChangeState
trigger1 = Time = 15 - var(41)
trigger1 = var(41) =  [2,5]
value = 0
ctrl = 1

[State 1395, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;--------------------------------
;A_S_H mediam
[Statedef 1596]
type=S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = 0

[State 0,pv]
type = parentvaradd
trigger1 = time = 0
v = 21
value = 1

[State 1396, snd]
type=PlaySnd
trigger1= animElem = 1
value=850,8

[State 1396, H]
type = Helper
trigger1 = AnimElem = 1
ID = 1396
pos = 485, -115
postype = p1
stateno = 1250
helpertype = normal
keyctrl = 0
ownpal = 0

[State 1296, 3]
type = ChangeState
trigger1 = Time = 15 - var(41)
trigger1 = var(41) =  [2,5]
value = 0
ctrl = 1

[State 1396, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------
;A_S_H  Hard
[Statedef 1597]
type=S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = 0

[State 0,pv]
type = parentvaradd
trigger1 = time = 0
v = 21
value = 1

[State 1397, snd]
type=PlaySnd
trigger1= animElem = 1
value=850,8

[State 1397, H]
type = Helper
trigger1 = AnimElem = 1
ID = 1397
pos = 555, -115
postype = p1
stateno = 1250
helpertype = normal
keyctrl = 0
ownpal = 0

[State 1296, 3]
type = ChangeState
trigger1 = Time = 15 - var(41)
trigger1 = var(41) =  [2,5]
value = 0
ctrl = 1

[State 1397, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
[/mcode]

and the parentvaradd thing...
[mcode][State -2, Another Space Hole]
type = varadd
trigger1 = var(21) = 2
trigger2 = var(22) > 0
v = 22
value = 60[/mcode]

Would choosing me for the question thread be a
unique experience?  I can't really say.
Re: Problems with making a character's attacks less cheap(AGAIN..)
#2  February 01, 2010, 09:15:00 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You have complete disparity in your helper ID's. I see 1295 1296 1297 1396 1397 1395 and a couple others. In your .cmd i only see 1295 and 1495.

I doubt that's going to work properly.


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.
Re: Problems with making a character's attacks less cheap(AGAIN..)
#3  February 02, 2010, 03:30:15 pm
  • ****
    • Hungary
    • seravy.x10.mx/Wordpress
Hmm this is a quite messed up code I'd say...

1. If you want more time between two attacks, you might want to use
Trigger2=Movecontact>3
instead of just Movecontact. Replace 3 with any number you like, higher means more time needed after you hit before you can attack again.However, it still won't work, see below.
2. The helpers are attacking, not the player so, both Movecontact and Hitdefattr would return incorrect values. Use Helper(1250),Movecontact and Helper(1250),Hitdefattr instead....oh wait they aren't all ID=1250 helpers...ok this will be complicated then. Especially because you might have more than one out. You have to set a parent variable when the helper hits for this :
[State 1300]
Type=ParentVarAdd
Trigger1=time=0
var(xx)=1

[State 1300]
Type=ParentVarAdd
Trigger1=time=end of time interval where you can chain an attack
var(xx)=-1

and add
trigger2=var(xx)>0 instead of the movecontact triggers. You won't need the hitdefattr ones as the helper always uses the same state and hitdefattr.

3. You'll also need a line Trigger2=NumHelper(1250)>0 in front of the other trigger2s to prevent debug spam and invalid redirections.
4. This code allows chaining any number of attacks together as long as they are not Air attacks. This allows infinite combos as the playerpush on the helper won't be much use for the player itself. A limitation of some kind is recommended (count the number of hits and if the number reaches the limit, either disable chaining attacks, or make the opponent fall from the next hit to end the combo)
5. The numhelper(1495)=0 lines don't seem to be correct, but that's up to you. List the helpers that are used by attacks you can't chain the attack from.

Overall I'd say this looks quite complicated, and I don't even know what exactly you want to archive but it's at least intermediate level coding, definitely not beginner stuff. The key is that the HELPER is attacking, not the player.
Re: Problems with making a character's attacks less cheap(AGAIN..)
#4  February 02, 2010, 08:38:55 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Well it's a fucked up cheap character in the first place. By the looks of things, it has about 10 attacks that do almost the same thing, but different positions, and the dude has use a different ID for all his helpers (like i say, i see about 9 different ID's there)

The previous topic regarding this was all about var counters and shit but it looks like the simple numhelper requirement was the solution he wanted. At the same time, he hasn't adapted that solution to all hte other attacks but has just copy pasted it round. Wrong way to go.


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.