Bienvenue visiteur !
|

Statistiques
Liste des membres
Contact
Mentions légales
87 connectés actuellement
31088329 visiteurs depuis l'ouverture
1098 visiteurs aujourd'hui

Partenaires









Tous nos partenaires
Devenir partenaire
|
Messages postés par rpg29 Nombre de messages référencés sur Oniromancie (non supprimés): 11 Aller à la page: 1
Posté dans Forum - [Scripts] Petites questions connes sur les SCRIPTS!! |
rpg29 -
posté le 23/09/2012 à 13:45:09. (22 messages postés) |

| Bonjour,
J'ai trouvé un script pour mon jeux qui affiche le nom du héro au dessus de lui :
Spoiler (cliquez pour afficher)
#==============================================================================
# ** Event Text Display
#==============================================================================
# Created By: Ãص¹
# Modified By: SephirothSpawn
# Modified By: Meâ„¢
# Version 2.1
# 2006-03-04
#==============================================================================
# * Instructions :
#
# ~ Creating Event With Text Display
# - Put a Comment on the Page With
# [CD____]
# - Place Text to Be Displayed in the Blank
#------------------------------------------------------------------------------
# * Customization :
#
# ~ NPC Event Colors
# - Event_Color = Color
#
# ~ Player Event Color
# - Player_Color = Color
#
# ~ Player Text
# - Player_Text = text_display *
#
# ~ text_display
# - 'Name', 'Class', 'Level', 'Hp', 'Sp'
#==============================================================================
#==============================================================================
# ** Game_Character
#==============================================================================
class Game_Character
#--------------------------------------------------------------------------
# * Dispaly Text Color (Event & Player)
#--------------------------------------------------------------------------
Event_Color = Color.new(0, 0, 200)
Player_Color = Color.new(200, 0, 0)
#--------------------------------------------------------------------------
# * Display Choices
# ~ 'Name', 'Class', 'Level', 'Hp', 'Sp'
#--------------------------------------------------------------------------
Player_Text = 'Name'
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :text_display
end
#==============================================================================
# ** Game_Event
#==============================================================================
class Game_Event < Game_Character
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_characterdisplay_gevent_refresh refresh
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Original Refresh Method
seph_characterdisplay_gevent_refresh
# Checks to see if display text
# If the name contains CD, it takes the rest of the name as the text
unless @list.nil?
for i in 0...@list.size
if @list.code == 108
@list.parameters[0].dup.gsub!(/\[[Cc][Dd](.+?)\]/) do
@text_display = [$1, Event_Color]
end
end
end
end
@text_display = nil if @erased
end
end
#==============================================================================
# ** Game_Player
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_characterdisplay_gplayer_refresh refresh
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Original Refresh Method
seph_characterdisplay_gplayer_refresh
# Gets First Actor
actor = $game_party.actors[0]
# Determines Text
case Player_Text
when 'Name'
txt = "\N[1]"
when 'Class'
txt = actor.class_name
when 'Level'
txt = "Level: #{actor.level}"
when 'Hp'
txt = "HP: #{actor.hp} / #{actor.maxhp}"
when 'Sp'
txt = "SP: #{actor.sp} / #{actor.maxsp}"
else
txt = ''
end
# Creates Text Display
@text_display = [txt, Player_Color]
end
end
#==============================================================================
# ** Sprite_Character
#==============================================================================
class Sprite_Character < RPG::Sprite
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_characterdisplay_scharacter_update update
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Original update Method
seph_characterdisplay_scharacter_update
# Character Display Update Method
update_display_text
end
#--------------------------------------------------------------------------
# * Create Display Sprite
#--------------------------------------------------------------------------
def create_display_sprite(args)
Font.default_size = 12
Font.default_name = "Verdana"
# Creates Display Bitmap
bitmap = Bitmap.new(160, 24)
# Draws Text Shadow
# if bitmap.font.respond_to?(:draw_shadow)
# bitmap.font.draw_shadow = false
# end
# bitmap.font.color = Color.new(0, 0, 0)
# bitmap.draw_text(1, 1, 160, 24, args[0], 1)
# Changes Font Color
bitmap.font.color = args[1]
# Draws Text
bitmap.draw_text(0, 0, 160, 24, args[0], 1)
# Creates Display Text Sprite
@_text_display = Sprite.new(self.viewport)
@_text_display.bitmap = bitmap
@_text_display.ox = 80
@_text_display.oy = 24
@_text_display.x = self.x
@_text_display.y = self.y - self.oy / 2 - 24
@_text_display.z = 30001
@_text_display.visible = self.visible #true
end
#--------------------------------------------------------------------------
# * Dispose Display Sprite
#--------------------------------------------------------------------------
def dispose_display_text
unless @_text_display.nil?
@_text_display.dispose
end
#reset font colors
Font.default_size = 14
Font.default_name = "Verdana"
end
#--------------------------------------------------------------------------
# * Update Display Sprite
#--------------------------------------------------------------------------
def update_display_text
unless @character.text_display.nil?
if @_text_display.nil?
create_display_sprite(@character.text_display)
end
@_text_display.x = self.x
@_text_display.y = self.y - self.oy / 2 - 24
lastx = $game_temp.player_new_x
lasty = $game_temp.player_new_y
# if self.x > lastx and self.y > lasty
# @_text_display.opacity = 255 - (self.x - lastx) - (self.y - lasty)
# elsif self.x < lastx and self.y > lasty
# @_text_display.opacity = 255 - (lastx - self.x) - (self.y - lasty)
# elsif self.x > lastx and self.y < lasty
# @_text_display.opacity = 255 - (self.x - lastx) - (lasty - self.y)
# else
# @_text_display.opacity = 255 - (lastx - self.x) - (lasty - self.y)
# end
else
unless @_text_display.nil?
dispose_display_text
end
end
#reset font colors
Font.default_size = 14
Font.default_name = "Verdana"
end
end
Mais dans le jeu je laisse le joueur choisir son nom le problème est que c'est le possésseur du script qui choisis le nom à afficher donc le joueur aura beau donner un nom au héro un autre nom sera affiché.
Merci des réponses Hippo29
|
je love les jeux video |
Posté dans Forum - Heroes of Ihpa |
rpg29 -
posté le 27/08/2012 à 10:51:14. (22 messages postés) |

