忍者ブログ
かわいいは正義。いい時代になったものだ。
[893] [892] [891] [890] [889] [888] [886] [885] [884] [883] [861]
とある処理を書いててたんだが、ついさっきもっと楽な処理方法見つけたという。
まあせっかくだから残しておく。

+ + + + + + + + + +
;――――――――――――――――――――――――――――――――――――――――――
; Keyinput
;――――――――――――――――――――――――――――――――――――――――――
[statedef 21000]
anim = 30000
velset = 0, 0
ctrl = 0

[State 21000, フラグ/自分消去/影消去]
type = AssertSpecial
trigger1 = 1
flag = Invisible
flag2 = noshadow
IgnoreHitPause = 1

[State 20000, 変数確認]
Type = DisplayToClipBoard
Trigger1 = 1
Text = "var(2)=%dvar(0)=%d,var(1)=%d,var(2)=%d,var(3)=%d\n"
Params = var(2),var(0),var(1),var(2),var(3)
IgnoreHitPause = 1

[State -2, 距離確認デバック]
type = AppendToClipboard
trigger1 = 1
text = "Numexplod=%d,Numexplod=%d,Numexplod=%d\n"
params = Numexplod,NumExplod(21001+var(1)),numhelper(21001+var(0))
IgnoreHitPause = 1

[state 21000, 横帯]
Type = Explod
Trigger1 = !NumExplod(21000)
ID = 21000
Anim = 21000
pos = 0, 180
postype = left
Vel = 0,0
BindTime = -1
RemoveTime = -1
SprPriority = 5
Scale = .5,.3
OnTop = 0
OwnPal = 1
IgnoreHitPause = 1
SuperMoveTime = 99999
PauseMoveTime = 99999
trans = Add;Alpha
;alpha = 128, 128

[state 21000, 上]
Type = Explod
Trigger1 = var(2)%100<10 && (var(2)%10000)/100<10 && (var(2)%1000000)/10000<10 && var(2)/1000000<10
Trigger1 = command = "up"
Trigger1 = var(0):=var(0)+1
ID = 21001+var(0)+(NumExplod(21001+var(0)))
Anim = 21001
Pos = -20, 192
PosType = right
Vel = 0,0
BindTime = -1
RemoveTime = -1
SprPriority = 6
Scale = .4,.4
OnTop = 1
OwnPal = 1
IgnoreHitPause = 1
SuperMoveTime = 99999
PauseMoveTime = 99999

[state 21000, 右]
Type = Explod
Trigger1 = var(2)%100<10 && (var(2)%10000)/100<10 && (var(2)%1000000)/10000<10 && var(2)/1000000<10
Trigger1 = (facing = 1 && command = "fwd") || (facing = -1 && command = "back")
Trigger1 = var(0):=var(0)+1
ID = 21001+var(0)+(NumExplod(21001+var(0)))
Anim = 21002
Pos = -20, 192
PosType = right
Vel = 0, 0
BindTime = -1
RemoveTime = -1
SprPriority = 6
Scale = .4,.4
OnTop = 1
OwnPal = 1
IgnoreHitPause = 1
SuperMoveTime = 99999
PauseMoveTime = 99999

[state 21000, 下]
Type = Explod
Trigger1 = var(2)%100<10 && (var(2)%10000)/100<10 && (var(2)%1000000)/10000<10 && var(2)/1000000<10
Trigger1 = command = "down"
Trigger1 = var(0):=var(0)+1
ID = 21001+var(0)+(NumExplod(21001+var(0)))
Anim = 21003
Pos = -20, 192
PosType = right
Vel = 0, 0
BindTime = -1
RemoveTime = -1
SprPriority = 6
Scale = .4,.4
OnTop = 1
OwnPal = 1
IgnoreHitPause = 1
SuperMoveTime = 99999
PauseMoveTime = 99999

