| 赞 | 0  | 
 
| VIP | 13 | 
 
| 好人卡 | 7 | 
 
| 积分 | 7 | 
 
| 经验 | 32831 | 
 
| 最后登录 | 2023-12-15 | 
 
| 在线时间 | 530 小时 | 
 
 
 
 
 
Lv2.观梦者 
	- 梦石
 - 0 
 
        - 星屑
 - 723 
 
        - 在线时间
 - 530 小时
 
        - 注册时间
 - 2010-6-9
 
        - 帖子
 - 840
 
 
 
 | 
	
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员  
 
x
 
@troop=$data_troops[1].id 
这个是获取队伍为1的ID,就是1,完全没意义。如何让他实现自动获取呢?不知道怎么设这个变量。 
另外: 
战斗结束处理         
def on_battle_end 
                @result.clear 
                $add_ysyz.text 
                remove_battle_states 
                remove_all_buffs 
                clear_actions 
                clear_tp unless preserve_tp? 
                appear 
        end 
我把那段处理好的代码放到这个里边,结束时会执行三次,怎么说?求解 
代码#-------------------------------------------------------------------------- # ●Scene_YSYZ #-------------------------------------------------------------------------- class Scene_YSYZ < Game_Troop         #--------------------------------------------------------------------------         # ● 常量         #--------------------------------------------------------------------------         #--------------------------------------------------------------------------         # ● 全局变量         #--------------------------------------------------------------------------         #--------------------------------------------------------------------------         # ●          #--------------------------------------------------------------------------         def initialize                 #~                                 地                        水                        炎                        风                        光                        暗                        神                        混沌                 #~                                 0                         1                                2                         3                         4                         5                                 6                         7                          @ysyz_a=[000,        100,                200,                300,                400,                500,                600,                700]         end         #--------------------------------------------------------------------------         #         #--------------------------------------------------------------------------         def check_troop_id                 @troop=$data_troops[1].id                 case @troop                 when 1                         @ysyz_a=[100,        100,                100,                100,                100,         100,                100,                100]                                         when 2                         @ysyz_a=[000,        000,                000,                000,                000,                000,                000,                000]                 else                         @ysyz_a=[000,        000,                000,                000,                000,                 000,                000,                000]                 end         end         #--------------------------------------------------------------------------         #          #--------------------------------------------------------------------------         def text_list                 $game_message.add(" \\>\\I[100]:\\V[162] \\I[99]:\\V[163] \\I[96]:\\V[164] \\I[101]:\\V[165]  \\>\\I[102]:\\V[166] \\I[103]:\\V[167] \\I[403]:\\V[168] \\I[406]:\\V[169] ")         end         #--------------------------------------------------------------------------         # ● 显示获取         #--------------------------------------------------------------------------         def text                 check_troop_id                 $game_message.add(" \\>\\I[100]+#{@ysyz_a[0]} \\I[99]+#{@ysyz_a[1]} \\I[96]+#{@ysyz_a[2]} \\I[101]+#{@ysyz_a[3]}  \\>\\I[102]+#{@ysyz_a[4]} \\I[103]+#{@ysyz_a[5]} \\I[403]+#{@ysyz_a[6]} \\I[406]+#{@ysyz_a[7]} ")                 $game_variables[162]+=@ysyz_a[0]                 $game_variables[163]+=@ysyz_a[1]                 $game_variables[164]+=@ysyz_a[2]                 $game_variables[165]+=@ysyz_a[3]                 $game_variables[166]+=@ysyz_a[4]                 $game_variables[167]+=@ysyz_a[5]                 $game_variables[168]+=@ysyz_a[6]                 $game_variables[169]+=@ysyz_a[7]         end end 
 
 #--------------------------------------------------------------------------  
# ●Scene_YSYZ  
#--------------------------------------------------------------------------  
class Scene_YSYZ < Game_Troop  
        #--------------------------------------------------------------------------  
        # ● 常量  
        #--------------------------------------------------------------------------  
        #--------------------------------------------------------------------------  
        # ● 全局变量  
        #--------------------------------------------------------------------------  
        #--------------------------------------------------------------------------  
        # ●   
        #--------------------------------------------------------------------------  
        def initialize  
                #~                                 地                        水                        炎                        风                        光                        暗                        神                        混沌  
                #~                                 0                         1                                2                         3                         4                         5                                 6                         7           
                @ysyz_a=[000,        100,                200,                300,                400,                500,                600,                700]  
        end  
        #--------------------------------------------------------------------------  
        #  
        #--------------------------------------------------------------------------  
        def check_troop_id  
                @troop=$data_troops[1].id  
                case @troop  
                when 1  
                        @ysyz_a=[100,        100,                100,                100,                100,         100,                100,                100]                          
                when 2  
                        @ysyz_a=[000,        000,                000,                000,                000,                000,                000,                000]  
                else  
                        @ysyz_a=[000,        000,                000,                000,                000,                 000,                000,                000]  
                end  
        end  
        #--------------------------------------------------------------------------  
        #   
        #--------------------------------------------------------------------------  
        def text_list  
                $game_message.add("  
\\>\\I[100]:\\V[162] \\I[99]:\\V[163] \\I[96]:\\V[164] \\I[101]:\\V[165]   
\\>\\I[102]:\\V[166] \\I[103]:\\V[167] \\I[403]:\\V[168] \\I[406]:\\V[169] ")  
        end  
        #--------------------------------------------------------------------------  
        # ● 显示获取  
        #--------------------------------------------------------------------------  
        def text  
                check_troop_id  
                $game_message.add("  
\\>\\I[100]+#{@ysyz_a[0]} \\I[99]+#{@ysyz_a[1]} \\I[96]+#{@ysyz_a[2]} \\I[101]+#{@ysyz_a[3]}   
\\>\\I[102]+#{@ysyz_a[4]} \\I[103]+#{@ysyz_a[5]} \\I[403]+#{@ysyz_a[6]} \\I[406]+#{@ysyz_a[7]} ")  
                $game_variables[162]+=@ysyz_a[0]  
                $game_variables[163]+=@ysyz_a[1]  
                $game_variables[164]+=@ysyz_a[2]  
                $game_variables[165]+=@ysyz_a[3]  
                $game_variables[166]+=@ysyz_a[4]  
                $game_variables[167]+=@ysyz_a[5]  
                $game_variables[168]+=@ysyz_a[6]  
                $game_variables[169]+=@ysyz_a[7]  
        end  
end  
 
  |   
 
 
 
 |