×

[PR]この広告は3ヶ月以上更新がないため表示されています。
ホームページを更新後24時間以内に表示されなくなります。

自分の使っているstateの書き方

・アニメの枚数を気にせずに当たり判定をつける
hitdef攻撃を当てるにはtriggerでAnimelemで当たり判定のあるアニメのを指定しないといけませんね。
もしtrigger=1を使ってしまうと、攻撃が沢山あたってdamageが大ききなりすぎます。
そこで、Animelemの代わりにMoveContact=0を使うんです。
MoveContact=0は攻撃が当たっていないという意味を表します。
同ステート内で一度でも攻撃が当たれば、他のステートに行くまで当たらなくなります。
ガードされたら当たらなくなるGetHitVar(guarded)=0も一緒に使えば効果的です。
[State 1000]
type = HitDef
trigger1 = MoveContact=0;攻撃がヒットしてないか
trigger1 =GetHitVar(guarded)=0;攻撃がガードされてないか
attr = S, NA
animtype = Medium
getpower = 42
damage = 23
guardflag = MA
pausetime = 0,0
hitsound = S0,0
guard.sparkno =S300
sparkno =S300
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime = 13
ground.velocity = -5.5
air.velocity = -2.5,-4
Ground.CornerPush.VelOff = -10*Const(Size.XScale

・スーパーアーマー
[Statedef -1](commandのステート)に
[State -1]
type = Helper
trigger1 = NumHelper(50000) <1
ID = 50000
stateno = 50000
(stateno やIDは必要ならば変えてもいい)
[State -1]
type = LifeAdd
trigger1 = 1
value = 0-Helper(50000),GetHitVar(damage)
をコピペして、

その他のステートに
[Statedef 50000]
type = S
movetype= I
physics = S
juggle = 4
ctrl = 0
anim=50000
sprpriority = -1
[State 1000,HitOverride]
Type = HitOverride;ここでスーパーアーマーを設定します
Trigger1 = 1
Attr = SCA,AA,AP
StateNo = 50000;スーパーアーマーのステートナンバーです
IgnoreHitPause = 1
SuperMoveTime = 999;念のため設定
PauseMoveTime =999
[State 181, 無敵]
type = notHitBy
trigger1 = 1
value = ,AT
time = 60
[State 201, Push]
trigger1 = 1
type = Lifeset
value =9999
[State 201, Push]
type = BindToParent
trigger1 = 1
facing = 1
time = 1
[State 201, Push]
type = AssertSpecial
trigger1 = 1
flag = invisible
[Statedef 50001,]
type = S
movetype = H
physics = S
anim=0
[State 1000,HitOverride]
Type = HitOverride;ここでスーパーアーマーを設定します
Trigger1 = 1
Attr = SCA,AA,AP
StateNo = 50001;スーパーアーマーのステートナンバーです
IgnoreHitPause = 1
SuperMoveTime = 999;念のため設定
PauseMoveTime =999
[State 201, Push]
trigger1 = 1
type = Lifeset
value =9999
[State 201, Push]
type = BindToParent
trigger1 = 1
facing = 1
time = 1
[State 201, Push]
type = AssertSpecial
trigger1 = 1
flag = invisible
[State 201, Push]
type = ChangeState
trigger1 = HitShakeOver
value =50000

これをコピペするだけです。

・十字キーで空を飛ぶキャラ
ジョジョのペットショップの様なキャラです。
[Statedef -1]に

[State -1]
type = velset
trigger1 = command != "holdup"
trigger1 = Stateno < 5000
trigger1 = pos Y <= 0
y = 0
[State -1]
type = PosSet
trigger1 = Pos Y < -240
y = -240
[State -1]
type = velset
trigger1 = Ctrl
trigger1 = command = "holdup"
trigger1 = Life != 0
trigger1 = P2Life != 0
y = -2.4
[State -1]
type = velset
trigger1 = Ctrl
trigger1 = command = "holddown"
trigger1 = Life != 0
trigger1 = P2Life != 0
y = 2.4
[State -1]
type = ChangeState
trigger1 = StateType = A
trigger1 = AnimTime = 0
trigger1 = Life != 0
trigger1 = P2Life != 0
trigger1 = Stateno < 5030
value = 0
[State -1]
type = velset
trigger1 = Ctrl
trigger1 = command = "holdfwd"
trigger1 = command = "holddown"
trigger1 = Life != 0
trigger1 = P2Life != 0
y = 2.4
x = const(velocity.walk.fwd.x)
[State -1]
type = velset
trigger1 = Ctrl
trigger1 = command = "holdfwd"
trigger1 = stateno != 100
trigger1 = Life != 0
trigger1 = P2Life != 0
x = const(velocity.walk.fwd.x)
[State -1]
type = velset
trigger1 = Ctrl
trigger1 = command = "holdback"
trigger1 = stateno != 105
trigger1 = Life != 0
trigger1 = P2Life != 0
x = const(velocity.walk.back.x)
[State -1]
type = velset
trigger1 = Ctrl
trigger1 = command = "holdup"
trigger1 = command = "holdfwd"
trigger1 = Life != 0
trigger1 = P2Life != 0
y = -2.4
x = const(velocity.walk.fwd.x)
[State -1]
type = velset
trigger1 = Ctrl
trigger1 = command = "holdback"
trigger1 = command = "holddown"
trigger1 = Life != 0
trigger1 = P2Life != 0
y = 2.4
x = const(velocity.walk.back.x)
[State -1]
type = velset
trigger1 = Ctrl
trigger1 = command = "holdup"
trigger1 = command = "holdback"
trigger1 = Life != 0
trigger1 = P2Life != 0
y = -2.4
x = const(velocity.walk.back.x)
[State -1,n]
type = Changeanim
trigger1 = Ctrl
trigger1 = Life != 0
trigger1 = P2Life != 0
trigger1 = anim != 21
value = 21
[State -1]
type = PosSet
trigger1 = Life != 0
trigger1 = P2Life != 0
trigger1 = Stateno < 5000
trigger1 = pos Y >= 0
y = 1
[State 20, 4]
type = ChangeAnim
trigger1 vel x = const(velocity.walk.fwd.x)||vel x = const(velocity.walk.back.x)
trigger1 = SelfAnimExist(20)
trigger1 = Anim != 20
value = 20
[State 20, 4]
type = Changestate
trigger1 =anim=10
trigger1 = command != "holddown"
value = 0
これをコピペするだけです。
トップページに戻る