スポンサーサイト

上記の広告は1ヶ月以上更新のないブログに表示されています。
新しい記事を書く事で広告が消せます。

ヘルパーも使ってもっと早くAI起動

前の方法があんまり早くなかったので、ヘルパーも使って改良。例によって長いので続きから。
やってることはMUGENの便覧のものと同じ。

追記:只今修正中
追記:書き直しました→http://monoai.blog84.fc2.com/blog-entry-405.html

追記:以下の方法だとイントロを飛ばした時に暴発する模様。
   原因はよくわかりません……。


[Command]
name = "a_AI"
command = a
time = 1
[Command]
name = "b_AI"
command = b
time = 1
[Command]
name = "c_AI"
command = c
time = 1
[Command]
name = "x_AI"
command = x
time = 1
[Command]
name = "y_AI"
command = y
time = 1
[Command]
name = "z_AI"
command = z
time = 1
[Command]
name = "s_AI"
command = s
time = 1
[Command]
name = "F_ai"
command = F
time = 1
[Command]
name = "DFai"
command = DF
time = 1
[Command]
name = "D_ai"
command = D
time = 1
[Command]
name = "DBai"
command = DB
time = 1
[Command]
name = "B_ai"
command = B
time = 1
[Command]
name = "UBai"
command = UB
time = 1
[Command]
name = "U_ai"
command = U
time = 1
[Command]
name = "UFai"
command = UF
time = 1
[Command]
name = "F_AI"
command = F
time = 1
[Command]
name = "DFAI"
command = DF
time = 1
[Command]
name = "D_AI"
command = D
time = 1
[Command]
name = "DBAI"
command = DB
time = 1
[Command]
name = "B_AI"
command = B
time = 1
[Command]
name = "UBAI"
command = UB
time = 1
[Command]
name = "U_AI"
command = U
time = 1
[Command]
name = "UFAI"
command = UF
time = 1

[Command]
name = "AI"
command = /a
time = 1
[Command]
name = "AI"
command = /b
time = 1
[Command]
name = "AI"
command = /c
time = 1
[Command]
name = "AI"
command = /x
time = 1
[Command]
name = "AI"
command = /y
time = 1
[Command]
name = "AI"
command = /z
time = 1
[Command]
name = "AI"
command = /s
time = 1
[Command]
name = "AI"
command = /F
time = 1
[Command]
name = "AI"
command = /DF
time = 1
[Command]
name = "AI"
command = /D
time = 1
[Command]
name = "AI"
command = /DB
time = 1
[Command]
name = "AI"
command = /B
time = 1
[Command]
name = "AI"
command = /UB
time = 1
[Command]
name = "AI"
command = /U
time = 1
[Command]
name = "AI"
command = /UF
time = 1

[Statedef -1]

;AIをセット
;statedef -1の一番上に置く
;従来のAI起動用コマンドも合わせるともっと早くなる…と思う
[State ]
type = VarSet
triggerall=!var(59)||ishelper
trigger1 =command="a_AI"^command="a"
trigger2 =command="b_AI"^command="b"
trigger3 =command="c_AI"^command="c"
trigger4 =command="x_AI"^command="x"
trigger5 =command="y_AI"^command="y"
trigger6 =command="z_AI"^command="z"
trigger7 =command="s_AI"^command="start"
trigger8 =command="F_AI"^command="F_ai"
trigger9 =command="DFAI"^command="DFai"
trigger10=command="D_AI"^command="D_ai"
trigger11=command="DBAI"^command="DBai"
trigger12=command="B_AI"^command="B_ai"
trigger13=command="UBAI"^command="UBai"
trigger14=command="U_AI"^command="U_ai"
trigger15=command="UFAI"^command="UFai"
trigger16=ishelper &command="AI"
var(59) = 1

;ヘルパー暴走防止
;AIセットの直下が望ましい
[State ]
type=changestate
trigger1= ishelper(20000)
value=20000
ctrl=1

[State ];-3に置いてもいい
type = VarSet
triggerall = !var(59)
Trigger1 = !IsHelper
Trigger1 = NumHelper(20000)
Trigger1 = Helper(20000),var(59)>0
var(59) = 1

;AI起動補助ヘルパー
[State ];-3に置いてもいい
Type = Helper
Triggerall=!IsHelper
triggerall=!NumHelper(20000)
triggerall=alive;一応
triggerall=var(59)=0
triggerall=command!="AI"
Trigger1=(PrevStateNo=[190,193])||PrevStateNo=5900;キャラに合わせて適当に
Trigger1=stateno=0
Trigger2=stateno=5900
StateNo = 20000
ID = 20000
Name = "AI_SWITCH"
keyCtrl = 1
pausemovetime=2147483647
supermovetime=2147483647


;ヘルパー用ステート
[Statedef 20000]
movetype=a;できるだけ早く
Anim = 9999;判定の一切ないものが望ましい
Ctrl = 1

[State ];間違いで来たら戻す
type=selfstate
trigger1=!ishelper||name!="■"
value=52

[State ];無敵
type = hitby
trigger1 = 1
value =
value2=

[State ];攻撃範囲をなくす
Type = AttackDist
Trigger1 = 1
Value = 0

[State ];画面外へ
type = BindToroot
trigger1 = 1
pos = -9999,-9999

[State ];プレイヤー判定
type=varset
trigger1 =command="a_AI"&command="a"
trigger2 =command="b_AI"&command="b"
trigger3 =command="c_AI"&command="c"
trigger4 =command="x_AI"&command="x"
trigger5 =command="y_AI"&command="y"
trigger6 =command="z_AI"&command="z"
trigger7 =command="s_AI"&command="start"
trigger8 =command="F_AI"&command="F_ai"
trigger9 =command="DFAI"&command="DFai"
trigger10=command="D_AI"&command="D_ai"
trigger11=command="DBAI"&command="DBai"
trigger12=command="B_AI"&command="B_ai"
trigger13=command="UBAI"&command="UBai"
trigger14=command="U_AI"&command="U_ai"
trigger15=command="UFAI"&command="UFai"
var(59)=-1

[State ];フラグが立ったら消す
Type = DestroySelf
Trigger1 = root,var(59)||var(59)=-1


本当はAI補助ヘルパーを消す必要はないのですが、
ヘルパーHitdefのgetpower・givepowerのバグ対策をしていないキャラのことも考えて、
プレイヤー判定が出たら即消しています。
スポンサーサイト

コメントの投稿

非公開コメント

プロフィール

BK

Author:BK
モノアイ大好きな夜行性人間。
キャラ等のダウンロードはこちら

リンクフリーです。


最近はツイッターに生息中

FC2カウンター
最新記事
最新コメント
最新トラックバック
月別アーカイブ
カテゴリ
検索フォーム
RSSリンクの表示
リンク
ブロとも申請フォーム

この人とブロともになる

QRコード
QRコード
twitter
仁王立ちだZE★霧雨魔理沙
上記広告は1ヶ月以上更新のないブログに表示されています。新しい記事を書くことで広告を消せます。