Rpg zelda construct
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.

Rpg zelda construct

tout pour rpg maker et +
 
AccueilPortailRechercherDernières imagesS'enregistrerConnexion
-45%
Le deal à ne pas rater :
PC Portable LG Gram 17″ Intel Evo Core i7 32 Go /1 To
1099.99 € 1999.99 €
Voir le deal

 

 Script: coeur a la zelda

Aller en bas 
3 participants
AuteurMessage
Yoh Asakura
Participant



Nombre de messages : 15
Date d'inscription : 28/02/2006

Script: coeur a la zelda Empty
MessageSujet: Script: coeur a la zelda   Script: coeur a la zelda EmptySam 4 Mar à 11:09

Commencez par créer un nouveau script au dessus de Main et nommez-le "Window_Corazones" :

Code:
#==============================================================================
# Window_Corazones
# Par DarkRog
#------------------------------------------------------------------------------
#==============================================================================

class Window_Corazones < Window_Base
def initialize
super(-8, -8, 640, 96)
#=== Options ===
corazones = 10
opacidad = 255
opcion = 2
#=== Options fin ==
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 0
@hearts = corazones
@opacity = opacidad
@option = opcion
@hr = 0
refresh
end
#--------------------------------------------------------------------------
# - Actualisation
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@n = $game_party.actors[0].hp
@mn = $game_party.actors[0].maxhp
#n is the value, and mn the maxvalue:
@hr = 0
@lh = 0
for i in 0..@hearts-1
self.contents.fill_rect(i*14, 4, 1, 2, Color.new(0, 0, 0, @opacity))
self.contents.fill_rect(i*14+1, 3, 1, 4, Color.new(0, 0, 0, @opacity))
self.contents.fill_rect(i*14+2, 2, 1, 6, Color.new(0, 0, 0, @opacity))
self.contents.fill_rect(i*14+3, 1, 1, 8, Color.new(0, 0, 0, @opacity))
self.contents.fill_rect(i*14+4, 0, 1, 10, Color.new(0, 0, 0, @opacity))
self.contents.fill_rect(i*14+5, 1, 1, 10, Color.new(0, 0, 0, @opacity))
self.contents.fill_rect(i*14+6, 2, 1, 10, Color.new(0, 0, 0, @opacity))
self.contents.fill_rect(i*14+7, 1, 1, 10, Color.new(0, 0, 0, @opacity))
self.contents.fill_rect(i*14+8, 0, 1, 10, Color.new(0, 0, 0, @opacity))
self.contents.fill_rect(i*14+9, 1, 1, 8, Color.new(0, 0, 0, @opacity))
self.contents.fill_rect(i*14+10, 2, 1, 6, Color.new(0, 0, 0, @opacity))
self.contents.fill_rect(i*14+11, 3, 1, 4, Color.new(0, 0, 0, @opacity))
self.contents.fill_rect(i*14+12, 4, 1, 2, Color.new(0, 0, 0, @opacity))
#
self.contents.fill_rect(i*14+1, 4, 1, 2, Color.new(255, 255, 255, @opacity))
self.contents.fill_rect(i*14+2, 3, 1, 4, Color.new(255, 255, 255, @opacity))
self.contents.fill_rect(i*14+3, 2, 1, 6, Color.new(255, 255, 255, @opacity))
self.contents.fill_rect(i*14+4, 1, 1, 8, Color.new(255, 255, 255, @opacity))
self.contents.fill_rect(i*14+5, 2, 1, 8, Color.new(255, 255, 255, @opacity))
self.contents.fill_rect(i*14+6, 3, 1, 8, Color.new(255, 255, 255, @opacity))
self.contents.fill_rect(i*14+7, 2, 1, 8, Color.new(255, 255, 255, @opacity))
self.contents.fill_rect(i*14+8, 1, 1, 8, Color.new(255, 255, 255, @opacity))
self.contents.fill_rect(i*14+9, 2, 1, 6, Color.new(255, 255, 255, @opacity))
self.contents.fill_rect(i*14+10, 3, 1, 4, Color.new(255, 255, 255, @opacity))
self.contents.fill_rect(i*14+11, 4, 1, 2, Color.new(255, 255, 255, @opacity))
#
#@c = 255
@l = @n*100/@mn
@ho = @l*@hearts
c_color(1)
self.contents.fill_rect(i*14+2, 4, 1, 2, Color.new(@c, 0, 0, @opacity))
c_color(2)
self.contents.fill_rect(i*14+3, 3, 1, 4, Color.new(@c, 0, 0, @opacity))
c_color(3)
self.contents.fill_rect(i*14+4, 2, 1, 6, Color.new(@c, 0, 0, @opacity))
c_color(4)
self.contents.fill_rect(i*14+5, 3, 1, 6, Color.new(@c, 0, 0, @opacity))
c_color(5)
self.contents.fill_rect(i*14+6, 4, 1, 6, Color.new(@c, 0, 0, @opacity))
c_color(6)
self.contents.fill_rect(i*14+7, 3, 1, 6, Color.new(@c, 0, 0, @opacity))
c_color(7)
self.contents.fill_rect(i*14+8, 2, 1, 6, Color.new(@c, 0, 0, @opacity))
c_color(Cool
self.contents.fill_rect(i*14+9, 3, 1, 4, Color.new(@c, 0, 0, @opacity))
c_color(9)
self.contents.fill_rect(i*14+10, 4, 1, 2, Color.new(@c, 0, 0, @opacity))

@hr += 1
end
if @option == 1
self.contents.font.color.set(0, 0, 0)
self.contents.draw_text(0 - 1, 7 - 1, 160, 32, $game_party.actors[0].name, 0)
self.contents.draw_text(0 - 1, 7 + 1, 160, 32, $game_party.actors[0].name, 0)
self.contents.draw_text(0 + 1, 7 - 1, 160, 32, $game_party.actors[0].name, 0)
self.contents.draw_text(0 + 1, 7 + 1, 160, 32, $game_party.actors[0].name, 0)
self.contents.font.color = normal_color
self.contents.draw_text(0, 7, 160, 32, $game_party.actors[0].name, 0)
elsif @option == 2
self.contents.font.color.set(0, 0, 0)
self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@n}/#{@mn}", 0)
self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@n}/#{@mn}", 0)
self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@n}/#{@mn}", 0)
self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@n}/#{@mn}", 0)
self.contents.font.color = normal_color
self.contents.draw_text(0, 7, 160, 32, "#{@n}/#{@mn}", 0)
elsif @option == 3
self.contents.font.color.set(0, 0, 0)
self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@ho/100}/#{@hearts}", 0)
self.contents.font.color = normal_color
self.contents.draw_text(0, 7, 160, 32, "#{@ho/100}/#{@hearts}", 0)
elsif @option == 4
self.contents.font.color.set(0, 0, 0)
self.contents.draw_text(0 - 1, 7 - 1, 160, 32, "#{@l}%", 0)
self.contents.draw_text(0 - 1, 7 + 1, 160, 32, "#{@l}%", 0)
self.contents.draw_text(0 + 1, 7 - 1, 160, 32, "#{@l}%", 0)
self.contents.draw_text(0 + 1, 7 + 1, 160, 32, "#{@l}%", 0)
self.contents.font.color = normal_color
self.contents.draw_text(0, 7, 160, 32, "#{@l}%", 0)
end
end

