我尝试使用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
--
这段代码是写在电影脚本上的。
我真的希望你能引导我在正确的方向,因为我不知道为什么它不去框架我要求它。
你的方法是,不管第一个检查有多少为真,如果后面的任何一个检查为真,那么你将在第31帧结束。
如果你在每个If语句中都放一个'exit',那将确保后面的检查不会完成。如:
if the timer >= 360 and sprite(16).visible = 1 then
member ("tellIt").text = "TIME UP"
_movie.go(32)
exit
end if