Project1

标题: 想要5个队伍第一个队伍第一个角色 [打印本页]

作者: 金芒芒    时间: 2023-7-7 09:04
标题: 想要5个队伍第一个队伍第一个角色
本帖最后由 金芒芒 于 2023-7-7 09:56 编辑

显示角色=$scene.group_lisenter.include?(@character.group)

场景团队[@角色.小队-1]    意识是在场景里的团队(5个)中角色是小队中-1
角色=$scene.team_groups [@character.group-1]

现在team_groups=5个group在里面 也就是说5个小队每个小队-1是角色

而我现在只要场景中team_groups里的第一个小队的角色(小队-1是角色)@group_lisenter = [1]


if ! Kboard.keyb($R_Key_CTLR)
         if Kboard.keyboard($R_Key_1)
           
           #Notification.post("第1队!听我的命令!")
          @group_lisenter = [1] #group 1
          display_selected_groups
        elsif Kboard.keyboard($R_Key_2)
         
          @group_lisenter = [2] #group 2
           display_selected_groups
           #Notification.post("第2队!听我的命令!")
          elsif Kboard.keyboard($R_Key_3)
            
           @group_lisenter = [3] #group 3
           display_selected_groups
              #Notification.post("第3队!听我的命令!")
          elsif Kboard.keyboard($R_Key_4)
            
           @group_lisenter = [4] #group 4
           display_selected_groups
               #Notification.post("第4队!听我的命令!")
          elsif Kboard.keyboard($R_Key_5)

           @group_lisenter = [5] #group 5
           display_selected_groups
              #Notification.post("第5队!听我的命令!")
          elsif Kboard.keyboard($R_Key_0)
      
            @group_lisenter = [1,2,3,4,5] #group All
            # display_selected_groups
            Notification.post("所有人!听我的命令!")
          end

if Kboard.keyboard($R_Key_1)
          # Notification.post("第1队!听我的命令!")
         # @分组lisenter。按下1,除非@group lisenter。包括(1)
          @group_lisenter.push 1 unless @group_lisenter.include?(1) #group 1
          display_selected_groups


作者: soulsaga    时间: 2023-7-7 10:47
$scene.team_groups [@character.group-1][0]
作者: 金芒芒    时间: 2023-7-7 11:01
soulsaga 发表于 2023-7-7 10:47
$scene.team_groups [@character.group-1][0]


$scene.group_lisenter.include?(@character.group)
@group_lisenter = [1]
这两句这么合并啊





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