Project1

标题: [已解决]脚本只能显示5张图片,不能显示10张图片 [打印本页]

作者: 金芒芒    时间: 2023-8-17 11:44
标题: [已解决]脚本只能显示5张图片,不能显示10张图片
本帖最后由 金芒芒 于 2023-8-18 07:58 编辑

是不是要改“头像”这两个字

RUBY 代码复制
  1. #------我方头像-----------------------------------------------------------------
  2.     t= Marshal::load(Marshal.dump(team_selected_troops))
  3.  
  4.     a=t.flatten
  5.     x=457
  6.     for i in 0...a.size
  7.     $game_screen.pictures[i+1].show("头像#{a[i]}", 0,x, 550, 100, 100, 255, 0)
  8.     x-=87
  9.     end
  10. #-------敌人头像---------------------------------------------------------------
  11. #   if $game_switches[18] == true
  12.     e = Marshal::load(Marshal.dump(enermy_selected_troops))
  13.     b=e.flatten
  14.     x=544
  15.     for j in 0...b.size
  16.     $game_screen.pictures[j+1].show("头像#{b[j]}", 0,x, 550, 100, 100, 255, 0)
  17.     x+=87
  18.     end

作者: 金芒芒    时间: 2023-8-18 07:35
本帖最后由 金芒芒 于 2023-8-18 07:59 编辑

原来是重复使用了pictures编号
  1. #--------------------------------------------------------------------------------
  2.     t= Marshal::load(Marshal.dump(team_selected_troops))

  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
复制代码

10图.png (304.13 KB, 下载次数: 5)

10图.png





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