News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

coding

Started by javonlouis, February 18, 2018, 03:55:33 AM

Previous topic - Next topic

javonlouis

Quote from: javonlouis on February 18, 2018, 03:32:02 AM
i'm very sorry for making a topic called sprites few times,odb718 is right i can import a sprite or make it from scratch,can someone help me i don't know what's missing i'm trying to get iori to hit the opponent while he's on the ground,i don't what's wrong or what's missing from my coding,the hitflag has mafd on it but something else is still missing,it's like ex iori's ex shiki kototsuki in kof 13,i have nothing else to do but to make this move?

Spoiler: The Statedefs (click to show)
[Statedef 2211]
type = s
movetype = a
physics = s
juggle = 0
anim = 2211
velset = 0,0
poweradd = 60
sprpriority = 2
ctrl = 0

[state 1000, width]
type = width
trigger1 = 1
edge = 30,0

[state 1000, hitdef]
type = HitDef
trigger1 = time = 0
attr = s,sa
hitflag = maf                     
animtype = hard         
air.animtype = hard
priority = 3,Hit
damage = 15,0
pausetime = 3,3
sparkno = -1
sparkxy = -15,-55
hitsound = S13,0
guardsound = S8,11
ground.type = low
ground.slidetime = 10
ground.hittime = 20
ground.velocity = 0
p1stateno = 2212
p2stateno = 2213
p2facing = 1

[State 1000, VelSet]
type = VelSet
trigger1 = animelem = 1
x = 9

[State 1000, TargetState]
type = TargetState
trigger1 = movehit
value = 2213
persistent = 0

[State 1000, TargetState]
type = TargetState
trigger1 = movehit
value = 2212

