查看: 1469|回复: 2

[有事请教] 想要5个队伍第一个队伍第一个角色

[复制链接]
梦石
0
星屑
7296
在线时间
1244 小时
注册时间
2015-8-15
回帖
473
发表于 2023-7-7 09:04:26 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 金芒芒 于 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

梦石
0
星屑
39236
在线时间
11155 小时
注册时间
2009-3-15
回帖
4768
发表于 2023-7-7 10:47:52 | 显示全部楼层
$scene.team_groups [@character.group-1][0]
回复

使用道具 举报

梦石
0
星屑
7296
在线时间
1244 小时
注册时间
2015-8-15
回帖
473
 楼主| 发表于 2023-7-7 11:01:26 | 显示全部楼层
soulsaga 发表于 2023-7-7 10:47
$scene.team_groups [@character.group-1][0]


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

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部