Project1
标题:
为什么是OFF不是ON
[打印本页]
作者:
Green-Grox
时间:
2015-1-19 22:30
标题:
为什么是OFF不是ON
class From_moment
def at_the_moment
m_abcdef = $moment.values
m_a = m_abcdef[0]
m_b = m_abcdef[1]
m_c = m_abcdef[2]
m_d = m_abcdef[3]
m_e = m_abcdef[4]
m_a2 = 1 if m_a == 1
m_b2 = 2 if m_b == 2
m_c2 = 3 if m_c == 3
m_d2 = 4 if m_d == 4
moment_2 = [0,0,0,0]
moment_2[0] = 1 if m_a2 == 1
moment_2[1] = 2 if m_b2 == 2
moment_2[2] = 3 if m_c2 == 3
moment_2[3] = 4 if m_d2 == 4
m_a3 = moment_2.include?(1)
m_b3 = moment_2.include?(2)
m_c3 = moment_2.include?(3)
m_d3 = moment_2.include?(4)
moment_3 = 0
moment_3 += 1 if m_a3 == true
moment_3 += 1 if m_b3 == true
moment_3 += 1 if m_c3 == true
if m_e == true
moment_3 += 1 if m_d3 == true
elsif m_e == false
moment_3 += 1
end
$game_switches[40] = true if moment_3 == 4
$game_switches[40] = false if moment_3 != 4
end
end
复制代码
然后在事件的脚本中,输入这个使用:
$moment =
{""=>1,""=>2,""=>3,""=>4,""=>true}
aaa_a = From_moment.new
aaa_a.at_the_moment
按我的思路第40个开关应该是ON啊……怎么是OFF
作者:
喵呜喵5
时间:
2015-1-19 22:45
$moment = [1,2,3,4,true]
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1