RPGでキー操作移動(質問掲示板)
投稿:
闇さん
投稿:2012/10/22 17:31:22(最新:2012/10/23 23:36:23)
キーの←→でキャラクターの向きを変えるスクリプトが
エラー文無しで動きません
ツイート
エラー文無しで動きません
a=0
b=0
startInput()
while b<10
while a==0
if hasInput()
if isKeyDown("LEFT")
case getEventDirection("操作キャラクター")
when getUpDirection()
s=getRightDirection()
when getLeftDirection()
s=getDownDirection()
when getRightDirection()
s=getLeftDirection()
when getDownDirection()
s=getUpDirection()
end
a=1
elsif isKeyDown("RIGHT")
case getEventDirection("操作キャラクター")
when getUpDirection()
s=getLeftDirection()
when getLeftDirection()
s=getDownDirection()
when getRightDirection()
s=getRightDirection()
when getDownDirection()
s=getUpDirection()
end
a=1
end
end
end
setEventDirection("操作キャラクター",s)
b=b+1
end
コメントする
コメントするには、ログインする必要があります。
それと、スペースを入れると見やすくなります。
するとend間違いが減るという利点もあります。
どう言うことですか?
・スクリプト/つくってみよう2-0
それから、endにはコメントで何を閉じているのか必ず書く、てのを実行しましょー(何度目だ)
endに説明つけるの忘れていました
すみません