设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 453|回复: 0
打印 上一主题 下一主题

[有事请教] 这段脚本场景转换图片就消失剩一两张(共10张)

[复制链接]

Lv4.逐梦者

梦石
0
星屑
6296
在线时间
1104 小时
注册时间
2015-8-15
帖子
658
跳转到指定楼层
1
发表于 2023-8-18 08:37:18 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 金芒芒 于 2023-8-18 08:40 编辑

第一个是显示脚本部分,第2个是整个脚本
RUBY 代码复制
  1. [pre lang="ruby"]    t= Marshal::load(Marshal.dump(team_selected_troops))
  2.  
  3.     a=t.flatten
  4.     x=457
  5.     for i in 0...a.size
  6.     $game_screen.pictures[i+1].show("头像#{a[i]}", 0,x, 550, 100, 100, 255, 0)
  7.     x-=87
  8.     end
  9. #-----------------------------------------------------------------------------
  10. #   if $game_switches[18] == true
  11.     e = Marshal::load(Marshal.dump(enermy_selected_troops))
  12.     b=e.flatten
  13.     x=544
  14.     for i in 0...b.size
  15.     $game_screen.pictures[6+i+1].show("头像#{b[i]}", 0,x, 550, 100, 100, 255, 0)
  16.     x+=87
  17.   end
[/pre]
RUBY 代码复制
  1. def command_custom_battle#定义命令_自定义战斗
  2.     # 演奏确定 SE
  3.     $game_system.se_play($data_system.decision_se)
  4.      #$游戏系统。se播放($数据系统。未指定文件或目录
  5.  
  6.     choose_map_main#选择主地图
  7. # map_info = $custom_battle_next_map_id#@map_info#地图信息=@地图信息
  8.   #如果选择随机地图随机士兵
  9. # if ! @force_back and map_info[0] == -1#如果!@强制返回并地图信息[0]==-1
  10. #   make_random_efs_game#生成随机efs_game
  11. #   return
  12. # end
  13. #---------------------------------------------------- ↑↓   
  14.     #如果@强制后退或@强制后退==无
  15.     if ! @force_back or @force_back == nil
  16.     #自定义主战场(0,@地图信息[1],@地图信息[2])data_id
  17.     custom_battle_main(0,@map_info[1],@map_info[2])
  18.     #团队选定部队=@选定部队
  19.     team_selected_troops = @selected_units
  20.  
  21.  
  22.     #如果@强制后退或@强制后退==无
  23.     if ! @force_back or @force_back == nil
  24.       #自定义主战场(1,@地图信息[1],@地图信息[2])
  25.       custom_battle_main(1,@map_info[1],@map_info[2])
  26.       #敌人选定部队=@选定部队
  27.       if $game_switches[18] == true
  28.       #true是打开,false是关闭
  29.       #敌军enermy精选部队
  30.  
  31.       enermy_selected_troops =[[17],[18],[19],[21],[16]] #@selected_units
  32.  
  33.  
  34.       # @group_one.x = 928
  35.  
  36.     #  @group_one.y = 544
  37.     #  @group_two.x = 1248
  38.     #  @group_two.y = 640
  39.  
  40.       end
  41.       if $game_switches[19] == true
  42.       enermy_selected_troops =[ [5,5],[5,5,5],[5,5],[5,5,5],[5,5,5,5,5] ]
  43.     end
  44.  
  45.  
  46.       #如果@强制后退或@强制后退==无
  47.       if ! @force_back or @force_back == nil
  48.         choose_hero_main#选择英雄主
  49.         selected_hero = nil
  50.         #selected_hero = @selected_hero#选定的英雄=@选定的英雄
  51.         #如果@强制后退或@强制后退==无
  52.         if ! @force_back or @force_back == nil
  53.  
  54.         team_army = Game_Army_Slg.new(0)
  55.         #enermy军队
  56.         enermy_army = Game_Army_Slg.new(1)
  57.         team_army.create_empty_army
  58.         enermy_army.create_empty_army
  59.         #team_army.load_twoD_Array(team_selected_troops,selected_hero)
  60.         team_army.load_twoD_Array(team_selected_troops,selected_hero)
  61.         enermy_army.load_twoD_Array(enermy_selected_troops)
  62.        # 切换地图画面
  63.  
  64.      #team_army.set_groups_name#团队军队。设置团队名称[@character.group-1]
  65. #--------------------------------------------------------------------------------
  66.     t= Marshal::load(Marshal.dump(team_selected_troops))
  67.  
  68.     a=t.flatten
  69.     x=457
  70.     for i in 0...a.size
  71.     $game_screen.pictures[i+1].show("头像#{a[i]}", 0,x, 550, 100, 100, 255, 0)
  72.     x-=87
  73.     end
  74. #-----------------------------------------------------------------------------
  75. #   if $game_switches[18] == true
  76.     e = Marshal::load(Marshal.dump(enermy_selected_troops))
  77.     b=e.flatten
  78.     x=544
  79.     for i in 0...b.size
  80.     $game_screen.pictures[6+i+1].show("头像#{b[i]}", 0,x, 550, 100, 100, 255, 0)
  81.     x+=87
  82.   end
  83. #  end
  84.         #$自定义战斗下一个战斗者团队=团队军队
  85.         $custom_battle_next_fighter_team = team_army
  86.         #$自定义战斗下一个战斗者敌军=敌军军队
  87.         $custom_battle_next_fighter_enermy = enermy_army
  88.         #$自定义战斗下一个地图ID=16
  89.         $custom_battle_next_map_id = 16#map_info[0]
  90.        #if $game_switches[19] == true
  91.        # a = [1, 2, 3, 5, 8]
  92.        # $custom_battle_next_map_id  = a[rand(a.size)]
  93.        # end
  94.         $game_party.setup_starting_members#游戏部分设置启动成员
  95.  
  96.  
  97.  
  98.     # 设置初期位置的地图##############1356622
  99.        $game_map.setup(30)
  100.     # 主角向初期位置移动
  101.         $game_player.moveto(0, 0)
  102.  
  103.  
  104.     # 刷新主角
  105.         $game_player.refresh
  106.     # 执行地图设置的 BGM 与 BGS 的自动切换
  107.         $game_map.autoplay
  108.  
  109.  
  110.  
  111.  
  112.     # 刷新地图 (执行并行事件)
  113.         $game_map.update
  114.     # 切换地图画面
  115.         $scene = Scene_Map.new
  116.  
  117.          # $scene = Scene_Map.new
  118.           #efs_title_main
  119.  
  120.          else # fourth
  121.         @force_back = false#@强制后退=错误
  122.         Graphics.update #图形更新
  123.         efs_title_update#EFS标题更新
  124.         end   
  125.  
  126.  
  127.       else # third
  128.       @force_back = false#@强制后退=错误
  129.       Graphics.update#图形更新
  130.       efs_title_update#EFS标题更新
  131.       end   
  132.     else # second
  133.     @force_back = false#@强制后退=错误
  134.     Graphics.update#图形更新
  135.     efs_title_update#EFS标题更新
  136.     end
  137.  
  138.    else #1st
  139.      @force_back = false#@强制后退=错误
  140.      Graphics.update#图形更新
  141.      efs_title_update#EFS标题更新
  142.    end
  143.  
  144.   end
  145. end
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-29 20:10

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表