ferroxMolécule
Messages : 74 Loisirs : JEUX VIDEO, DORMIR, FRITES, RPG Date d'inscription : 24/07/2010
Caractéristiques du membre Evolution: Atome Job: Making XP: (20/20)
| Sujet: Script pour afficher les face sets dans les combats Ven 4 Mar 2011 - 17:53 | |
| Salut! Un script qui selon son petit nom propre écrit au dessus... Sert à afficher les face sets dans les combats... Apporte un grain de beauté au jeu, mais il prend 2 secondes à installer, Sympa... Infos: Nom Face Set dans les combats Auteur Jao Neto Portion de code: - Code:
-
class Window_Base < Window
def draw_face(face_name, face_index, x, y, size = 96, opacity = 255)
bitmap = Cache.face(face_name)
rect = Rect.new(0, 0, 0, 0)
rect.x = face_index % 4 * 96 + (96 - size) / 2
rect.y = face_index / 4 * 96 + (96 - size) / 2
rect.width = size
rect.height = size
self.contents.blt(x, y, bitmap, rect,opacity)
bitmap.dispose
end
def draw_actor_face(actor, x, y, size = 96, opacity = 255)
draw_face(actor.face_name, actor.face_index, x, y, size, opacity)
end
end
class Window_BattleStatus < Window_Selectable
def initialize
super(0, 0, 416, 128)
@column_max = 4
@spacing = 0
refresh
self.active = false
end
def refresh
self.contents.clear
@item_max = $game_party.members.size
for i in 0...@item_max
draw_faces(i)
end
for i in 0...@item_max
draw_item(i)
end
end
def draw_faces(index)
actor = $game_party.members[index„
draw_actor_face(actor, actor.index * 96 + 2, 0, 96, 100)
end
def draw_item(index)
self.contents.font.color = normal_color
actor = $game_party.members[index„
draw_actor_name(actor, index * 96 + 2, 0)
draw_actor_state(actor, index * 96 + 2, 18, 48)
draw_actor_hp(actor, index * 96 + 2, 56, 86)
draw_actor_mp(actor, index * 96 + 2, 74, 86)
end
end
Voili voilou ferrox |
|