YesNoOk
avatar

Replicating Mitsuru's Freeze state (Read 352 times)

Started by Malisoulxd, September 17, 2018, 02:04:30 am
Share this topic:
Replicating Mitsuru's Freeze state
#1  September 17, 2018, 02:04:30 am
  • avatar
    • USA
i'm working on a ice attack which freezes the opponent for a short time but there are a few problems.

1.once the attack hits it does freeze but it doesn't fly up in the air

2.the frozen target is still able to be controlled with the left and right controls

i was referencing the freeze code from Misturu(P4A)

here is the code's i used

Quote
;Freeze
[Statedef 642]
type=A
movetype=H
physics=N
sprpriority=1
ctrl = 0

[State 1101]
type = NotHitBy
trigger1 = 1
value = , NT, ST, HT
time = 1

[State ]
type=Changeanim2
TriggerAll=!SelfAnimExist(7990)&&!SelfAnimExist(50 30)
trigger1=1
value=5030
[State ]
type=Changeanim
TriggerAll=!SelfAnimExist(7990)&&SelfAnimExist(503 0)
trigger1=1
value=5030
[State ]
type=Changeanim
TriggerAll=SelfAnimExist(7990)
trigger1=1
value=7990

[State ]
type=PosFreeze
trigger1=HitShakeOver=0
value=1

[State ]
type=VelSet
TriggerAll=GetHitVar(ChainID)=307
trigger1=HitShakeOver=1
x=10
y=-13
persistent=0
[State ]
type=VelSet
TriggerAll=GetHitVar(ChainID)=507
trigger1=HitShakeOver=1
x=9
y=6
persistent=0
[State ]
type=VelSet
TriggerAll=GetHitVar(ChainID)=408
trigger1=HitShakeOver=1
x=5
y=-24
persistent=0
[State ]
type=VelSet
TriggerAll=GetHitVar(ChainID)=1010||GetHitVar(Chai nID)=1011||GetHitVar(ChainID)=1012
trigger1=HitShakeOver=1
x=-2
y=-14
persistent=0

[State ]
type=Veladd
trigger1=HitShakeOver=1
y=GetHitVar(yaccel)
persistent=1

[State 0, PalFXWiz]
type = PalFX
TriggerAll = Anim = 7990
trigger1 = Time%8 = 0
time = 8
add = 120,30,180
mul = 170,294,200
sinadd = 85,85,110,8
invertall = 0
color = 256
[State 0, PalFX]
type = PalFX
TriggerAll = Anim != 7990
trigger1 = Time%8 = 0
time = 8
add = 120,30,180
mul = 170,294,200
sinadd = 85,85,110,8
invertall = 1
color = 0

[State ]
type=PosSet
trigger1=time>=13&&pos y>=0&&HitShakeOver=1
y=0

[State ]
type=EnvShake
trigger1=time>=13&&pos y>=0&&HitShakeOver=1
time=5
freq=160
ampl=-4

[State ]
type=ChangeState
trigger1=time>=13&&pos y>=0&&HitShakeOver=1
value=643

;Thunk
[Statedef 643]
type=A
movetype=H
physics=C
sprpriority=1
ctrl = 0

[State 1101]
type = NotHitBy
trigger1 = 1
value = , NT, ST, HT
time = 1

[State ]
type=Changeanim2
TriggerAll=!SelfAnimExist(7990)&&!SelfAnimExist(50 30)
trigger1=1
value=5030
[State ]
type=Changeanim
TriggerAll=!SelfAnimExist(7990)&&SelfAnimExist(503 0)
trigger1=1
value=5030
[State ]
type=Changeanim
TriggerAll=SelfAnimExist(7990)
trigger1=1
value=7990

[State 0, VelSet]
type=VelSet
trigger1=1
y=0
[State ]
type=PosSet
trigger1=1
y=0