[state 21000, 左]
Type = Explod
Trigger1 = var(2)%100<10 && (var(2)%10000)/100<10 && (var(2)%1000000)/10000<10 && var(2)/1000000<10
Trigger1 = (facing = 1 && command = "back") || (facing = -1 && command = "fwd")
Trigger1 = var(0):=var(0)+1
ID = 21001+var(0)+(NumExplod(21001+var(0)))
Anim = 21004
Pos = -20, 192
PosType = right
Vel = 0, 0
BindTime = -1
RemoveTime = -1
SprPriority = 6
Scale = .4,.4
OnTop = 1
OwnPal = 1
IgnoreHitPause = 1
SuperMoveTime = 99999
PauseMoveTime = 99999

"fwd"
"back"

"down"
"a"
"b"
"c"
"x"
"y"
"z"
"start"
"df"
"db"
"uf"
"ub"
"掴み投げ"
"グレイブシュート"
"へヴィーストライク"
"バニシングストライク"

[State 21000, 入力中断]
Type = Varadd
Trigger1 = (var(2)%10000)/100=0
Trigger1 = command = "holdfwd"
var(2) = 1
[State 21000, 入力中断]
Type = Varadd
Trigger1 = (var(2)%10000)/100=0
Trigger1 = command = "holdback"
var(2) = 100
[State 21000, 入力中断]
Type = Varadd
Trigger1 = (var(2)%1000000)/10000=0
Trigger1 = command = "holdup"
var(2) = 10000
[State 21000, 入力中断]
Type = Varadd
Trigger1 = var(2)/1000000=0
Trigger1 = command = "holddown"
var(2) = 1000000
[State 21000, 入力再開]
Type = Varadd
Trigger1 = var(2)%100
Trigger1 = !(command = "holdfwd")
var(2) = -var(2)%100
[State 21000, 入力再開]
Type = Varadd
Trigger1 = (var(2)%10000)/100
Trigger1 = !(command = "holdback")
var(2) = -(var(2)%10000)/100*100
[State 21000, 入力再開]
Type = Varadd
Trigger1 = (var(2)%1000000)/10000
Trigger1 = !(command = "holdup")
var(2) = -(var(2)%1000000)/10000*10000
[State 21000, 入力再開]
Type = Varadd
Trigger1 = var(2)/1000000
Trigger1 = !(command = "holddown")
var(2) = -var(2)/1000000*1000000
"holdx"
"holdy"
"holdz"
"holda"
"holdb"
"holdc"
"holds"

[State 21000, for文の変わり]
Type = VarAdd
Trigger1 = var(1)>0
var(1) = -1

[State 21000, for文の変わり]
Type = Varset
Trigger1 = var(0)-var(1)>=0
var(3) = var(0)-var(1)

[State 21000, キー移動]
type = ModifyExplod
trigger1 = NumExplod(21001+var(1))
ID = 21001+var(1)
pos = -20-var(3)*25, 192
PosType = right
IgnoreHitPause = 1

[State 21000, エフェクト消去]
type = removeexplod
Trigger1 = var(0)>=13
ID = 21001+var(0)-12
IgnoreHitPause = 1

[State 21000, for文の変わり]
Type = VarSet
Trigger1 = var(1)<=ifelse(var(0)-12>0,var(0)-12,0)
var(1) = var(0)


変数余ってるんだからもっと変数使えよって話でね(・ω・`)逆にこんな方法よく思いついたな自分

拍手[0回]

PR
この記事にコメントする
お名前
タイトル
文字色
URL
コメント
パスワード Vodafone絵文字 i-mode絵文字 Ezweb絵文字
管理人のみ閲覧可能にする    
ブログ内検索
プロフィール
HN:
HIDE.MF
性別:
非公開
職業:
趣味:
MUGEN,AC北斗
自己紹介:
読み:ハイドエムエフ

ここはMUGEN用ブログ
mugenで製作したものとかその他色々書いてます

リンクフリーです。
最新記事
(11/11)
(11/10)
(06/11)
(05/29)
(01/03)
最新CM
[09/23 vesper]
[12/22 Ts]
[12/22 Ts]
[12/19 Ts]
[12/18 Ts]
最新TB
カレンダー
07 2017/08 09
S M T W T F S
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 31
カウンター
バーコード
P R
ツイッター
フリーエリア
Powered by ニンジャブログ  Designed by ゆきぱんだ
Copyright (c) 可愛いの拳 All Rights Reserved
忍者ブログ / [PR]