[résolu]Demande de script : un écran type "PRESS START"
Jeu 5 Mar 2009 - 1:32
Bonjour tout le monde ! ^^
Type de script : Écran Titre
Explication complète : Et bien je souhaiterais un script qui permettrait de faire un écran style "PRESS START" c'est-à-dire un écran avec une image pour fond (à la manière de l'image "Title" dans le dossier System pour l'écran-titre par défaut) et sur cette image de fond une image représentant "PRESS START" ou encore "Pressez la touche Enter" enfin quelque chose dans le genre clignoterait et suite à l'appui de la touche Action par défaut du jeu le script téléportera sur une map (car en fait sur la map en question il y aura un event en démarrage auto qui déclenchera mon menu custom en event et là il y aura : "nouvelle partie", "charger", etc.)
Spécificités : Aucune ^^
Schéma très clair : Les exemples de jeu illustreront mes propos ^^
Ressources supplémentaires : A vrai dire je n'ai pas encore fait les ressources (l'image de fond et l'image "PRESS START") mais le script une fois fini je saurais où les placer ^^
Exemples dans un jeu video:
Merci d'avance à celui qui se dévouera pour faire ce script j'le remercie déjà du fond du coeur ^^
Type de script : Écran Titre
Explication complète : Et bien je souhaiterais un script qui permettrait de faire un écran style "PRESS START" c'est-à-dire un écran avec une image pour fond (à la manière de l'image "Title" dans le dossier System pour l'écran-titre par défaut) et sur cette image de fond une image représentant "PRESS START" ou encore "Pressez la touche Enter" enfin quelque chose dans le genre clignoterait et suite à l'appui de la touche Action par défaut du jeu le script téléportera sur une map (car en fait sur la map en question il y aura un event en démarrage auto qui déclenchera mon menu custom en event et là il y aura : "nouvelle partie", "charger", etc.)
Spécificités : Aucune ^^
Schéma très clair : Les exemples de jeu illustreront mes propos ^^
Ressources supplémentaires : A vrai dire je n'ai pas encore fait les ressources (l'image de fond et l'image "PRESS START") mais le script une fois fini je saurais où les placer ^^
Exemples dans un jeu video:
- Spoiler:
Merci d'avance à celui qui se dévouera pour faire ce script j'le remercie déjà du fond du coeur ^^
Re: [résolu]Demande de script : un écran type "PRESS START"
Jeu 5 Mar 2009 - 1:41
Mister M. a écrit:J'te fais ça Cire humaine (ouais, chouettos, Séru Men, Cire Humaine)
Le press start doit activer la téléportation sur ta map donc?
Ouep exactement et déso pour la description inachevée tout à l'heure j'ai appuyé sur "envoyer" au lieu de "prévisualiser" xD
P.S.: effectivement Séru Men vient du mot cérumen qui désigne la cire d'oreille qu'on a dans les... oreille
- kordarrModérateur
- Nombre de messages : 1838
Age : 33
Localisation : île de la réunion, Le Tampon.
Distinction : Auto-proclamé sex-symbol de la commu'
Frère jumeau de Jonathan ( Secret Story )
Exhibitionniste en herbe
[Mist' & Coco' ]
Fan n°1 de Coco'
Psychopathe en chef
Date d'inscription : 05/11/2008
Re: [résolu]Demande de script : un écran type "PRESS START"
Jeu 5 Mar 2009 - 8:14
Heu je vais être un peu floodesque, mais le cérumen n'est pas de la cire humaine (^^non on peut pas faire de bougie avec). Et aussi ton choix d'écran titre est très révélateur, c'est le sonic megadrive..?
Surtout en répond pas à ce post, parsqu'il est inutile et floodesque bien sur j'aurais pu ne pas le faire et dans 2 minutes je vais l'effacer, mais bon au cas ou tu le lise ne répond pas...
Surtout en répond pas à ce post, parsqu'il est inutile et floodesque bien sur j'aurais pu ne pas le faire et dans 2 minutes je vais l'effacer, mais bon au cas ou tu le lise ne répond pas...
- KsamaMembre
- Nombre de messages : 43
Distinction : aucune
Date d'inscription : 25/01/2009
Re: [résolu]Demande de script : un écran type "PRESS START"
Jeu 5 Mar 2009 - 10:52
Utilisation.
Ligne 35 vous pouvez changer la phrase qui s'affiche.
Ligne 36 le son quand vous précer la touche.
Ligne 37 la touche echap pour revenir à "press start"
Ligne 38 changer l'opacité du texte.
Script
Ligne 35 vous pouvez changer la phrase qui s'affiche.
Ligne 36 le son quand vous précer la touche.
Ligne 37 la touche echap pour revenir à "press start"
Ligne 38 changer l'opacité du texte.
Script
- Spoiler:
- Code:
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
# By: Gando
# 25/5 2008
#------------------------------------------------------------------------------
# INTRODUCTION
#------------------------------------------------------------------------------
#
# This script will display a blinking "Press Start" text in the title screen.
#
#------------------------------------------------------------------------------
# SETUP
#------------------------------------------------------------------------------
#
# Press_Wait - The higher this number is, the longer it will take before the
# text disappear/reappear.
#
# Text - This is the text that is being displayed.
#
# Press_Sound - Here you add the name of the SE sound that you want to have
# when the player press the decision key.
#
# Return_Sound - Here you add the name of the SE sound that you want to have
# when the player press the cancel key.
#
# Text_Background_Opacity - Choose your opacity of your window, between 0-255.
# (0 = Transparent, anything higher will show the window)
#
#------------------------------------------------------------------------------
# CREDITS: Gando.
#==============================================================================
Press_Wait = 100
Text = "Press Start"
Press_Sound = "Decision2"
Return_Sound = "Cancel"
Text_Background_Opacity = 0
class Scene_Title < Scene_Base
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
if $BTEST # If battle test
battle_test # Start battle test
else # If normal play
super # Usual main processing
end
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
load_database # Load database
create_game_objects # Create game objects
check_continue # Determine if continue is enabled
create_title_graphic # Create title graphic
create_command_window # Create command window
play_title_music # Play title screen music
create_press_start
end
#--------------------------------------------------------------------------
# * Execute Transition
#--------------------------------------------------------------------------
def perform_transition
Graphics.transition(20)
end
#--------------------------------------------------------------------------
# * Post-Start Processing
#--------------------------------------------------------------------------
def post_start
super
close_command_window
end
#--------------------------------------------------------------------------
# * Pre-termination Processing
#--------------------------------------------------------------------------
def pre_terminate
super
close_command_window
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_command_window
snapshot_for_background
dispose_title_graphic
dispose_press_start
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
@command_window.update
@window_start.update
if @command_window.active
if Input.trigger?(Input::C)
case @command_window.index
when 0 #New game
command_new_game
when 1 # Continue
command_continue
when 2 # Shutdown
command_shutdown
end
end
end
if @window_start.active
if @gando > 0
@gando -= 1
end
if @gando > (Press_Wait / 2)
@window_start.visible = true
else
@window_start.visible = false
end
if @gando == 0
start_restore
end
end
if @window_start.active
if Input.trigger?(Input::C)
Audio.se_play("Audio/SE/" + Press_Sound, 80, 100)
@window_start.active = false
@window_start.visible = false
@command_window.active = true
@command_window.visible = true
open_command_window
end
end
if Input.trigger?(Input::B)
Audio.se_play("Audio/SE/" + Return_Sound, 80, 100)
close_command_window
@window_start.active = true
@window_start.visible = true
@command_window.active = false
@command_window.visible = false
end
end
#--------------------------------------------------------------------------
# * Start_Restore
#--------------------------------------------------------------------------
def start_restore
@gando = Press_Wait
end
#--------------------------------------------------------------------------
# * Load Database
#--------------------------------------------------------------------------
def load_database
$data_actors = load_data("Data/Actors.rvdata")
$data_classes = load_data("Data/Classes.rvdata")
$data_skills = load_data("Data/Skills.rvdata")
$data_items = load_data("Data/Items.rvdata")
$data_weapons = load_data("Data/Weapons.rvdata")
$data_armors = load_data("Data/Armors.rvdata")
$data_enemies = load_data("Data/Enemies.rvdata")
$data_troops = load_data("Data/Troops.rvdata")
$data_states = load_data("Data/States.rvdata")
$data_animations = load_data("Data/Animations.rvdata")
$data_common_events = load_data("Data/CommonEvents.rvdata")
$data_system = load_data("Data/System.rvdata")
$data_areas = load_data("Data/Areas.rvdata")
end
#--------------------------------------------------------------------------
# * Load Battle Test Database
#--------------------------------------------------------------------------
def load_bt_database
$data_actors = load_data("Data/BT_Actors.rvdata")
$data_classes = load_data("Data/BT_Classes.rvdata")
$data_skills = load_data("Data/BT_Skills.rvdata")
$data_items = load_data("Data/BT_Items.rvdata")
$data_weapons = load_data("Data/BT_Weapons.rvdata")
$data_armors = load_data("Data/BT_Armors.rvdata")
$data_enemies = load_data("Data/BT_Enemies.rvdata")
$data_troops = load_data("Data/BT_Troops.rvdata")
$data_states = load_data("Data/BT_States.rvdata")
$data_animations = load_data("Data/BT_Animations.rvdata")
$data_common_events = load_data("Data/BT_CommonEvents.rvdata")
$data_system = load_data("Data/BT_System.rvdata")
end
#--------------------------------------------------------------------------
# * Create Game Objects
#--------------------------------------------------------------------------
def create_game_objects
$game_temp = Game_Temp.new
$game_message = Game_Message.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
end
#--------------------------------------------------------------------------
# * Determine if Continue is Enabled
#--------------------------------------------------------------------------
def check_continue
@continue_enabled = (Dir.glob('Save*.rvdata').size > 0)
end
#--------------------------------------------------------------------------
# * Create Title Graphic
#--------------------------------------------------------------------------
def create_title_graphic
@sprite = Sprite.new
@sprite.bitmap = Cache.system("Title")
end
#--------------------------------------------------------------------------
# * Dispose of Title Graphic
#--------------------------------------------------------------------------
def dispose_title_graphic
@sprite.bitmap.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
s1 = Vocab::new_game
s2 = Vocab::continue
s3 = Vocab::shutdown
@command_window = Window_Command.new(172, [s1, s2, s3])
@command_window.x = (544 - @command_window.width) / 2
@command_window.y = 288
@command_window.active = false
@command_window.visible = false
if @continue_enabled # If continue is enabled
@command_window.index = 1 # Move cursor over command
else # If disabled
@command_window.draw_item(1, false) # Make command semi-transparent
end
@command_window.openness = 0
@command_window.open
end
#--------------------------------------------------------------------------
# * Create "Press Start" window
#--------------------------------------------------------------------------
def create_press_start
@gando = Press_Wait
@window_start = Window_Start.new # Make "Press Start" window
@window_start.opacity = Text_Background_Opacity # Assign the window opacity.
end
#--------------------------------------------------------------------------
# * Dispose of Command Window
#--------------------------------------------------------------------------
def dispose_command_window
@command_window.dispose
end
#--------------------------------------------------------------------------
# * Dispose of Press start
#--------------------------------------------------------------------------
def dispose_press_start
@window_start.dispose
end
#--------------------------------------------------------------------------
# * Open Command Window
#--------------------------------------------------------------------------
def open_command_window
@command_window.open
begin
@command_window.update
Graphics.update
end until @command_window.openness == 255
end
#--------------------------------------------------------------------------
# * Close Command Window
#--------------------------------------------------------------------------
def close_command_window
@command_window.close
begin
@command_window.update
Graphics.update
end until @command_window.openness == 0
end
#--------------------------------------------------------------------------
# * Play Title Screen Music
#--------------------------------------------------------------------------
def play_title_music
$data_system.title_bgm.play
RPG::BGS.stop
RPG::ME.stop
end
#--------------------------------------------------------------------------
# * Check Player Start Location Existence
#--------------------------------------------------------------------------
def confirm_player_location
if $data_system.start_map_id == 0
print "Player start location not set."
exit
end
end
#--------------------------------------------------------------------------
# * Command: New Game
#--------------------------------------------------------------------------
def command_new_game
confirm_player_location
Sound.play_decision
$game_party.setup_starting_members # Initial party
$game_map.setup($data_system.start_map_id) # Initial map position
$game_player.moveto($data_system.start_x, $data_system.start_y)
$game_player.refresh
$scene = Scene_Map.new
RPG::BGM.fade(1500)
close_command_window
Graphics.fadeout(60)
Graphics.wait(40)
Graphics.frame_count = 0
RPG::BGM.stop
$game_map.autoplay
end
#--------------------------------------------------------------------------
# * Command: Continue
#--------------------------------------------------------------------------
def command_continue
if @continue_enabled
Sound.play_decision
$scene = Scene_File.new(false, true, false)
else
Sound.play_buzzer
end
end
#--------------------------------------------------------------------------
# * Command: Shutdown
#--------------------------------------------------------------------------
def command_shutdown
Sound.play_decision
RPG::BGM.fade(800)
RPG::BGS.fade(800)
RPG::ME.fade(800)
$scene = nil
end
#--------------------------------------------------------------------------
# * Battle Test
#--------------------------------------------------------------------------
def battle_test
load_bt_database # Load battle test database
create_game_objects # Create game objects
Graphics.frame_count = 0 # Initialize play time
$game_party.setup_battle_test_members
$game_troop.setup($data_system.test_troop_id)
$game_troop.can_escape = true
$game_system.battle_bgm.play
snapshot_for_background
$scene = Scene_Battle.new
end
end
#==============================================================================
# ** Window_Start
#------------------------------------------------------------------------------
#
#==============================================================================
class Window_Start < Window_Base
#--------------------------------------------------------------------------
# * Initialization
#--------------------------------------------------------------------------
def initialize
super(210, 300, 130, 50)
self.contents = Bitmap.new(width - 32, height - 32)
self.visible = false
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.draw_text(0, -45, 100, 100, Text, 0)
end
end
Re: [résolu]Demande de script : un écran type "PRESS START"
Jeu 5 Mar 2009 - 12:22
Merci énormément Ksama !
@kordarr => L'écran sonic n'est qu'un exemple tiré d'un jeu
Edit : mais ce n'est pas réellement ce que je voulais moi je voudrais que le Press Start soit une image et non un texte.
Tiens voilà j'ai fait un exemple de PRESS START (il est moche je l'ai fait en 5 minutes ^^')
En+ après avoir appuyer sur entrée je devrais me retrouver sur une map et non sur l'écran titre normale
@kordarr => L'écran sonic n'est qu'un exemple tiré d'un jeu
Edit : mais ce n'est pas réellement ce que je voulais moi je voudrais que le Press Start soit une image et non un texte.
Tiens voilà j'ai fait un exemple de PRESS START (il est moche je l'ai fait en 5 minutes ^^')
En+ après avoir appuyer sur entrée je devrais me retrouver sur une map et non sur l'écran titre normale
- yamazakiMembre
- Nombre de messages : 74
Distinction : aucune
Date d'inscription : 26/12/2008
Re: [résolu]Demande de script : un écran type "PRESS START"
Jeu 5 Mar 2009 - 13:07
la map sur laquelle tu dois être téléporter ne change pas
si tu utilise une partie sauvegardée?
si tu utilise une partie sauvegardée?
Re: [résolu]Demande de script : un écran type "PRESS START"
Jeu 5 Mar 2009 - 13:11
yamazaki a écrit:la map sur laquelle tu dois être téléporter ne change pas
si tu utilise une partie sauvegardée?
Mais lisez mon post d'introduction bon sang !
Je cite : "suite à l'appui de la touche Action par défaut du jeu le script téléportera sur une map (car en fait sur la map en question il y aura un event en démarrage auto qui déclenchera mon menu custom en event et là il y aura : "nouvelle partie", "charger", etc.)"
- KsamaMembre
- Nombre de messages : 43
Distinction : aucune
Date d'inscription : 25/01/2009
Re: [résolu]Demande de script : un écran type "PRESS START"
Jeu 5 Mar 2009 - 13:12
Il suffit de mettre à a ligne 35 l'affichage d'un image, mais je ne sais pas comment faire ...
Re: [résolu]Demande de script : un écran type "PRESS START"
Jeu 5 Mar 2009 - 13:25
Ksama a écrit:Il suffit de mettre à a ligne 35 l'affichage d'un image, mais je ne sais pas comment faire ...
Ligne 35 :
- Code:
Text = "Press Start"
Pour moi c'est pas une image ça c'est du texte
- yamazakiMembre
- Nombre de messages : 74
Distinction : aucune
Date d'inscription : 26/12/2008
Re: [résolu]Demande de script : un écran type "PRESS START"
Jeu 5 Mar 2009 - 14:10
voici le script que j'ai fait
les instruction sont au début de celui ci
les instruction sont au début de celui ci
- Spoiler:
- Code:
module Yama
HAUT = 80 #hauteur de l'image
LARG = 532 #largeur de l'image
OPACITE=0 #opacité de la fenetre
TEMPS= 80 #temps de clignotement
FOND = "fond" # image de fond
end
=begin
copier l'image press_start et coller le dans le dossier pictures de taille de préférence 500x 52
pour l'image de fond placer votre image dans le dossier picture
=end
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
# This class performs the title screen processing.
#==============================================================================
class Scene_Title < Scene_Base
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
if $BTEST # If battle test
battle_test # Start battle test
else # If normal play
super # Usual main processing
end
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
load_database # Load database
create_game_objects # Create game objects
check_continue # Determine if continue is enabled
create_title_graphic # Create title graphic
@titre_window = Window_Title.new
@titre_window.x= (272-(Yama::LARG/2))
@titre_window.y=(208-(Yama::HAUT/2))
play_title_music # Play title screen music
end
#--------------------------------------------------------------------------
# * Execute Transition
#--------------------------------------------------------------------------
def perform_transition
Graphics.transition(20)
end
#--------------------------------------------------------------------------
# * Post-Start Processing
#--------------------------------------------------------------------------
def post_start
super
end
#--------------------------------------------------------------------------
# * Pre-termination Processing
#--------------------------------------------------------------------------
def pre_terminate
super
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
@titre_window.dispose
snapshot_for_background
dispose_title_graphic
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
@titre_window.update
if Input.trigger?(Input::C)
command_new_game
end
end
#--------------------------------------------------------------------------
# * Load Database
#--------------------------------------------------------------------------
def load_database
$data_actors = load_data("Data/Actors.rvdata")
$data_classes = load_data("Data/Classes.rvdata")
$data_skills = load_data("Data/Skills.rvdata")
$data_items = load_data("Data/Items.rvdata")
$data_weapons = load_data("Data/Weapons.rvdata")
$data_armors = load_data("Data/Armors.rvdata")
$data_enemies = load_data("Data/Enemies.rvdata")
$data_troops = load_data("Data/Troops.rvdata")
$data_states = load_data("Data/States.rvdata")
$data_animations = load_data("Data/Animations.rvdata")
$data_common_events = load_data("Data/CommonEvents.rvdata")
$data_system = load_data("Data/System.rvdata")
$data_areas = load_data("Data/Areas.rvdata")
end
#--------------------------------------------------------------------------
# * Load Battle Test Database
#--------------------------------------------------------------------------
def load_bt_database
$data_actors = load_data("Data/BT_Actors.rvdata")
$data_classes = load_data("Data/BT_Classes.rvdata")
$data_skills = load_data("Data/BT_Skills.rvdata")
$data_items = load_data("Data/BT_Items.rvdata")
$data_weapons = load_data("Data/BT_Weapons.rvdata")
$data_armors = load_data("Data/BT_Armors.rvdata")
$data_enemies = load_data("Data/BT_Enemies.rvdata")
$data_troops = load_data("Data/BT_Troops.rvdata")
$data_states = load_data("Data/BT_States.rvdata")
$data_animations = load_data("Data/BT_Animations.rvdata")
$data_common_events = load_data("Data/BT_CommonEvents.rvdata")
$data_system = load_data("Data/BT_System.rvdata")
end
#--------------------------------------------------------------------------
# * Create Game Objects
#--------------------------------------------------------------------------
def create_game_objects
$game_temp = Game_Temp.new
$game_message = Game_Message.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
end
#--------------------------------------------------------------------------
# * Create Title Graphic
#--------------------------------------------------------------------------
def create_title_graphic
@sprite = Sprite.new
@sprite.bitmap = Cache.picture(Yama::FOND)
end
#--------------------------------------------------------------------------
# * Dispose of Title Graphic
#--------------------------------------------------------------------------
def dispose_title_graphic
@sprite.bitmap.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
# * Play Title Screen Music
#--------------------------------------------------------------------------
def play_title_music
$data_system.title_bgm.play
RPG::BGS.stop
RPG::ME.stop
end
#--------------------------------------------------------------------------
# * Check Player Start Location Existence
#--------------------------------------------------------------------------
def confirm_player_location
if $data_system.start_map_id == 0
print "Player start location not set."
exit
end
end
#--------------------------------------------------------------------------
# * Command: New Game
#--------------------------------------------------------------------------
def command_new_game
confirm_player_location
Sound.play_decision
$game_party.setup_starting_members # Initial party
$game_map.setup($data_system.start_map_id) # Initial map position
$game_player.moveto($data_system.start_x, $data_system.start_y)
$game_player.refresh
$scene = Scene_Map.new
RPG::BGM.fade(1500)
Graphics.fadeout(60)
Graphics.wait(40)
Graphics.frame_count = 0
RPG::BGM.stop
$game_map.autoplay
end
#--------------------------------------------------------------------------
# * Battle Test
#--------------------------------------------------------------------------
def battle_test
load_bt_database # Load battle test database
create_game_objects # Create game objects
Graphics.frame_count = 0 # Initialize play time
$game_party.setup_battle_test_members
$game_troop.setup($data_system.test_troop_id)
$game_troop.can_escape = true
$game_system.battle_bgm.play
snapshot_for_background
$scene = Scene_Battle.new
end
end
class Window_Title<Window_Selectable
def initialize
super(0,0,Yama::LARG,Yama::HAUT)
@column_max=1
@temps=Yama::TEMPS
self.opacity=0
self.index = 0
refresh
end
def refresh
@data = []
@data.push("press start")
@item_max=@data.size
create_contents
for i in 0...@item_max
draw_item(i)
end
end
def draw_item(index)
rect = item_rect(index)
self.contents.clear_rect(rect)
name = @data[index]
if name != nil
rect.width -= 4
draw_img(index,rect)
end
end
def draw_img(item,rect)
if item != nil
bitmap = Cache.picture("press_start")
cadre= Rect.new(0,-10, Yama::LARG-32, Yama::HAUT+10)
if @temps<Yama::TEMPS/2
self.contents.stretch_blt(rect,bitmap,cadre,0)
if @temps == 0
@temps=Yama::TEMPS
end
else
self.contents.stretch_blt(rect,bitmap,cadre,255)
end
end
end
alias yama_update update
def update
refresh
@temps-=1
yama_update
end
end
Re: [résolu]Demande de script : un écran type "PRESS START"
Jeu 5 Mar 2009 - 14:58
Hey bravo ça se rapproche à mort de ce que je veux ^^
Mais il y a encore quelques trucs :
- Est-ce possible de garder la taille d'origine de l'image sans avoir à la configurer dans le script ? (car de ce côté-là mon image est hyper aplati et j'ai changé la valeur de hauteur d'image mais rien n'y fait mon PRESS START est illisible)
- Ensuite est-ce possible que le sélecteur (comme dans les choix) ne soit pas visible c'est à dire qu'il n'y a que l'image qui clignote et rien autour.
- Sinon tout va bien à part ça
Mais il y a encore quelques trucs :
- Est-ce possible de garder la taille d'origine de l'image sans avoir à la configurer dans le script ? (car de ce côté-là mon image est hyper aplati et j'ai changé la valeur de hauteur d'image mais rien n'y fait mon PRESS START est illisible)
- Ensuite est-ce possible que le sélecteur (comme dans les choix) ne soit pas visible c'est à dire qu'il n'y a que l'image qui clignote et rien autour.
- Sinon tout va bien à part ça
- yamazakiMembre
- Nombre de messages : 74
Distinction : aucune
Date d'inscription : 26/12/2008
Re: [résolu]Demande de script : un écran type "PRESS START"
Jeu 5 Mar 2009 - 16:29
utilise ce script alors
- Spoiler:
- Code:
module Yama
TEMPS= 80 #temps de clignotement
FOND = "fond" # image de fond
end
=begin
copier l'image press_start et coller le dans le dossier pictures de taille de préférence 500x 52
pour l'image de fond placer votre image dans le dossier picture
=end
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
# This class performs the title screen processing.
#==============================================================================
class Scene_Title < Scene_Base
def initialize
@temps=Yama::TEMPS
@img=Sprite.new
draw_img
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
if $BTEST # If battle test
battle_test # Start battle test
else # If normal play
super # Usual main processing
end
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
load_database # Load database
create_game_objects # Create game objects
check_continue # Determine if continue is enabled
create_title_graphic # Create title graphic
play_title_music # Play title screen music
end
#--------------------------------------------------------------------------
# * Execute Transition
#--------------------------------------------------------------------------
def perform_transition
Graphics.transition(20)
end
#--------------------------------------------------------------------------
# * Post-Start Processing
#--------------------------------------------------------------------------
def post_start
super
end
#--------------------------------------------------------------------------
# * Pre-termination Processing
#--------------------------------------------------------------------------
def pre_terminate
super
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
@img.dispose
snapshot_for_background
dispose_title_graphic
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
draw_img
@temps-=1
if Input.trigger?(Input::C)
command_new_game
end
end
#--------------------------------------------------------------------------
# * Load Database
#--------------------------------------------------------------------------
def load_database
$data_actors = load_data("Data/Actors.rvdata")
$data_classes = load_data("Data/Classes.rvdata")
$data_skills = load_data("Data/Skills.rvdata")
$data_items = load_data("Data/Items.rvdata")
$data_weapons = load_data("Data/Weapons.rvdata")
$data_armors = load_data("Data/Armors.rvdata")
$data_enemies = load_data("Data/Enemies.rvdata")
$data_troops = load_data("Data/Troops.rvdata")
$data_states = load_data("Data/States.rvdata")
$data_animations = load_data("Data/Animations.rvdata")
$data_common_events = load_data("Data/CommonEvents.rvdata")
$data_system = load_data("Data/System.rvdata")
$data_areas = load_data("Data/Areas.rvdata")
end
#--------------------------------------------------------------------------
# * Load Battle Test Database
#--------------------------------------------------------------------------
def load_bt_database
$data_actors = load_data("Data/BT_Actors.rvdata")
$data_classes = load_data("Data/BT_Classes.rvdata")
$data_skills = load_data("Data/BT_Skills.rvdata")
$data_items = load_data("Data/BT_Items.rvdata")
$data_weapons = load_data("Data/BT_Weapons.rvdata")
$data_armors = load_data("Data/BT_Armors.rvdata")
$data_enemies = load_data("Data/BT_Enemies.rvdata")
$data_troops = load_data("Data/BT_Troops.rvdata")
$data_states = load_data("Data/BT_States.rvdata")
$data_animations = load_data("Data/BT_Animations.rvdata")
$data_common_events = load_data("Data/BT_CommonEvents.rvdata")
$data_system = load_data("Data/BT_System.rvdata")
end
#--------------------------------------------------------------------------
# * Create Game Objects
#--------------------------------------------------------------------------
def create_game_objects
$game_temp = Game_Temp.new
$game_message = Game_Message.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
end
#--------------------------------------------------------------------------
# * Create Title Graphic
#--------------------------------------------------------------------------
def create_title_graphic
@sprite = Sprite.new
@sprite.bitmap = Cache.picture(Yama::FOND)
end
#--------------------------------------------------------------------------
# * Dispose of Title Graphic
#--------------------------------------------------------------------------
def dispose_title_graphic
@sprite.bitmap.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
# * Play Title Screen Music
#--------------------------------------------------------------------------
def play_title_music
$data_system.title_bgm.play
RPG::BGS.stop
RPG::ME.stop
end
#--------------------------------------------------------------------------
# * Check Player Start Location Existence
#--------------------------------------------------------------------------
def confirm_player_location
if $data_system.start_map_id == 0
print "Player start location not set."
exit
end
end
#--------------------------------------------------------------------------
# * Command: New Game
#--------------------------------------------------------------------------
def command_new_game
confirm_player_location
Sound.play_decision
$game_party.setup_starting_members # Initial party
$game_map.setup($data_system.start_map_id) # Initial map position
$game_player.moveto($data_system.start_x, $data_system.start_y)
$game_player.refresh
$scene = Scene_Map.new
RPG::BGM.fade(1500)
Graphics.fadeout(60)
Graphics.wait(40)
Graphics.frame_count = 0
RPG::BGM.stop
$game_map.autoplay
end
#--------------------------------------------------------------------------
# * Battle Test
#--------------------------------------------------------------------------
def battle_test
load_bt_database # Load battle test database
create_game_objects # Create game objects
Graphics.frame_count = 0 # Initialize play time
$game_party.setup_battle_test_members
$game_troop.setup($data_system.test_troop_id)
$game_troop.can_escape = true
$game_system.battle_bgm.play
snapshot_for_background
$scene = Scene_Battle.new
end
def draw_img
@img.bitmap = Cache.picture("press_start")
@img.x=272-@img.width/2
@img.y=208-@img.height/2
if @temps<Yama::TEMPS/2
@img.opacity=0
if @temps == 0
@temps=Yama::TEMPS
end
else
@img.opacity=255
end
end
end
Re: [résolu]Demande de script : un écran type "PRESS START"
Jeu 5 Mar 2009 - 17:14
Alors là c'est parfait merci du fond du cœur Yama je pense que tu devrais même le poster dans la partie Écran Titre des scripts RGSS 2
Et encore merci !
Et encore merci !
- KsamaMembre
- Nombre de messages : 43
Distinction : aucune
Date d'inscription : 25/01/2009
Re: [résolu]Demande de script : un écran type "PRESS START"
Jeu 5 Mar 2009 - 17:18
C'est même pas lui qui as fait le script, il a juste repris celui qui j'ai poster et a modifier 2 lignesje pense que tu devrais même le poster dans la partie Écran Titre des scripts RGSS 2
Re: [résolu]Demande de script : un écran type "PRESS START"
Jeu 5 Mar 2009 - 17:39
Ksama a écrit:C'est même pas lui qui as fait le script, il a juste repris celui qui j'ai poster et a modifier 2 lignesje pense que tu devrais même le poster dans la partie Écran Titre des scripts RGSS 2
Je sais mais il a qu'à mettre le nom de l'auteur original et mettre modifié par Yamasaki et puis 2 lignes c'est toujours deux lignes c'est juste qu'il y a 2 pseudos à mettre dans les crédits au lieu d'un seul c'tout ^^
- yamazakiMembre
- Nombre de messages : 74
Distinction : aucune
Date d'inscription : 26/12/2008
Re: [résolu]Demande de script : un écran type "PRESS START"
Jeu 5 Mar 2009 - 17:45
Ksama a écrit:C'est même pas lui qui as fait le script, il a juste repris celui qui j'ai poster et a modifier 2 lignesje pense que tu devrais même le poster dans la partie Écran Titre des scripts RGSS 2
c'est moi qui est fait ce script.
je suis parti du scene title de base de RMVX et je l'ai modifié
Si tu compares les 2 scripts tu verras qu'il y'a
une énorme différence
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum
|
|