| Ephy non Maïté ne ressemblera pas a cet chose!!!!
|
je love les jeux video |
Posté dans Forum - Heroes of Ihpa |
rpg29 -
posté le 27/08/2012 à 10:21:15. (22 messages postés) |

| Little gamer merci de ton aide
|
je love les jeux video |
Posté dans Forum - [Scripts] Petites questions connes sur les SCRIPTS!! |
rpg29 -
posté le 27/08/2012 à 10:06:39. (22 messages postés) |

| J'ai copié un script de Rpg creative pour le combat A-rpg et dans le script il est noté qu'il faut modifié la scène menu donc je copie et je colle celleci
Et quand je démarre le jeu il est noté Scène_menu syntaxe error ocurred ligne 47
Je vous montre le script:
#==============================================================================
# ¦ Scene_Menu
#------------------------------------------------------------------------------
# ??????????????????
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# ? ?????????
# menu_index : ?????????????
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def main
# ????????????
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Status"
s5 = "Save"
s6 = "Exit"
s7 = "Change Lead"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
@command_window.index = @menu_index
@command_window.height = 224
# ??????? 0 ????
if $game_party.actors.size == 0
# ?????????????????????
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
@command_window.disable_item(6)
end
# ????????
if $game_system.save_disabled
# ?????????
@command_window.disable_item(4)
end
# ?????????????
@playtime_window = Window_PlayTime.new
@playtime_window.x = 0
Merci de vos réponses
|
je love les jeux video |
Posté dans Forum - Heroes of Ihpa |
rpg29 -
posté le 26/08/2012 à 12:48:39. (22 messages postés) |

| Oui je sais j'ai les screens mais je les héberges sur casimage et je ne sais pas si vous pouvez voir les liens
|
je love les jeux video |
Posté dans Forum - Mes Orks à W40K |
rpg29 -
posté le 03/12/2011 à 16:14:34. (22 messages postés) |

| Les mieux c'est les black templars
|
je love les jeux video |
Aller à la page: 1
|
|
|