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

Project1

 找回密码
 注册会员
搜索
楼主: 小闵
打印 上一主题 下一主题

戰鬥時候的人物頭像背景?

 关闭 [复制链接]

Lv5.捕梦者

梦石
0
星屑
39973
在线时间
5810 小时
注册时间
2006-11-10
帖子
6683
41
发表于 2008-7-21 05:45:56 | 只看该作者
- -工程发上来.....
回复 支持 反对

使用道具 举报

Lv1.梦旅人

仙剑奇侠

梦石
0
星屑
50
在线时间
33 小时
注册时间
2008-4-2
帖子
622
42
 楼主| 发表于 2008-7-21 05:49:46 | 只看该作者
···閣下指的是指將我這個未完成的文件傳上來?{/fd}
不如這樣,有人弄了個6R的XP群,你+這個QQ群:57592541,然後我傳給你,如何?

回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
39973
在线时间
5810 小时
注册时间
2006-11-10
帖子
6683
43
发表于 2008-7-21 05:52:29 | 只看该作者
我不想加群,QQ也不常用,你还是用论坛附件上传工程吧,不想公开工程的话,就用论坛短信告诉我地址就行了~~
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

仙剑奇侠

梦石
0
星屑
50
在线时间
33 小时
注册时间
2008-4-2
帖子
622
44
 楼主| 发表于 2008-7-21 06:07:47 | 只看该作者
文件太大,超過5000K,發不到上來{/fd}

回复 支持 反对

使用道具 举报

Lv1.梦旅人

今、空を見上げ

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-8-11
帖子
2022
45
发表于 2008-7-21 06:26:31 | 只看该作者
怎么....怎么会那么麻烦呢..

其实那个功能 很简单的呀..

我都没改脚本呢..

