Project1

标题: 这段显示物品名字的脚本为什么不能显示完整名字 [打印本页]

作者: yang1zhi    时间: 2016-2-6 01:22
标题: 这段显示物品名字的脚本为什么不能显示完整名字
RUBY 代码复制
  1. if $mog_rgss_xas_action_name != nil
  2.           if damage_item == nil  
  3.            $game_temp.if_text = "Get  " +  value.to_s +  "   x   " + item_name[@parameters[0]].name
  4.            $game_temp.if_text_time = 40 * MOG::IFA_TIME
  5.            $game_temp.if_start = true     
  6.           elsif gold_effect != nil
  7.            $game_temp.if_text = "Get  " +  gold_effect.to_s + " " +$data_system.words.gold   
  8.            $game_temp.if_text_time = 40 * MOG::IFA_TIME
  9.            $game_temp.if_start = true               
  10.           end


物品名字叫“史莱姆之蛋”

应该要显示  Get  1  x   史莱姆之蛋
可是实际却是    Get  1  x   史莱
作者: 夜狠简单    时间: 2016-2-6 12:06
$game_temp.if_text = "Get  " +  value.to_s +  "   x   " + item_name[@parameters[0]].name
p  item_name[@parameters[0]].name, item_name#显示什么?
作者: yang1zhi    时间: 2016-2-6 12:30
本帖最后由 yang1zhi 于 2016-2-6 21:08 编辑
夜狠简单 发表于 2016-2-6 12:06
$game_temp.if_text = "Get  " +  value.to_s +  "   x   " + item_name[@parameters[0]].name
p  item_na ...


设置宽度的应该是这里
RUBY 代码复制
  1. @viewport = Viewport.new(0, 0, 640, 480)

RUBY 代码复制
  1. @text = Sprite.new
  2.      @text.bitmap = Bitmap.new(120,40)

RUBY 代码复制
  1. @text.bitmap.font.color.set(250, 250, 250,220)
  2.      @text.bitmap.draw_hemming_text(0, 0, 120, 40, $game_temp.if_text.to_s,1)

可是修改后没作用

1.png (111.67 KB, 下载次数: 6)

1.png





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