collapse

Author Topic: close attack help  (Read 397 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

Classic VS : Balrog by ELECTRO
[September 25, 2024, 11:44:58 PM]


Justice League Seattle Stage by Vegaz by LightFlare
[September 23, 2024, 12:14:06 PM]


Ancient Gears Stage 1.1 & 1.0 by MatreroG
[September 20, 2024, 11:59:18 AM]


Justice League Metropolis Stage by Vegaz by LightFlare
[September 16, 2024, 11:57:49 AM]


Ultimate Mai Shiranui (FF2 & FF3) by nickfurry
[September 15, 2024, 02:27:53 AM]


thunderstrike eric masterson by Blagoy
[September 12, 2024, 02:41:33 PM]


Justice League Gotham Stage by Vegaz by LightFlare
[September 11, 2024, 09:41:42 AM]


Lasombra's IKEMEN Go Interactive Stages' WIP Topic and Releases by Lasombra Demon
[September 07, 2024, 03:06:46 AM]


MatreroG's Stages W.I.P. Concepts by MatreroG
[September 06, 2024, 01:27:09 PM]


Justice League Flash Stage by Vegaz by LightFlare
[September 03, 2024, 10:30:40 AM]

* IMT Calendar

September 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