我看看我的那个坑用了什么脚本..

  1. # ————————————————————————————————————
  2. # 本脚本来自www.66rpg.com,转载请保留此信息
  3. # ————————————————————————————————————

  4. # ▼▲▼ XRXS_BP 7. バトルステータス?クリアデザイン ver.1.03 ▼▲▼
  5. # by 桜雅 在土

  6. #==============================================================================
  7. # ■ Window_BattleStatus
  8. #==============================================================================
  9. class Window_BattleStatus < Window_Base
  10.   #--------------------------------------------------------------------------
  11.   # ● 公開インスタンス変数
  12.   #--------------------------------------------------------------------------
  13.   attr_accessor :update_cp_only # CPメーターのみの更新
  14.   #--------------------------------------------------------------------------
  15.   # ● オブジェクト初期化
  16.   #--------------------------------------------------------------------------
  17.   alias xrxs_bp7_initialize initialize
  18.   def initialize
  19.     # 初期化
  20.     @previous_hp = []
  21.     @previous_sp = []
  22.     # 呼び戻す
  23.     xrxs_bp7_initialize
  24.     # ↓Full-Viewの場合は下二行の # を消してください。
  25.     self.opacity = 160
  26.     self.back_opacity = 160  
  27.    
  28. =begin   
  29.    @hp = []
  30.    for j in 0...$game_party.actors.size
  31.      @hp[j] = $game_party.actors[j].hp
  32.    end
  33.    @refresh_flag = true
  34.    refresh
  35. =end   
  36.    
  37.    
  38.   end
  39. #★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  40.   def draw_battler_graphic(actor, x, y)
  41.     battler=RPG::Cache.battler(actor.battler_name, actor.battler_hue)
  42.     w = battler.width
  43.     h = battler.height
  44.     self.contents.blt(x-w/2, y-h, battler, Rect.new(0, 0, w,h),255)
  45.     self.z = 20
  46.   end
  47. #★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

  48.   #--------------------------------------------------------------------------
  49.   # ● リフレッシュ
  50.   #--------------------------------------------------------------------------
  51.   alias xrxs_bp7_refresh refresh
  52.   def refresh
  53.     # CPメーターの更新のみ の場合
  54.     if @update_cp_only
  55.       xrxs_bp7_refresh
  56.       return
  57.     end
  58.     # 変更するものがない場合、飛ばす
  59.     @item_max = $game_party.actors.size
  60.     bool = false
  61.     for i in 0...@item_max
  62.       actor = $game_party.actors[i]
  63.       if (@previous_hp[i] != actor.hp) or (@previous_sp[i] != actor.sp)
  64.         bool = true
  65.       end
  66.     end
  67.     return if bool == false
  68.     # 描写を開始
  69.     self.contents.clear
  70.     for i in 0...@item_max
  71.       actor = $game_party.actors[i]
  72.       actor_x = i * 160 + 21
  73.       # 歩行キャラグラフィックの描写
  74.       draw_battler_graphic(actor, actor_x + 43, 80)
  75.       # HP/SPメーターの描写
  76.       
  77.       
  78.       draw_actor_hp_meter_line(actor, actor_x - 17, 82, 120, 10)
  79.       
  80.       
  81.       draw_actor_sp_meter_line(actor, actor_x - 17, 98, 120, 10)
  82.       # HP数値の描写
  83.       self.contents.font.size = 18 # HP/SP数値の文字の大きさ
  84.       self.contents.font.color = Color.new(0,0,0,192)
  85.       self.contents.draw_text(actor_x, 72, 96, 24, actor.hp.to_s, 2)
  86.       self.contents.font.color = actor.hp == 0 ? knockout_color :
  87.       actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  88.       self.contents.draw_text(actor_x-2, 70, 96, 24, actor.hp.to_s, 2)
  89.       # SP数値の描写
  90.       self.contents.font.color = Color.new(0,0,0,192)
  91.       self.contents.draw_text(actor_x, 88, 96, 24, actor.sp.to_s, 2)
  92.       self.contents.font.color = actor.sp == 0 ? knockout_color :
  93.       actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  94.       self.contents.draw_text(actor_x-2, 86, 96, 24, actor.sp.to_s, 2)
  95.       # 用語「HP」と用語「SP」の描写
  96.       self.contents.font.size = 18 # 用語「HP/SP」の文字の大きさ
  97.       self.contents.font.color = Color.new(0,0,0,192)
  98.       self.contents.draw_text(actor_x - 7, 74, 196, 24, $data_system.words.hp)
  99.       self.contents.draw_text(actor_x - 7, 90, 196, 24, $data_system.words.sp)
  100.       self.contents.font.color = system_color # 用語「HP/SP」の文字の色
  101.       self.contents.draw_text(actor_x - 7, 72, 196, 24, $data_system.words.hp)
  102.       self.contents.draw_text(actor_x - 7, 88, 196, 24, $data_system.words.sp)
  103.       # ステートの描写
  104.       draw_actor_state(actor, actor_x-20, 103) #X- 55
  105.       # 描画角色姓名
  106.       #draw_actor_name(actor, actor_x-17, 103)
  107.       # 値を更新
  108.       @previous_hp[i] = actor.hp
  109.       @previous_sp[i] = actor.sp
  110.     end
  111.   end
  112. end
  113. #==============================================================================
  114. # ■ Window_Base
  115. #==============================================================================
  116. class Window_Base < Window
  117.   #--------------------------------------------------------------------------
  118.   # ● HPメーター の描画
  119.   #--------------------------------------------------------------------------
  120.   def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
  121.     w = width * actor.hp / actor.maxhp
  122.     hp_color_1 = Color.new(255, 0, 0, 192)
  123.     hp_color_2 = Color.new(255, 255, 0, 192)
  124.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  125.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  126.     x -= 1
  127.     y += (height/4).floor
  128.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  129.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  130.     x -= 1
  131.     y += (height/4).ceil
  132.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  133.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  134.     x -= 1
  135.     y += (height/4).ceil
  136.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  137.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  138.   end
  139.   #--------------------------------------------------------------------------
  140.   # ● SPメーター の描画
  141.   #--------------------------------------------------------------------------
  142.   def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
  143.     w = width * actor.sp / actor.maxsp
  144.     hp_color_1 = Color.new( 0, 0, 255, 192)
  145.     hp_color_2 = Color.new( 0, 255, 255, 192)
  146.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  147.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  148.     x -= 1
  149.     y += (height/4).floor
  150.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  151.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  152.     x -= 1
  153.     y += (height/4).ceil
  154.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  155.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  156.     x -= 1
  157.     y += (height/4).ceil
  158.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  159.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  160.   end
  161.   #--------------------------------------------------------------------------
  162.   # ● 名前の描画
  163.   #--------------------------------------------------------------------------
  164.   alias xrxs_bp7_draw_actor_name draw_actor_name
  165.   def draw_actor_name(actor, x, y)
  166.     xrxs_bp7_draw_actor_name(actor, x, y) #if @draw_ban != true
  167.   end
  168.   #--------------------------------------------------------------------------
  169.   # ● ステートの描画
  170.   #--------------------------------------------------------------------------
  171.   alias xrxs_bp7_draw_actor_state draw_actor_state
  172.   def draw_actor_state(actor, x, y, width = 120)
  173.     xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
  174.   end
  175.   #--------------------------------------------------------------------------
  176.   # ● HP の描画
  177.   #--------------------------------------------------------------------------
  178.   alias xrxs_bp7_draw_actor_hp draw_actor_hp
  179.   def draw_actor_hp(actor, x, y, width = 144)
  180.     xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
  181.   end
  182.   #--------------------------------------------------------------------------
  183.   # ● SP の描画
  184.   #--------------------------------------------------------------------------
  185.   alias xrxs_bp7_draw_actor_sp draw_actor_sp
  186.   def draw_actor_sp(actor, x, y, width = 144)
  187.     xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
  188.   end
  189. end
  190. #==============================================================================
  191. # ■ Scene_Battle
  192. #==============================================================================
  193. class Scene_Battle
  194.   #--------------------------------------------------------------------------
  195.   # ● フレーム更新
  196.   #--------------------------------------------------------------------------
  197.   alias xrxs_bp7_update update
  198.   def update
  199.     xrxs_bp7_update
  200.     # メッセージウィンドウ表示中の場合
  201.     if $game_temp.message_window_showing
  202.       @status_window.update_cp_only = true      
  203.     else
  204.       @status_window.update_cp_only = false
  205.     end
  206.   end
  207. end
  208. #==============================================================================
  209. # ◇ 外部ライブラリ
  210. #==============================================================================
  211. class Window_Base
  212.   #--------------------------------------------------------------------------
  213.   # ● ライン描画 軽量版 by 桜雅 在土
  214.   #--------------------------------------------------------------------------
  215.   def draw_lineght(start_x, start_y, end_x, end_y, start_color)
  216.     # 描写距離の計算。大きめに直角時の長さ。
  217.     distance = (start_x - end_x).abs + (start_y - end_y).abs
  218.     # 描写開始
  219.     for i in 1..distance
  220.       x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  221.       y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  222.       self.contents.set_pixel(x, y, start_color)
  223.     end
  224.   end
  225.   #--------------------------------------------------------------------------
  226.   # ● ライン描画 by 桜雅 在土
  227.   #--------------------------------------------------------------------------
  228.   def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
  229.     # 描写距離の計算。大きめに直角時の長さ。
  230.     distance = (start_x - end_x).abs + (start_y - end_y).abs
  231.     # 描写開始
  232.     if end_color == start_color
  233.       for i in 1..distance
  234.         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  235.         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  236.         if width == 1
  237.           self.contents.set_pixel(x, y, start_color)
  238.         else
  239.           self.contents.fill_rect(x, y, width, width, start_color)
  240.         end
  241.       end
  242.     else
  243.       for i in 1..distance
  244.         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  245.         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  246.         r = start_color.red * (distance-i)/distance + end_color.red * i/distance
  247.         g = start_color.green * (distance-i)/distance + end_color.green * i/distance
  248.         b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
  249.         a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
  250.         if width == 1
  251.           self.contents.set_pixel(x, y, Color.new(r, g, b, a))
  252.         else
  253.           self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
  254.         end
  255.       end
  256.     end
  257.   end
  258. end

