查看: 1688|回复: 1

[有事请教] [已解决]脚本只能显示5张图片,不能显示10张图片

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

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

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

×
本帖最后由 金芒芒 于 2023-8-18 07:58 编辑

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

[pre lang="ruby"]#------我方头像-----------------------------------------------------------------
    t= Marshal::load(Marshal.dump(team_selected_troops))

    a=t.flatten
    x=457
    for i in 0...a.size
    $game_screen.pictures[i+1].show("头像#{a}", 0,x, 550, 100, 100, 255, 0)
    x-=87
    end
#-------敌人头像---------------------------------------------------------------
#   if $game_switches[18] == true
    e = Marshal::load(Marshal.dump(enermy_selected_troops))
    b=e.flatten
    x=544
    for j in 0...b.size
    $game_screen.pictures[j+1].show("头像#{b[j]}", 0,x, 550, 100, 100, 255, 0)
    x+=87
    end[/pre]
梦石
0
星屑
7296
在线时间
1244 小时
注册时间
2015-8-15
回帖
473
 楼主| 发表于 2023-8-18 07:35:37 | 显示全部楼层
本帖最后由 金芒芒 于 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
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部