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



 
AccueilAccueil  PortailPortail  TutorielsTutoriels  Dernières imagesDernières images  RechercherRechercher  S'enregistrerS'enregistrer  ConnexionConnexion  
Le Deal du moment : -15%
(Adhérents Fnac) LEGO® Star Wars™ ...
Voir le deal
552.49 €

 

 Barre de chargement

Aller en bas 
5 participants
AuteurMessage
Zelda_PL
Blob Jaune
Blob Jaune
Zelda_PL


Masculin
Nombre de messages : 797
Age : 31
Localisation : En train d'éliminé les deadras de Cyrodiil
Date d'inscription : 09/05/2006

Barre de chargement Empty
MessageSujet: Barre de chargement   Barre de chargement EmptyMar 23 Mai - 0:19

Remarque : Testé et fonctionnel. Si on ne voit pas l'écriture (comme sur le screen) voir alors la f.a.q.

Installation : ouvrez l'éditeur de script ( F11 ), faites un nouveau script au dessus de "Main", et suivez les instructions ci-dessous

Code :

Collez le code ci-dessous et nommez le "bitmap"


# A gradient bar... no need to explain Razz
# Made By Illusion
class Bitmap
def gradient_fill_rect(x, y, width = nil, height = nil, color = nil)
if x.is_a?(Rect)
color = y
height = x.height
end
origin_aplha = color.alpha
temp_color_alpha = 0
for i in 0...height
temp_color_alpha += origin_aplha / height.to_f
temp_color = Color.new(color.red, color.green, color.blue, temp_color_alpha)
if x.is_a?(Rect)
self.fill_rect(x, temp_color)
else
self.fill_rect(x, y + i, width, height - i, temp_color)
end
end
end
end


Faites un nouveau script et collez le code ci-dessous et nommez le "Game_System"

class Game_System
#--------------------------------------------------------------------------
# ● Returns the default windowskin name.
#--------------------------------------------------------------------------
def windowskin_name
if @windowskin_name == nil
begin
return $data_system.windowskin_name
rescue
return '001-Blue01'
end
else
return @windowskin_name
end
end
end

Faites un nouveau script et collez le code ci-dessous et nommez le "Window_Base"

# ■ Window_Base
#------------------------------------------------------------------------------
# Some modifications to make some special effects.
# By : Illusion
# Descriptions :
# self.shake = true >> Will shake the window and its contents.
# self.bounce(x or y or both) >> Will "bounce" the window up, donw, left and right.
# self.continuous_transparency = true >> Will make the window fade in and out.
# Before setting one these settings in your scene do this :
# @window_thing.x = desired x
# @window_thing.y = desired y
# @window_thing.update
# @window_thing.effect_attribute = true or false
#==============================================================================

class Window_Base
attr_accessor :shake
attr_accessor :bounce_x
attr_accessor :bounce_y
attr_accessor :continuous_transparency
alias effects_initialize initialize
alias effects_update update
def initialize(x, y, width, height)
@old_x = x
@old_y = y
effects_initialize(x, y, width, height)
self.shake = false
self.bounce_x = false
self.bounce_y = false
self.continuous_transparency = false
end
def update
@old_x = self.x unless move_effects
@old_y = self.y unless move_effects
effects_update
# If the window has a shake status, shake it.
if self.shake
self.x = @old_x + rand(5)
self.y = @old_y - rand(5)
end
# If the window has a bouncing status, move it.
if self.bounce_y
@down = true if self.y < @old_y - 40
@down = false if self.y > @old_y+ 10
self.y += 1 if @down
self.y -= 1 unless @down
end
if self.bounce_x
@left = true if self.x < @old_x - 20
@left = false if self.x > @old_x + 30
self.x += 1 if @left
self.x -= 1 unless @left
end
# If the window has a transparency status, change its transparency it.
if self.continuous_transparency
@opacity_up = true if self.opacity <= 10
@opacity_up = false if self.opacity >= 255
self.opacity += 2 if @opacity_up
self.opacity -= 2 unless @opacity_up
end
end
#-------------------------------------------------------------
# ● Enables bouncing effect
#-------------------------------------------------------------
def bounce
self.bounce_x = self.bounce_y = true
end
#-------------------------------------------------------------
# ● Checks that no window effect is active.
#-------------------------------------------------------------
def move_effects
a = false
a = true if self.bounce_x
a = true if self.bounce_y
a = true if self.shake
return a
end
end


