Project1

标题: 【已解决】关于数组的内容判断 [打印本页]

作者: 金芒芒    时间: 2023-4-6 08:36
标题: 【已解决】关于数组的内容判断
本帖最后由 金芒芒 于 2023-4-6 13:33 编辑

@all_fighters = [1,2,3,4,5,6,7]
if $game_switches[19] == true#(No)
@all_fighters = [1,2,3,4,5,6,7]中2== true#(真)
否则
@all_fighters = [1,2,3,4,5,6,7]中2 则为false#(假)
end
if $game_switches[18] == true#(No)
@all_fighters = [1,2,3,4,5,6,7]中3== true#(真)
否则
@all_fighters = [1,2,3,4,5,6,7]中==3 则为false#(假)
end

F1里找到这个 我不会脚本请帮忙改写下成上面的内容
a = ["艾力克斯","布莱恩","卡罗来"]

p a.include?("布莱恩")            # => true
p a.include?("小田纯一狼")        # => false

-------------------------------------------------【已解决】
RUBY 代码复制
  1. @all_fighters = [1]
  2. if $game_switches[19] == true#(开关 开)
  3. @all_fighters.push(2)  
  4. end


------------------------------------------------【数组 数减少】
RUBY 代码复制
  1. @all_fighters = [12]
  2. if $game_switches[19] == false#(开关关)
  3. @all_fighters.datele(2)
  4. end









欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1