[State 1000, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

[statedef 2212]
type = s
movetype = a
physics = n
velset = 0,0
juggle = 0
poweradd = 50
anim = 2212
ctrl = 0
sprpriority = 5

[State 1000, Explod]
type = Explod
trigger1 = movehit = 1
trigger2 = animelem = 1,>=0
anim = 4080
ID = 4080
pos = 15,-10
postype = p1 
bindtime = 1
sprpriority = 20
under = 0
ontop = 0
scale = 0.5,0.5
ignorehitpause = 1
supermove = 999
pausemove = 999

[State -2, Explods]
type = Explod
trigger1 = movehit = 1
trigger1 = random < 100
anim = 4130
pos = 0,-50
postype = p2
bindtime = 1
random = 100,100
sprpriority = 9
ignorehitpause = 1
supermove = 1

[State -2,explods]
type = Explod
trigger1 = Movehit = 1
trigger1 = Random < 100
anim = 4135
pos = 0,-50
postype = p2
sprpriority = 9
bindtime = 1
random = 100,100
ownpal = 1
supermove = 1
ignorehitpause = 1

[State -2,explods]
type = Explod
trigger1 = Movehit = 1
trigger1 = Random < 100
anim = 4140
pos = 0,-50
postype = p2
sprpriority = 9
bindtime = 1
random = 100,100
ownpal = 1
supermove = 1
ignorehitpause = 1

[State -2, explods]
type = Explod
trigger1 = Movehit = 1
trigger1 = Random < 100
anim = 4145
pos = 0,-50
postype = p2
sprpriority = 9
bindtime = 1
random = 100,100
ownpal = 1
supermove = 1
ignorehitpause = 1

[State 1000, grab sound]
type = PlaySnd
trigger1 = animelem = 1
value = s8,11

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = s5,100

[state 1000, targetbind]
type = targetbind
trigger1 = animelemtime(1) = 0
pos = 77,-5

[state 1000, hitdef1]
type = hitdef
trigger1 = animelem = 1
attr = s,sa
getpower = 0
damage = 120,0
animtype = Hard
hitflag = mafd
priority = 3, Hit
pausetime = 5,0
sparkno = -1
sparkxy = -25,-65
hitsound = s13,0
ground.type = low
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = 0
air.velocity = 0
fall = 1
fall.recover = 0
envshake.time = 12
envshake.ampl = 18
envshake.freq = 100
palfx.time = 60
palfx.add = 50,0,100
palfx.sinadd = -80,-80,-80,15
palfx.color = 0
palfx.invertall = 1
p2facing = 1

[State 1000, Explod]
type = Explod
trigger1 = animelem = 1
anim = 2520
ID = 2520
pos = 0,0
postype = p1
sprpriority = 45
bindtime = 1
under = 0
ontop = 0
supermove = 999
pausemove = 999
scale = 0.5,0.5

[state 1000, width]
type = width
trigger1 = time = 0
edge = 70,0

[State 1000, end]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

[statedef 2213]
type = A
movetype = H
physics = N
velset = 0,0
sprpriority = 2

[State -2, DestroySelf]
type = DestroySelf
trigger1 = IsHelper
ignorehitpause = 1

[State -2, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State -2, SelfState]
type = SelfState
trigger1 = Time > 500
trigger1 = P2StateNo != [4000,4100)
value = 5050

[State -2, ChangeAnim2]
type = ChangeAnim2
Trigger1 = Time = 0
value = 2213

[State 4020, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1

[State a]
type = palfx
trigger1 = animelem = 4
time = 65
mul = 256,128,256
sinadd = 80,0,80,65
add = 50,0,50
color = 50
ignorehitpause = 1

[State 4020, VelSet]
type = VelSet
trigger1 = AnimElem = 5
x = -5
y = -5

[State 4020, VelMul]
type = VelMul
trigger1 = AnimElem = 5, >= 0
x = 0.97

[State 4020, VelAdd]
type = VelAdd
Trigger1 = AnimElem = 5, >= 0
y = 0.6

[State 4020, SelfState]
type = SelfState
triggerall = AnimElem = 5, >= 0
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

Prime SC

whats the problem, u cant just post a code and not tell us what happened

javonlouis

https://imgur.com/a/mRWdh he suppose to hit the opponent while he's laying down,am i missing something?

Prime SC

Add a d to the hitflag so it looks like hitflag = MAFD

javonlouis

Quote from: Prime SC on February 18, 2018, 02:10:56 PM
Add a d to the hitflag so it looks like hitflag = MAFD
the hitflag has mafd on it but he's still not hitting the opponent

Prime SC

hmm it looks like for the targetstate 2212 , you make the opponent change to your p1state. so try removing the targetstate

javonlouis


MGMURROW

As prime said, you have p2stateno=2213 and targetstate=2212. Make sure you have the red clns boxes over the right frames for p1 to hit. Then make sure p2 has blue clns on the frames they are going to be getting hit on.

Hope this helps

MGMURROW

javonlouis

#8
it works
----
how do i do it after a move?

Odb718

Welcome back javonlouis.
This move seems like a throw. But I'm unfamiliar with Iori so I'm not positive.

To do a move after another move you usually just make a changestate in the cmd that would let it switch.
If you mean how do you switch P2's state after he's hit into a custom state, you use changestate. You can also use TargetState inside of P1's active state to switch P2, but only if the target hasn't dropped.

Can you explain what you mean by "it"?
vVv Gouken718 vVv SabreTooth718 vVv


javonlouis

i use changestate but during that move he does it,he's suppose to do it after it

Odb718

You said it works as if that's the way you wanted it. Do you want to do it a second time? You have the hitdef in the first state and it switches P1 and P2. If there is no hit, P2 and P1 wont change. So there wouldn't be a second move.

If you want Iori to hit P2 a second time, copy and paste the hitdef and targetstate into a second state. Then change the numbers to bring you to a third state. You have to decide and make the 3rd state if that's how you want it.
vVv Gouken718 vVv SabreTooth718 vVv


javonlouis

do you mean copy the hitdef and targetstate in the second state number?

Odb718

If you are trying to make the second state be an attack and control P2, you can copy and paste the stuff. Or you can use Fighter Factory 3 and double click targetstate and hitdef to post new ones in the second state.
I'm still not sure exactly what you're needing to do.
vVv Gouken718 vVv SabreTooth718 vVv


javonlouis

i have two hitdefs in the second state,is that right?

javonlouis