Faites un nouveau script et collez le code ci-dessous et nommez le "Window_Load_Data"

#==============================================================================
# ■ Window_Load_Data
#------------------------------------------------------------------------------
# Shows the loading data bar and percentage.
# By : Illusion
#==============================================================================

class Window_Load_Data < Window_Base
attr_accessor :text
attr_accessor :color
#--------------------------------------------------------------------------
# ● Initializes the window.
#--------------------------------------------------------------------------
def initialize
super(190, 206, 250 + 32, 30 + 32 - 15)
self.contents = Bitmap.new(250, 32 - 6)
self.contents.font.name = $defaultfonttype
self.contents.font.size = 16
self.contents.font.color = Color.new(255, 255, 255, 255)
@text = ""
@color = Color.new(0, 0, 0, 255)
self.visible = true
end
#--------------------------------------------------------------------------
# ● Updates the bar and the text.
#--------------------------------------------------------------------------
def set_text_and_bar(percentage)
percentage = percentage.floor.to_i
update
# Clears the contents.
self.contents.clear
self.contents.gradient_fill_rect(0, 0, (percentage / 100.0 * self.contents.width), self.contents.height, @color)
text = @text+percentage.to_s+'%'
self.contents.draw_text(8, -4, text.size * 32, 32, text, 0)
end
end
Revenir en haut Aller en bas
Zelda_PL
Blob Jaune
Blob Jaune
Zelda_PL


Masculin
Nombre de messages : 797
Age : 31
Localisation : En train d'éliminé les deadras de Cyrodiil
Date d'inscription : 09/05/2006

Barre de chargement Empty
MessageSujet: Re: Barre de chargement   Barre de chargement EmptyMar 23 Mai - 0:51

Remplacer le smiley par : P mais il faut que se soit coller

Voici le reste :

Faites un nouveau script et collez le code ci-dessous et nommez le "Scene_Title"

#==============================================================================
# ■ Scene_Title
#------------------------------------------------------------------------------
# Custom load window added.
# By Illusion
#==============================================================================

