任意のパーティーメンバーと別れたあと、リストから削除したい。(質問掲示板)
投稿:
ミカエル
投稿:2017/01/29 14:12:29(最新:2017/01/29 14:12:29)
ミカエル
投稿:2017/01/29 14:12:29(最新:2017/01/29 14:12:29)
★2DRPGでゲームを作成中なのですが、
どうしてもわからないところがあるので質問させていただきます。
葵さんの辞書のスクリプトを少し応用させていただきました。
・パーティーメンバー追加。〇
・パーティーリストに表示。〇
・パーティーメンバー削除。〇
っとここまではよかったのですが、
・パーティーリスト(会話、辞書の選択肢)から削除。×
これができなくて困ってます。
メンバーと別れたのはいいのですが、
話しかけた人のリストの中にまだ名前が残っている状態です。
ちょっと説明がわかりづらくて申し訳ないのですが、
わかる方いらっしゃいましたらアドバイスをお願いします。
ツイート
どうしてもわからないところがあるので質問させていただきます。
葵さんの辞書のスクリプトを少し応用させていただきました。
・パーティーメンバー追加。〇
・パーティーリストに表示。〇
・パーティーメンバー削除。〇
っとここまではよかったのですが、
・パーティーリスト(会話、辞書の選択肢)から削除。×
これができなくて困ってます。
メンバーと別れたのはいいのですが、
話しかけた人のリストの中にまだ名前が残っている状態です。
ちょっと説明がわかりづらくて申し訳ないのですが、
わかる方いらっしゃいましたらアドバイスをお願いします。
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
# 開始スクリプトに記述する
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
setVariable("dicListFlg",createArray())
setVariable("dicListNam",createArray())
setVariable("dicListMsg",createArray())
setVariable("dicListImage",createArray())
setVariable("dicListPtm",createArray())
#--------- パーティー設定 ----------
#仲間に入れてない人を?で表示するかどうか
setFlag("dicQestion",false)
#パーティーデータ
getVariable("dicListNam")[0] = "ミカエル"
getVariable("dicListMsg")[0] = "「また会おう。」"
getVariable("dicListImage")[0] = 317720
getVariable("dicListPtm")[0] = 35039
getVariable("dicListNam")[1] = "ガブリエル"
getVariable("dicListMsg")[1] = "「さようなら。」"
getVariable("dicListImage")[1] = 317736
getVariable("dicListPtm")[1] = 35040
getVariable("dicListNam")[2] = "剣芽優"
getVariable("dicListMsg")[2] = ""
getVariable("dicListImage")[2] = 317757
getVariable("dicListPtm")[2] = 35041
getVariable("dicListNam")[3] = "レイク"
getVariable("dicListMsg")[3] = ""
getVariable("dicListImage")[3] = 317764
getVariable("dicListPtm")[3] = 35042
getVariable("dicListNam")[4] = "みとり"
getVariable("dicListMsg")[4] = ""
getVariable("dicListImage")[4] = 317771
getVariable("dicListPtm")[4] = 35043
getVariable("dicListNam")[5] = "シンデレラ"
getVariable("dicListMsg")[5] = ""
getVariable("dicListImage")[5] = 317796
getVariable("dicListPtm")[5] = 35044
getVariable("dicListNam")[6] = "アリス"
getVariable("dicListMsg")[6] = ""
getVariable("dicListImage")[6] = 317803
getVariable("dicListPtm")[6] = 35045
getVariable("dicListNam")[7] = "エバ"
getVariable("dicListMsg")[7] = ""
getVariable("dicListImage")[7] = 317810
getVariable("dicListPtm")[7] = 35046
getVariable("dicListNam")[8] = "バフォメット"
getVariable("dicListMsg")[8] = ""
getVariable("dicListImage")[8] =
getVariable("dicListPtm")[8] =
#--------- ここまで ----------
#----- 配列検索 -----
def indexOfArray(ar, n, m)
l = getArrayLength(ar)
i = 0; r = -1
if m
i = m
end
while i < l
if ar[i] == n
r = i; i = l
end
i = i + 1
end
return r
end
#----- パーティー表示 -----
def viewDictionary(str)
str_sel = createArray()
no_sel = createArray()
i = 0; ilen = getArrayLength(getVariable("dicListNam")); c = 0
while i < ilen
if getFlag("dicQestion")
if getVariable("dicListFlg")[i]
str_sel[c] = getVariable("dicListNam")[i]
no_sel[c] = i
else
str_sel[c] = "???"
no_sel[c] = (-1)
end
c = c + 1
else
if getVariable("dicListFlg")[i]
str_sel[c] = getVariable("dicListNam")[i]
no_sel[c] = i
c = c + 1
end
end
i = i + 1
end
str_sel[c] = "やめる"
no_sel[c] = (-2)
sel = (-1); len = getArrayLength(str_sel) - 1
while sel < len
sel = speakWithSelectArray(str_sel,str)
if no_sel[sel] == (-2)
elsif no_sel[sel] == (-1)
speak("そのページはまだ見ることができません。")
else
fadeOut(255, 255, 255)
showImage(getVariable("dicListImage")[no_sel[sel]] )
fadeIn()
click_wait()#クリック待ち。引数なしで単独で起動。
speak(getVariable("dicListNam")[no_sel[sel]] + "\n" + getVariable("dicListMsg")[no_sel[sel]])
hideImage()
removePartyMember(getVariable("dicListPtm")[no_sel[sel]])#パーティーメンバー削除
end
end
end
#----- パーティー開放 -----
def setDictionary(str)
no = indexOfArray(getVariable("dicListNam"),str)
if no > (-1)
getVariable("dicListFlg")[no] = true
end
end
#--------- ここまで ----------
コメントする
コメントするには、ログインする必要があります。
コメント一覧
コメントはありません。