YesNoOk
avatar

Is There a Way To Position And Increase Hits to Projectiles in HitDef State? (Read 7384 times)

Started by Ki$@1st456v, January 09, 2021, 05:24:14 pm
Share this topic:
Is There a Way To Position And Increase Hits to Projectiles in HitDef State?
#1  January 09, 2021, 05:24:14 pm
  • avatar
  • **
    • USA
Hi again, everyone! I am getting my moves to work on my custom REDHOT MVC2 Storm and I was trying to get the Aerial Plasma Beam positioned to come out of her hand and increase the hits for the move. I tried to use an "offset" value for the move but it did not work to change the position of the beam because the move is in a "HitDef" state rather than a "Projectile" state. I also tried to add a "projhits" state where I can increase the hits of the move but it would not change it because it is in the "HitDef" state. Is there a way to increase the projectile hits and change its positioning while in the "HitDef" state? I was not sure about changing it to a "Projectile" state because I did not want to ruin the moves function and design in its' coding. Thank you all for your help, and I appreciate it very much.

; Plasma Beam
[StateDef 1000]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1000
poweradd = 80
sprpriority = 2

[State 0, VarSet]
type = VarSet
trigger1= !time && var(59)<=0
var(10) = ifelse(command="QCF_z",2,ifelse(command="QCF_y",1,0))

[State 1000, VarSet]
type=varset
trigger1= !time && var(59)>=1
var(10)= ifelse((p2movetype=H || random<500), 2, ifelse(random<500, 1, 0))

[State G-FX, Move Dust]
type = Explod
trigger1 = time = 0
anim = 8300
id = 8300
supermove = 1
sprpriority = 4
scale = 0.5,0.5
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 8
value = 3,2
volume = 255
volumescale = 255
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 8
value = 4,6
volume = 255
volumescale = 255

[State 0, Helper]
type = Helper
triggerall = numhelper(1000)=0
trigger1 = AnimElem = 9
helpertype = normal ;player
name = "Plasma Beam"
ID = 1000
stateno = 1010
pos = floor(56*const(size.xscale)),floor(-78*const(size.yscale))
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = numhelper(1000)=0
trigger1 = Anim != 1001
trigger1 = AnimElemTime(9)>=0
value = 1001

[State 1000, end]
type = ChangeState
triggerall = anim = 1001
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-------------------------------------------------------------------
; Air Plasma Beam
[StateDef 1005]
type = A
movetype= A
physics = N
juggle  = 1
velset = Vel X/10,Vel Y/5
ctrl = 0
anim = 1005
poweradd = 80
sprpriority = 2
offset = 43,-54

[State 0, VelSet]
type = VelSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y >= 0
y = 0

[state 410,3]
type = veladd
trigger1 = var(19)
y = 0
x = 0

[state 410,3]
type = velset
trigger1 = var(19)
y = 0
x = 0

[State 0, ChangeState]
type = ChangeState
triggerall = anim = 1006
trigger1 = animelem = 6 && var(19)
value = 1305

[State 0, VarSet]
type = VarSet
trigger1= !time && var(59)<=0
var(10) = ifelse(command="QCF_z",2,ifelse(command="QCF_y",1,0))

[State 1000, VarSet]
type=varset
trigger1= !time && var(59)>=1
var(10)= ifelse((p2movetype=H || random<500), 2, ifelse(random<500, 1, 0))

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 1005 && AnimElem = 5
value = 3,2
volume = 255
volumescale = 255
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 1005 && AnimElem = 5
value = 4,6
volume = 255
volumescale = 255

[State 0, Helper]
type = Helper
triggerall = numhelper(1005)=0
triggerall = anim = 1005
trigger1 = AnimElem = 5
helpertype = normal ;player
name = "Plasma Beam"
ID = 1005
stateno = 1015
pos = floor(18*const(size.xscale)),floor(-45*const(size.yscale))
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = numhelper(1005)=0
trigger1 = Anim != 1006
trigger1 = AnimElemTime(5)>=0
value = 1006

[State 0, StateTypeSet]
type = StateTypeSet
triggerall = anim = 1006
trigger1 = var(19)=0
trigger1 = AnimElemTime(5)=0
statetype = A       ;S,A,C,L
movetype = I        ;I,A,H
physics = A         ;A,C,S,N