复制代码


这脚本 战斗图设置头像 .

如果解决了 请认可 菜刀 .
人家很辛苦..
做任何事,都不要为自己找借口。任何事都不存在困难的借口。你只有3个字“做得到”
回复 支持 反对

使用道具 举报

Lv1.梦旅人

仙剑奇侠

梦石
0
星屑
50
在线时间
33 小时
注册时间
2008-4-2
帖子
622
46
 楼主| 发表于 2008-7-21 06:31:31 | 只看该作者
以下引用殲滅天使·玲于2008-7-20 22:26:31的发言:

怎么....怎么会那么麻烦呢..

其实那个功能 很简单的呀..

我都没改脚本呢..

我看看我的那个坑用了什么脚本..

我也不知道怎麼會這麼麻煩啊?我都用了5頁了,不過頁數不是問題,弄懂這個帖子的問題才是關鍵所在。{/fd}要不閣下+我的QQ,我發給你,讓你看看我的腳本出了什麼問題,可以嗎?如果閣下的QQ不方便公開,可以用短信發給我的。

回复 支持 反对

使用道具 举报

Lv1.梦旅人

今、空を見上げ

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-8-11
帖子
2022
47
发表于 2008-7-21 06:35:36 | 只看该作者
如果脚本出现冲突
你尝试 把脚本往后 或者往前放看..