class Scene_Title
#--------------------------------------------------------------------------
# ● Main
#--------------------------------------------------------------------------
def main
# Go to B_TEST if user is testing a batttle.
if $BTEST
battle_test
return
end
# Create a new game_system
$game_system = Game_System.new
# Create the Sprites and windows.
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title(load_data("Data/System.rxdata").title_name)
# If data is already loaded, skip this part.
if $data_system == nil
Graphics.transition
@window = Window_Load_Data.new
@window.color = Color.new(rand(255), rand(255), rand(255), 255)
@window.width = 283
@window.height = 60
load_hero_data
@window.color.set(rand(255), rand(255), rand(255))
load_class_data
@window.color.set(rand(255), rand(255), rand(255))
load_skill_data
@window.color.set(rand(255), rand(255), rand(255))
load_item_data
@window.color.set(rand(255), rand(255), rand(255))
load_weapons_data
@window.color.set(rand(255), rand(255), rand(255))
load_armor_data
@window.color.set(rand(255), rand(255), rand(255))
load_ennemy_data
@window.color.set(rand(255), rand(255), rand(255))
load_troop_data
@window.color.set(rand(255), rand(255), rand(255))
load_states_data
@window.color.set(rand(255), rand(255), rand(255))
load_animations_data
@window.color.set(rand(255), rand(255), rand(255))
load_tilesets_data
@window.color.set(rand(255), rand(255), rand(255))
load_common_events_data
@window.color.set(rand(255), rand(255), rand(255))
load_system_data
Graphics.freeze
@window.dispose
end
# Define the commands.
s1 = "New Game"
s2 = "Continue"
s3 = "Exit"
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.back_opacity = 160
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 288
@command_window.update
# Makes the command window bounce, removed if not desired.
@command_window.bounce
# Checks if a save file exists.
@continue_enabled = false
for i in 0..3
if FileTest.exist?("Save#{i+1}.sav")
@continue_enabled = true
end
end
# Disable the command if no save file exists, otherwise, place cursor on the continue option.
if @continue_enabled
@command_window.index = 1
else
@command_window.disable_item(1)
end
# Play title BGM.
$game_system.bgm_play($data_system.title_bgm)
# Stop the ME and BGS.
Audio.me_stop
Audio.bgs_stop
# De-freeze the screen.
Graphics.transition
# メインループ
loop do
# Update the screen.
Graphics.update
# Update the keyboard input.
Input.update
# Update.
update
# If $scene is not a Scene_Title, break.
if $scene != self
break
end
end
# Freezes the screen.
Graphics.freeze
# Release all the bitmaps / erase them.
@command_window.dispose
@sprite.bitmap.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
# ● Load Hero data
#--------------------------------------------------------------------------
def load_hero_data
@window.text = 'Chargement personnages '
size = load_data("Data/Actors.rxdata").size
$data_actors = []
for i in 0...size + 1
$data_actors[i] = load_data("Data/Actors.rxdata")[i]
@window.set_text_and_bar((i / size.to_f * 100).to_i)
Graphics.update
Input.update
end
end
#--------------------------------------------------------------------------
# ● Load class data
#--------------------------------------------------------------------------
def load_class_data
@window.text ='Chargement classes '
size = load_data("Data/Classes.rxdata").size
$data_classes = []
for i in 0...size + 1
$data_classes[i] = load_data("Data/Classes.rxdata")[i]
@window.set_text_and_bar((i / size.to_f * 100).to_i)
Graphics.update
Input.update
end
end
#--------------------------------------------------------------------------
# ● Load skill data
#--------------------------------------------------------------------------
def load_skill_data
@window.text = 'Chargement compétences '
size = load_data("Data/Skills.rxdata").size
$data_skills = []
for i in 0...size + 1
$data_skills[i] = load_data("Data/Skills.rxdata")[i]
@window.set_text_and_bar((i / size.to_f * 100).to_i)
Graphics.update
Input.update
end
end
#--------------------------------------------------------------------------
# ● Load item data
#--------------------------------------------------------------------------
def load_item_data
@window.text = 'Chargement Objets '
size = load_data("Data/Items.rxdata").size
$data_items = []
for i in 0...size + 1
$data_items[i] = load_data("Data/Items.rxdata")[i]
@window.set_text_and_bar((i / size.to_f * 100).to_i)
Graphics.update
Input.update
end
end
#--------------------------------------------------------------------------
# ● Load weapons data
#--------------------------------------------------------------------------
def load_weapons_data
size = load_data("Data/Weapons.rxdata").size
$data_weapons = []
@window.text = 'Chargement armes '
for i in 0...size + 1
$data_weapons[i] = load_data("Data/Weapons.rxdata")[i]
@window.set_text_and_bar((i / size.to_f * 100).to_i)
Graphics.update
Input.update
end
end
#--------------------------------------------------------------------------
# ● Load armor data
#--------------------------------------------------------------------------
def load_armor_data
size = load_data("Data/Armors.rxdata").size
$data_armors = []
@window.text = 'Chargement armures '
for i in 0...size + 1
$data_armors[i] = load_data("Data/Armors.rxdata")[i]
@window.set_text_and_bar((i / size.to_f * 100).to_i)
Graphics.update
Input.update
end
end
#--------------------------------------------------------------------------
# ● Load ennemy data
#--------------------------------------------------------------------------
def load_ennemy_data
size = load_data("Data/Enemies.rxdata").size
$data_enemies = []
@window.text = 'Chargement ennemies '
for i in 0...size + 1
$data_enemies[i] = load_data("Data/Enemies.rxdata")[i]
@window.set_text_and_bar((i / size.to_f * 100).to_i)
Graphics.update
Input.update
end
end
#--------------------------------------------------------------------------
# ● Load troop data
#--------------------------------------------------------------------------
def load_troop_data
size = load_data("Data/Troops.rxdata").size
$data_troops = []
@window.text = 'Chargement troops '
for i in 0...size + 1
$data_troops[i] = load_data("Data/Troops.rxdata")[i]
@window.set_text_and_bar((i / size.to_f * 100).to_i)
Graphics.update
Input.update
end
end
#--------------------------------------------------------------------------
# ● Load states data
#--------------------------------------------------------------------------
def load_states_data
size = load_data("Data/States.rxdata").size
$data_states = []
@window.text = 'Chargement états'
for i in 0...size + 1
$data_states[i] = load_data("Data/States.rxdata")[i]
@window.set_text_and_bar((i / size.to_f * 100).to_i)
Graphics.update
Input.update
end
end
#--------------------------------------------------------------------------
# ● Load animations data
#--------------------------------------------------------------------------
def load_animations_data
size = load_data("Data/Animations.rxdata").size
$data_animations = []
@window.text = 'Chargement animation '
for i in 0...size + 1
$data_animations[i] = load_data("Data/Animations.rxdata")[i]
@window.set_text_and_bar((i / size.to_f * 100).to_i)
Graphics.update
Input.update
end
end
#--------------------------------------------------------------------------
# ● Load tilesets data
#--------------------------------------------------------------------------
def load_tilesets_data
size = load_data("Data/Tilesets.rxdata").size
$data_tilesets = []
@window.text = 'Chargement décors '
for i in 0...size + 1
$data_tilesets[i] = load_data("Data/Tilesets.rxdata")[i]
@window.set_text_and_bar((i / size.to_f * 100).to_i)
Graphics.update
Input.update
end
end
#--------------------------------------------------------------------------
# ● Load common events data
#--------------------------------------------------------------------------
def load_common_events_data
size = load_data("Data/CommonEvents.rxdata").size
$data_common_events = []
@window.text = 'Chargement évènement commun '
for i in 0...size
$data_common_events[i] = load_data("Data/CommonEvents.rxdata")[i]
@window.set_text_and_bar((i / size.to_f * 100).to_i)
Graphics.update
Input.update
end
end
#--------------------------------------------------------------------------
# ● Load system data
#--------------------------------------------------------------------------
def load_system_data
system_attr_data = ['magic_number', 'party_members',
'elements', 'switches', 'variables', 'windowskin_name',
'title_name ', 'gameover_name' , 'battle_transition',
'title_bgm', 'battle_bgm ', 'battle_end_me ',
'gameover_me ', 'cursor_se', 'decision_se',
'cancel_se', 'buzzer_se', 'equip_se', 'shop_se ',
'save_se ', 'load_se', 'battle_start_se',
'escape_se', 'actor_collapse_se ', 'enemy_collapse_se',
'words', 'start_map_id', 'start_x', 'start_y',
'test_battlers', 'test_troop_id', 'battleback_name ',
'battler_name ', 'battler_hue', 'edit_map_id ']
size = system_attr_data.size
$data_system = RPG::System.new
@window.text = 'Chargement systeme '
for i in 0...size + 1
eval('$data_system.'+system_attr_data[i]+' = load_data("Data/System.rxdata").'+system_attr_data[i]) rescue nil
@window.set_text_and_bar((i / size.to_f * 100).to_i)
Graphics.update
Input.update
end
end
end
Revenir en haut Aller en bas
Boblino
Modo
Modo
Boblino