[State 620, ChangeState]
type = ChangeState
triggerall = anim = 1006
triggerall = floor (pos Y < -155)
trigger1 = animelem = 7
value = 1211
ctrl = 1


;------------------------------
; Plasma Beam helper
[Statedef 1010]
type = A
movetype = A
physics = N
ctrl = 0
;anim = 1010
sprpriority = 4
velset = 0,0
juggle = 1

[State 3000, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && Anim != StateNo
value = StateNo

[State 0, VarSet]
type = VarSet
trigger1= !time && !prevstateno
var(10) = ifelse(parent,var(10)=2,2,ifelse(parent,var(10)=1,1,0))

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
pos = floor(56*const(size.xscale)),floor(-78*const(size.yscale))

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=1010
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 4
ignorehitpause = 1
persistent = 1

[State 901:projectile]
type = hitdef
trigger1 = time = 0  && (P2StateNo != [5070,5071])
attr = S,NA
hitflag = MAF
guardflag = MA
animtype = Diagup
air.animtype = Diagup
damage = 75,55
getpower = 50,0
givepower = 20,0
pausetime = 0,12
guard.pausetime = 0,12
sparkno = S9999
guard.sparkno = S8050
sparkxy = -10,-21
hitsound = s5+parent,var(49),3
guardsound = s6+parent,var(49),0
ground.type = High
ground.slidetime = 18
ground.hittime = 20
air.hittime = 19
yaccel = 1.16
ground.velocity = -19.7,-12.7
guard.velocity = -13
ground.cornerpush.veloff = -14
air.velocity = -19.7,-12.7
airguard.velocity = -10.5,3
fall.xvelocity = 0
fall.yvelocity = -2
fall.recover = 0
id = 1+4

[State 220, 8]
type = TargetState
triggerall = p2statetype = S
trigger1 = MoveHit && anim = 1010
trigger1 = NumTarget != 0
trigger1 = target, stateno = [5000,5030]
ignorehitpause = 1
value = 10226

[State 220, 8]
type = TargetState
triggerall = p2statetype = C
trigger1 = MoveHit && anim = 1010
trigger1 = NumTarget != 0
trigger1 = target, stateno = [5000,5030]
ignorehitpause = 1
value = 10227

[State 220, 8]
type = TargetState
triggerall = p2statetype = A
trigger1 = MoveHit && anim = 1010
trigger1 = NumTarget != 0
trigger1 = target, stateno = [5000,5030]
ignorehitpause = 1
value = 10228

[State G-FX, Hit/Guard Spark]
type = Explod
trigger1 = MoveContact
anim = Cond(MoveHit, 8006, 32004)
postype = p1
pos = Floor(P2Dist X - 10), Floor(P2Dist Y - 81)
bindtime = 1
removetime = -2
scale = 0.5, 0.5
supermovetime = 500
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0 

[State 901:destroyself]
type = Destroyself
trigger1 = AnimTime=0
trigger2 = parent,movetype=H
trigger3 = parent,stateno!= 1000


;---------------------------------------------------------
; Hit by Plasma Beam
[Statedef 10226]
type    = S
movetype= H
physics = N
velset = 0,0

[State 225, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 5002

[State 225, 2]
type = ChangeState
trigger1 = Time = 10
value = 10229

;---------------------------------------------------------
; Hit by Plasma Beam
[Statedef 10227]
type    = C
movetype= H
physics = N
velset = 0,0

[State 225, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 5022

[State 225, 2]
type = ChangeState
trigger1 = Time = 10
value = 10229

;---------------------------------------------------------
; Hit by Plasma Beam
[Statedef 10228]
type    = A
movetype= H
physics = N
velset = 0,0

[State 225, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 5012

[State 225, 2]
type = ChangeState
trigger1 = Time = 10
value = 10229

;---------------------------------------------------------
; Hit by Plasma Beam - Flying
[Statedef 10229]
type    = A
movetype= H
physics = N

[State 226, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 225, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 5064

[State 226, 2]
type = VelAdd
trigger1 = 1
y = 1.27

[State 226, 5]
type = SelfState
triggerall = alive = 1
trigger1 = Time = 15
value = 5040

[State -3]
type = ChangeState
triggerall = hitshakeover
trigger1 = !Alive || !Life
value = 5090
;------------------------------
; Plasma Beam helper
[Statedef 1015]
type = A
movetype = A
physics = N
ctrl = 0
;anim = 1015
sprpriority = 4
velset = 0,0
juggle = 1

[State 3000, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && Anim != StateNo
value = StateNo

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1.3,0.92

[State 0, VarSet]
type = VarSet
trigger1= !time && !prevstateno
var(10) = ifelse(parent,var(10)=2,2,ifelse(parent,var(10)=1,1,0))

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
pos = floor(18*const(size.xscale)),floor(-25*const(size.yscale))

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=1015
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 4
ignorehitpause = 1
persistent = 1

[State 901:projectile]
type = hitdef
trigger1 = time = 0  && (P2StateNo != [5070,5071])
attr = S,NA
hitflag = MAFD
guardflag = MA
animtype = Diagup
air.animtype = Diagup
damage = 75,55
getpower = 50,0
givepower = 20,0
pausetime = 0,7
guard.pausetime = 0,7
sparkno = S9999
guard.sparkno = S8050
sparkxy = -10,11
hitsound = s5+parent,var(49),3
guardsound = s6+parent,var(49),0
ground.type = High
ground.slidetime = 18
ground.hittime = 20
down.velocity = -6,-7
air.hittime = 2
yaccel = 1.16
ground.velocity = -8,-2
guard.velocity = -13
ground.cornerpush.veloff = -14
air.velocity = -7,-2
airguard.velocity = -10.5,3
fall.xvelocity = 0
fall.yvelocity = -2
fall.recover = 0
fall = 1
air.fall = 1

[State G-FX, Hit/Guard Spark]
type = Explod
trigger1 = MoveContact
anim = Cond(MoveHit, 8006, 32004)
postype = p1
pos = Floor(P2Dist X - 10), Floor(P2Dist Y - 81)
bindtime = 1
removetime = -2
scale = 0.5, 0.5
supermovetime = 500
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0 

[State 901:destroyself]
type = Destroyself
trigger1 = AnimTime=0
trigger2 = parent,movetype=H
trigger3 = parent,stateno!= 1005

I also have the link to a video where everyone can see what I am talking about. It has nothing happening at first, but then you see the Aerial Plasma Beam.
https://drive.google.com/file/d/1m--m7hg7aHqwNXZdp8Xar90npmF-JZx8/view?usp=sharing
Re: Is There a Way To Position And Increase Hits to Projectiles in HitDef State?
#2  January 09, 2021, 06:20:34 pm
  • ****
  • YERRRRRRRRRR
  • HIGHBRIDGE!
    • USA
    • Skype - DJHANNIBALROYCEUSA
    • sites.google.com/site/djhrmugen/
i dunno wat u mean by positioning but the mulitple hits part,

add  this inthe projectile hitdef.

 projhits=(whatever number u want)
Follow me on twitter! @djhannibalroyce
Re: Is There a Way To Position And Increase Hits to Projectiles in HitDef State?
#3  January 09, 2021, 08:07:39 pm
  • ***
  • Come On You Know LGx
  • biblical (yea)
    • USA
    • Skype - eddsworldtrash
    • remixsparta.wix.com/mugensdawn
The beam is not in the HitDef statectrl, it's in the entire Helper state. To change the position, you modify the pos of the helper in the helper sctrl. to have the hit land multiple times, you simply call the hitdef inside the helper state multiple times, possibly with something like "time%5 = 0".
Re: Is There a Way To Position And Increase Hits to Projectiles in HitDef State?
#4  January 09, 2021, 08:37:16 pm
  • avatar
  • **
    • USA
Thank you for these answers! For clarity on this new info, for instance, do I put these things in the section where it says this below?

[State 0, Helper]
type = Helper
triggerall = numhelper(1005)=0
triggerall = anim = 1005
trigger1 = AnimElem = 5
helpertype = normal ;player
name = "Plasma Beam"
ID = 1005
stateno = 1015
pos = floor(18*const(size.xscale)),floor(-45*const(size.yscale))
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
 

I saw that you said "time%5=0" as well. Is that the command itself or do I type something else along with it? I am not familiar with that command.

Also, at the part where it says "pos =" do I use the Offset viewer to put values to change the position of the beam?
Re: Is There a Way To Position And Increase Hits to Projectiles in HitDef State?
#5  January 09, 2021, 11:58:25 pm
  • ***
  • Come On You Know LGx
  • biblical (yea)
    • USA
    • Skype - eddsworldtrash
    • remixsparta.wix.com/mugensdawn
Yes, that is the Helper sctrl. The pos parameter details where the beam shows up. Looks like the author did some auto-conform to playerscaling shenanigans. You can keep it if you want, just replace the two numbers that are there with what you want.

"time%5 = 0" is a trigger. Replace the trigger in the Helper's HitDef sctrl.

I guess you can use the offset viewer?
Re: Is There a Way To Position And Increase Hits to Projectiles in HitDef State?
#6  January 10, 2021, 03:51:23 pm
  • avatar
  • **
    • USA
Thank you again, I changed the value at

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
pos = floor(18*const(size.xscale)),floor(-25*const(size.yscale))

to

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
pos = floor(46*const(size.xscale)),floor(-64*const(size.yscale))

and it positioned the beam to come from Storm's hand in the Aerial Plasma Beam!
I am still trying to figure out where I replace the trigger in the Hitdef sctrl. Is it
trigger1 or the triggerall sections here

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
pos = floor(46*const(size.xscale)),floor(-64*const(size.yscale))

or here

[State 0, Helper]
type = Helper
triggerall = numhelper(1005)=0
triggerall = anim = 1005
trigger1 = AnimElem = 5
helpertype = normal ;player
name = "Plasma Beam"
ID = 1005
stateno = 1015
pos = floor(18*const(size.xscale)),floor(-45*const(size.yscale))
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

?
Re: Is There a Way To Position And Increase Hits to Projectiles in HitDef State?
#7  January 11, 2021, 06:26:48 pm
  • ***
  • Come On You Know LGx
  • biblical (yea)
    • USA
    • Skype - eddsworldtrash
    • remixsparta.wix.com/mugensdawn
Those are two completely different sctrls. What you want is the thing literally named "HitDef" in the Helper state. Replace any "time" trigger on that.
Re: Is There a Way To Position And Increase Hits to Projectiles in HitDef State?
New #8  January 11, 2021, 11:37:41 pm
  • avatar
  • **
    • USA
Thanks everyone! I changed the section where it said

[State 901:projectile]
type = hitdef
trigger1 = time = 0  && (P2StateNo != [5070,5071])
attr = S,NA
hitflag = MAF
guardflag = MA
animtype = Diagup
air.animtype = Diagup
damage = 75,55
getpower = 50,0
givepower = 20,0
pausetime = 0,12
guard.pausetime = 0,12
sparkno = S9999
guard.sparkno = S8050
sparkxy = -10,-21
hitsound = s5+parent,var(49),3
guardsound = s6+parent,var(49),0
ground.type = High
ground.slidetime = 18
ground.hittime = 20
air.hittime = 19
yaccel = 1.16
ground.velocity = -19.7,-12.7
guard.velocity = -13
ground.cornerpush.veloff = -14
air.velocity = -19.7,-12.7
airguard.velocity = -10.5,3
fall.xvelocity = 0
fall.yvelocity = -2
fall.recover = 0
id = 1+4

to

[State 901:projectile]
type = hitdef
trigger1 = time%5 = 4  && (P2StateNo != [5070,5071])
attr = S,NA
hitflag = MAF
guardflag = MA
animtype = Diagup
air.animtype = Diagup
damage = 75,55
getpower = 50,0
givepower = 20,0
pausetime = 0,12
guard.pausetime = 0,12
sparkno = S9999
guard.sparkno = S8050
sparkxy = -10,-21
hitsound = s5+parent,var(49),3
guardsound = s6+parent,var(49),0
ground.type = High
ground.slidetime = 18
ground.hittime = 20
air.hittime = 19
yaccel = 1.16
ground.velocity = -19.7,-12.7
guard.velocity = -13
ground.cornerpush.veloff = -14
air.velocity = -19.7,-12.7
airguard.velocity = -10.5,3
fall.xvelocity = 0
fall.yvelocity = -2
fall.recover = 0
id = 1+4

and it increased the hits of the projectile! I did it for the air version too! This thread has answered all questions in this post! Take care everyone!

Last Edit: January 12, 2021, 12:14:14 pm by Ki$@1st456v