[State 0, PalFXWiz]
type = PalFX
TriggerAll = Anim = 7990
trigger1 = Time%8 = 0
time = 8
add = 120,30,180
mul = 170,294,200
sinadd = 85,85,110,8
invertall = 0
color = 256
[State 0, PalFX]
type = PalFX
TriggerAll = Anim != 7990
trigger1 = Time%8 = 0
time = 8
add = 120,30,180
mul = 170,294,200
sinadd = 85,85,110,8
invertall = 1
color = 0

[State ]
type=SelfState
TriggerAll=GetHitVar(ChainID)=307
trigger1=time>=50
trigger2=!Alive
value=5035
[State ]
type=SelfState
TriggerAll=GetHitVar(ChainID)=507
trigger1=time>=90
trigger2=!Alive
value=5035
[State ]
type=SelfState
TriggerAll=GetHitVar(ChainID)=408
trigger1=time>=100
trigger2=!Alive
value=5035
[State ]
type=SelfState
TriggerAll=GetHitVar(ChainID)=1010
trigger1=time>=100
trigger2=!Alive
value=5035
[State ]
type=SelfState
trigger1=time>=60
trigger2=!Alive
value=5035

(i removed TriggerAll=GetHitVar(ChainID)=1011||GetHitVar(Chai nID)=1012 from the last state because the target will stay frozen forever)

anyone know how i can fix this?






Last Edit: September 20, 2018, 03:09:06 am by Malisoulxd
Re: Replicating Mitsuru's Freeze state
#2  September 17, 2018, 11:20:23 pm
  • *****
  • Shame on you!
    • USA
It seems like you have more than a few typos. I'm not sure that's your problem or not. But Chai nID and
TriggerAll=!SelfAnimExist(7990)&&SelfAnimExist(503 0)
and the rest need to be fixed.
If P1 is sending P2 into a custom state P2 shouldn't have control. Something's off at that point of the code.

What is state 643? If it's the time when P2 is supposed to fly up, you have
[State 0, VelSet]
type=VelSet
trigger1=1
y=0
stopping that from happening.
vVv Wheat Stage Released vVv
Re: Replicating Mitsuru's Freeze state
#3  September 18, 2018, 05:38:18 pm
  • avatar
    • USA
It seems like you have more than a few typos. I'm not sure that's your problem or not. But Chai nID and
TriggerAll=!SelfAnimExist(7990)&&SelfAnimExist(503 0)
and the rest need to be fixed.
If P1 is sending P2 into a custom state P2 shouldn't have control. Something's off at that point of the code.

What is state 643? If it's the time when P2 is supposed to fly up, you have
[State 0, VelSet]
type=VelSet
trigger1=1
y=0
stopping that from happening.

actually its state 642 that needs to fly up actually i kinda fixed the movement problem from state 643 by removing type and Physics from the statedef. as for state 642 i somehow did manage to get it launching by changing movetype from H to A but it doesn't take any damage. without it changing the movetype i was only able to launch it when  its in the are so there must be something anchoring it
Re: Replicating Mitsuru's Freeze state
#4  September 20, 2018, 03:08:57 am
  • avatar
    • USA
It seems like you have more than a few typos. I'm not sure that's your problem or not. But Chai nID and
TriggerAll=!SelfAnimExist(7990)&&SelfAnimExist(503 0)
and the rest need to be fixed.
If P1 is sending P2 into a custom state P2 shouldn't have control. Something's off at that point of the code.

What is state 643? If it's the time when P2 is supposed to fly up, you have
[State 0, VelSet]
type=VelSet
trigger1=1
y=0
stopping that from happening.

actually its state 642 that needs to fly up actually i kinda fixed the movement problem from state 643 by removing type and Physics from the statedef. as for state 642 i somehow did manage to get it launching by changing movetype from H to A but it doesn't take any damage. without it changing the movetype i was only able to launch it when  its in the are so there must be something anchoring it

Update:i removed the posfreeze from state 642 and replaced it with the gravity effect so it will feel natural. its the closet to replicating the effect so problem solved
Last Edit: September 20, 2018, 03:14:42 am by Malisoulxd