collapse

Author Topic: close attack help  (Read 394 times)

0 Members and 1 Guest are viewing this topic.

Offline Retire4ever!!!

  • Initiate
  • **
  • Posts: 127
  • Last Login:June 09, 2010, 11:06:45 PM
close attack help
« on: August 22, 2008, 09:11:06 AM »
Hi, I have start coding my character, but I am stuck at one simple (for mugen creator) problem, I was making Ryo and use Warusaki3's Ryo as reference (Don't worry, I won't released the character since I am using reference) to code the light punch, Ryo has two type of light punch, close and far. Far range I am using is 200 and close range I am suing is 201. I have no ideal why the close range punch does not appear when I perform close range punch near opponent. Here are the coding:

Code: [Select]
[Statedef 200]
type    = S                     
movetype = A                     
physics = S                     
juggle = 8
velset = 0,0
ctrl = 0
anim = 200
poweradd = 150

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

;[State 200, 1]
;type = PlaySnd
;trigger1 = AnimElem = 1
;value = 3, 0
;channel = 1

;[State 200, Voice]
;type = PlaySnd
;trigger1 = AnimElem = 1 && Random <= 500
;value = 0, random%2
;channel = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 5
movetype = I

[State 200, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Light
air.animtype = back
fall.animtype = back
priority = 3,Hit
damage = ceil(ifelse((21*fvar(10))<7,7,(21*fvar(10))))
pausetime = ceil(9*(2-(var(16)>0))/2),ceil(9*(2-(var(16)>0))/2)
guard.pausetime = ceil(9*(2-(var(16)>0))/2),ceil(8*(2-(var(16)>0))/2)
sparkno = -1
guard.sparkno = s9112
sparkxy = -10, -80
hitsound = S44,2
guardsound = S43,0
ground.type = High
air.type = High
ground.slidetime = 10+(var(41)*2)
ground.hittime = 10+(var(41)*2)
air.hittime = 10+(var(41)*2)
guard.ctrltime = 11
ground.velocity = -6*(2-(var(16)>0))/2
guard.velocity = -5*(2-(var(16)>0))/2
air.velocity = -4, -5.25
airguard.velocity = -4,-1
ground.cornerpush.veloff = -8.4*(2-(var(16)>0))/2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 70*(1000+var(24))/1000*ifelse((var(15)||var(16)),0,1),35*(1000+var(24))/1000*ifelse((var(15)||var(16)),0,1)
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
air.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 0]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 80
anim = 9100
scale = 0.48,0.48

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -80

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 201]
type    = S                     
movetype = A                     
physics = S                     
juggle = 8
velset = 0,0
ctrl = 0
anim = 201
poweradd = 150

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

;[State 200, 1]
;type = PlaySnd
;trigger1 = AnimElem = 1
;value = 3, 0
;channel = 1

;[State 200, Voice]
;type = PlaySnd
;trigger1 = AnimElem = 1 && Random <= 500
;value = 0, random%2
;channel = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 4
movetype = I

[State 200, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Light
air.animtype = back
fall.animtype = back
priority = 3,Hit
damage = ceil(ifelse((28*fvar(10))<7,7,(28*fvar(10))))
pausetime = ceil(9*(2-(var(16)>0))/2),ceil(9*(2-(var(16)>0))/2)
guard.pausetime = ceil(9*(2-(var(16)>0))/2),ceil(8*(2-(var(16)>0))/2)
sparkno = -1
guard.sparkno = s9112
sparkxy = -10, -85
hitsound = S44,2
guardsound = S43,0
ground.type = High
air.type = High
ground.slidetime = 10+(var(41)*2)
ground.hittime = 10+(var(41)*2)
air.hittime = 10+(var(41)*2)
guard.ctrltime = 11
ground.velocity = -6*(2-(var(16)>0))/2
guard.velocity = -5*(2-(var(16)>0))/2
air.velocity = -4, -5.25
airguard.velocity = -4,-1
ground.cornerpush.veloff = -8.4*(2-(var(16)>0))/2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 70*(1000+var(24))/1000*ifelse((var(15)||var(16)),0,1),35*(1000+var(24))/1000*ifelse((var(15)||var(16)),0,1)
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
air.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 0]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 80
anim = 9100
scale = 0.48,0.48

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -85

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1



Offline Scar

  • Dragonslayer
  • Infinity Administrator
  • *
  • Posts: 2803
  • Country: United States us
  • Last Login:July 29, 2016, 10:49:53 AM
  • Cobra Mugen Team
Re: close attack help
« Reply #1 on: August 23, 2008, 12:29:35 AM »
You have to code it like this in the cmd file.

;-----------------------------
[State -1, ????]<---------change that to whatever your using...
type = ChangeState
value = IfElse(P2BodyDist X > 15,200,201)<---------change that to whatever animations your using..
triggerall = !var(59)
triggerall = Command = "z" <---------change that to whatever your using...
triggerall = Command != "holddown"
trigger1 = (StateType = S) && (Ctrl)
!!Unite, Mobilize, Destroy!!

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

Virtual Bart Science Fair by Lord_Enemil
[June 15, 2024, 08:23:51 PM]


Classic VS : Cheng / Athena by ELECTRO
[June 13, 2024, 03:03:58 PM]


Marvel vs. Capcom: Eternity of Heroes REMAKE Game Update 1.3.0 - N.A.O.H. by Uche_of_IMT
[June 10, 2024, 11:25:24 PM]


Street Fighter Spec Ops 2021 by O Ilusionista
[June 08, 2024, 01:36:06 PM]


Lasombra's IKEMEN Go Interactive Stages' WIP Topic and Releases by Lasombra Demon
[June 06, 2024, 07:34:10 PM]


Kirby the Dream Battle by O Ilusionista
[June 06, 2024, 01:04:12 PM]


Neo Geo Pocket by malevka2
[June 05, 2024, 10:53:57 AM]


[WIP] Pocket Dimensional Clash 2 by O Ilusionista
[June 03, 2024, 03:18:12 PM]


[BOR] _Avengers United Battle Force_ by O Ilusionista
[June 03, 2024, 03:13:51 PM]


Mega Man & Bass - Dynamo Man by Sir Rousseau by O Ilusionista
[June 03, 2024, 03:09:50 PM]

* IMT Calendar

June 2024
Sun Mon Tue Wed Thu Fri Sat
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
[16] 17 18 19 20 21 22
23 24 25 26 27 28 29
30

SimplePortal 2.3.5 © 2008-2012, SimplePortal