Masculin
Nombre de messages : 1184
Age : 31
Localisation : Aux enfers, assis sur mon Canapé.
Humeur/Caractère : Bored
Date d'inscription : 08/05/2006

Statut
Expérience:
Barre de chargement 50639/25Barre de chargement V01vl4  (9/25)
Pixel Point Pixel Point: 20

Barre de chargement Empty
MessageSujet: Re: Barre de chargement   Barre de chargement EmptyMar 23 Mai - 13:26

tes scripts sont intéressant mais tu peux mettre les liens vers les screens ? car il est souvent écrit : patati pattata comme sur les screens...
patita pattatou regardez sur les screens pour mieux comprendre etc.etc.
Revenir en haut Aller en bas
http://metroid-ds.winnerforum.net
Zelda_PL
Blob Jaune
Blob Jaune
Zelda_PL


Masculin
Nombre de messages : 797
Age : 31
Localisation : En train d'éliminé les deadras de Cyrodiil
Date d'inscription : 09/05/2006

Barre de chargement Empty
MessageSujet: Re: Barre de chargement   Barre de chargement EmptyMar 23 Mai - 14:26

Question Question Question Question Question

J'ai rien compris de se que tu as dit
Revenir en haut Aller en bas
Zelda_PL
Blob Jaune
Blob Jaune
Zelda_PL