def c_color(a)
if @hr <= (@ho/100)-1
@c = 255
else
if @ho/10-@hr*10 >= a and @ho/10-@hr*10 <= 9

@c = 255
else
@c = 0
end
end
end

def corazones(corazones)
@hearts = corazones
end
end




Vous pouvez configurer le script à ces lignes :

Code:
#=== Options ===
corazones = 10
opacidad = 255
opcion = 2
#=== Options end ==



Corazones = le nombre de coeurs qui seront affichés et se videront en fonction des PV.
Opacidad = l'opacité des coeurs.
Opcion = Le texte affiché en dessous des coeurs.
1 = Nom du héros.
2 = PV actuels et max du héros.
3 = Nombre de coeurs pleins.
4 = Pourcentage de vie restant
5 = Rien.

Puis dans Scene_Map, en dessous de la ligne 15, ajoutez :

Code:
@corazones = Window_Corazones.new


En dessous de la ligne 37 :

Code:
@corazones.dispose


En dessous de la ligne 75 :

Code:
@corazones.refresh
Revenir en haut Aller en bas
Link
Roi
Roi
Link


Nombre de messages : 401
Date d'inscription : 25/01/2006

Script: coeur a la zelda Empty
MessageSujet: Re: Script: coeur a la zelda   Script: coeur a la zelda EmptySam 4 Mar à 11:50

une erreur c glice Cool remplacer sa par 8 et une )
Revenir en haut Aller en bas
http://rpg-make-xp-total.forumpro.fr
lee
Serviteur
lee


Nombre de messages : 50
Date d'inscription : 16/02/2006

Script: coeur a la zelda Empty
MessageSujet: Re: Script: coeur a la zelda   Script: coeur a la zelda EmptySam 4 Mar à 14:28

je voudrait sa voir pk vous désativer pas les Smilies ou afficher sa en code ex

Code:
salut

pour les scripte car j'en ai vu plusieur avec des smiles dedans
Revenir en haut Aller en bas
Contenu sponsorisé





Script: coeur a la zelda Empty
MessageSujet: Re: Script: coeur a la zelda   Script: coeur a la zelda Empty

Revenir en haut Aller en bas
 
Script: coeur a la zelda
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Script
» Jour/Nuit
» Zelda
» defilement des map a la zelda

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Rpg zelda construct :: Rpg Maker :: Script et Tuto XP-
Sauter vers:  
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser