【发布时间】:2013-03-31 14:20:24
【问题描述】:
我正在尝试使用 if 语句转到 Director 游戏项目中的两个不同帧,但即使我已经为一组转到第 32 帧,为另一组转到第 31 帧,它们都转到相同的第 31 帧。我究竟做错了什么?我想不通。 (请参见此处的代码示例:)
--
on timeOut
if the timer >= 360 and sprite(16).visible = 1 then
member ("tellIt").text = "TIME UP"
_movie.go(32)
end if
if the timer >= 360 and sprite(15).visible = 1 then
member ("tellIt").text = "TIME UP"
_movie.go(32)
end if
if the timer >= 360 and sprite(14).visible = 1 then
member ("tellIt").text = "TIME UP"
_movie.go(32)
end if
if the timer >= 360 and sprite(13).visible = 1 then
member ("tellIt").text = "TIME UP"
_movie.go(32
end if
if the timer > 350 and sprite(16).visible = 0 then
_movie.go(31)
member ("endIt").text = "LUNCH IS FOR THE BIRDS"
member ("tellIt").text = "TIME FLIES"
end if
if the timer > 350 and sprite(15).visible = 0 then
_movie.go(31)
member ("endIt").text = "LUNCH IS FOR THE BIRDS"
member ("tellIt").text = "TIME FLIES"
end if
if the timer > 350 and sprite(14).visible = 0 then
_movie.go(31)
member ("endIt").text = "LUNCH IS FOR THE BIRDS"
member ("tellIt").text = "TIME FLIES"
end if
if the timer > 350 and sprite(13).visible = 0 then
_movie.go(31)
member ("endIt").text = "LUNCH IS FOR THE BIRDS"
member ("tellIt").text = "TIME FLIES"
end if
if the timer > 350 and sprite(12).visible = 0 then
_movie.go(31)
member ("endIt").text = "LUNCH IS FOR THE BIRDS"
member ("tellIt").text = "TIME FLIES"
end if
--
这段代码写在电影剧本上。
我真的希望你能引导我朝着正确的方向前进,因为我不知道为什么它没有进入我要求的框架。游戏中的其他一切似乎都运行良好。
【问题讨论】:
-
您不想使用 else 语句吗?
标签: if-statement statements lingo adobe-director