PS 我是新手
做任何事,都不要为自己找借口。任何事都不存在困难的借口。你只有3个字“做得到”
回复 支持 反对

使用道具 举报

Lv1.梦旅人

辉瑞中国首席研究员<

梦石
0
星屑
50
在线时间
142 小时
注册时间
2008-1-18
帖子
2129
48
发表于 2008-7-21 06:36:57 | 只看该作者
我都用了5頁了,不過頁數不是問題,弄懂這個帖子的問題才是關鍵


LZ你还是看一下F1,把语句弄懂,把原理搞懂,才是正道
来6r就是等某位仁兄的巨坑

褴褛着身行无端,囊中羞涩空心酸。
平生几无得意事,倒塔泡面宅寝室。
惟羡隔壁高帅富,雨露春风月夜声。
青丝无处觅其踪,只有硬盘苍井空。
莫云男儿空悲愁,鸿鹄岂不天际游。
坐断天下执鹿首,千百金帛万兜鍪。
夜深忽梦某年月,再见女神欲语迟。
吊丝终有逆袭日,木耳再无回粉时。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

今、空を見上げ

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-8-11
帖子
2022
49
发表于 2008-7-21 06:48:33 | 只看该作者
以下引用dbshy于2008-7-20 22:36:57的发言:


我都用了5頁了,不過頁數不是問題,弄懂這個帖子的問題才是關鍵


LZ你还是看一下F1,把语句弄懂,把原理搞懂,才是正道


dbshy君..我自己现在看F1都还是很脑乱呢..

到底脚本怎么学.我都没找到门揩踏进去..哎..

比较难..

对了 LZ你用的是什么横版战斗..

也许有一些横版战斗脚本是不能显示成像我发的那张图片那种效果的

- -#
做任何事,都不要为自己找借口。任何事都不存在困难的借口。你只有3个字“做得到”
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
39973
在线时间
5810 小时
注册时间
2006-11-10
帖子
6683
50
发表于 2008-7-21 07:01:34 | 只看该作者
这次真的是超级囧了..

被狠狠的雷了一下,

看来要好好的去背背单词...

self.contenes.blt(0, y, bitmap, src_rect)

一整晚都在和它绕.....

contents....这个才对
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-8-9 04:07

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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