Masculin
Nombre de messages : 797
Age : 31
Localisation : En train d'éliminé les deadras de Cyrodiil
Date d'inscription : 09/05/2006

Barre de chargement Empty
MessageSujet: Re: Barre de chargement   Barre de chargement EmptyMar 23 Mai - 14:28

j'avais oublier de la mettre :


Voilà le résultat :


Barre de chargement Barrechargement7iy
Revenir en haut Aller en bas
sabib el mamoud
Blob Jaune
Blob Jaune
sabib el mamoud


Masculin
Nombre de messages : 911
Age : 33
Localisation : changeante...on cherchant le Gold Bird
Humeur/Caractère : deconera bien qui deconera le premier
Date d'inscription : 13/05/2006

Statut
Expérience:
Barre de chargement 50630/25Barre de chargement V01vl4  (0/25)
Pixel Point Pixel Point: 10

Barre de chargement Empty
MessageSujet: Re: Barre de chargement   Barre de chargement EmptyMar 23 Mai - 14:57

wé ça a l'air bien Wink
Revenir en haut Aller en bas
http://rpgconcours.free.fr/
GTK
Painteur GTK
Painteur GTK
GTK


Masculin
Nombre de messages : 3595
Age : 34
Humeur/Caractère : Fatigué
Date d'inscription : 29/04/2006

Statut
Expérience:
Barre de chargement 5063100/100Barre de chargement V01vl4  (100/100)
Pixel Point Pixel Point: ---

Barre de chargement Empty
MessageSujet: Re: Barre de chargement   Barre de chargement EmptyMar 23 Mai - 20:09

Lol; c'est bien beau mais sa sert à rien ?
Revenir en haut Aller en bas
https://ultimagraphisme.actifforum.com
ziko
Modo
Modo
ziko


Nombre de messages : 216
Date d'inscription : 02/05/2006

Barre de chargement Empty
MessageSujet: Re: Barre de chargement   Barre de chargement EmptyMar 23 Mai - 21:38

GTK a raison, je vois pas l'utilité de ce script!!
Revenir en haut Aller en bas
http://www.eldenor.zikforum.com
Zelda_PL
Blob Jaune
Blob Jaune
Zelda_PL


Masculin
Nombre de messages : 797
Age : 31
Localisation : En train d'éliminé les deadras de Cyrodiil
Date d'inscription : 09/05/2006

Barre de chargement Empty
MessageSujet: Re: Barre de chargement   Barre de chargement EmptyMar 23 Mai - 23:42

Ca donne un effet de plus au jeu, sa done du réalisme.
Revenir en haut Aller en bas
ziko
Modo
Modo
ziko


Nombre de messages : 216
Date d'inscription : 02/05/2006

Barre de chargement Empty
MessageSujet: Re: Barre de chargement   Barre de chargement EmptyMar 23 Mai - 23:53

oui, on doit attendre un chargement............pour que ça donne plus de réalisme!!!!
Revenir en haut Aller en bas
http://www.eldenor.zikforum.com
Contenu sponsorisé





Barre de chargement Empty
MessageSujet: Re: Barre de chargement   Barre de chargement Empty

Revenir en haut Aller en bas
 
Barre de chargement
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Nom du leader dans Sauvegarde / chargement

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Ultima Graphisme :: Aide, Tuto, Script & Recrutement :: Script-
Sauter vers:  
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser