Jump to content
Rpg²S Forum
  • 0

scene_menu help me!!


Darkshiva
 Share

Question

Allora io come sid ho creato un menu con lo script generator.Ma il mio problema è diverso.

Questo è lo script:

 

#===================================================

# - CLASS Your_Scene Begins

#===================================================

class Your_Scene

 

#---------------------------------------------------------------------------------

def initialize

end

#---------------------------------------------------------------------------------

 

def main

@window1 = Window1.new

@window1.x =0

@window1.y =0

@window1.height = 57

@window1.width = 641

#@window1.z = 200

 

@window2 = Window2.new

@window2.x =0

@window2.y =57

@window2.height = 424

@window2.width = 149

#@window2.z = 200

 

@window3 = Window3.new

@window3.x =148

@window3.y =57

@window3.height = 424

@window3.width = 493

#@window3.z = 200

 

Graphics.transition

loop do

Graphics.update

Input.update

#update

if $scene != self

break

end

end

 

Graphics.freeze

@window1.dispose

@window2.dispose

@window3.dispose

 

end

#---------------------------------------------------------------------------------

 

#---------------------------------------------------------------------------------

def update

end

#---------------------------------------------------------------------------------

 

end

#===================================================

# - CLASS Your_Scene Ends

#===================================================

 

 

 

#===================================================

# - CLASS Window1 Begins

#===================================================

 

class Window1 < Window_Base

 

#---------------------------------------------------------------------------------

def initialize

super(0, 0, 641,57)

self.contents = Bitmap.new(width - 32, height - 32)

self.contents.font.name = "Tahoma"

self.contents.font.size = 22

self.contents.font.color = text_color(0)

self.contents.draw_text(0, 0, 33, 33, "1")

end

#---------------------------------------------------------------------------------

 

end

#===================================================

# - CLASS Window1 Ends

#===================================================

 

 

#===================================================

# - CLASS Window2 Begins

#===================================================

 

class Window2 < Window_Base

 

#---------------------------------------------------------------------------------

def initialize

super(0, 0, 149,424)

self.contents = Bitmap.new(width - 32, height - 32)

self.contents.font.name = "Tahoma"

self.contents.font.size = 22

self.contents.font.color = text_color(0)

self.contents.draw_text(0, 0, 33, 33, "2")

end

#---------------------------------------------------------------------------------

 

end

#===================================================

# - CLASS Window2 Ends

#===================================================

 

 

#===================================================

# - CLASS Window3 Begins

#===================================================

 

class Window3 < Window_Base

 

#---------------------------------------------------------------------------------

def initialize

super(0, 0, 493,424)

self.contents = Bitmap.new(width - 32, height - 32)

self.contents.font.name = "Tahoma"

self.contents.font.size = 22

self.contents.font.color = text_color(0)

self.contents.draw_text(0, 0, 33, 33, "3")

end

#---------------------------------------------------------------------------------

 

end

#===================================================

# - CLASS Window3 Ends

#===================================================

 

Questo è il mio menu.Sono delle colonne vuote ma io vorrei inserire i comandi oggetti,equip,ecc...nella colonna di sinistra.Fatto cio il resto lo so fare da me(Sempre se ci riesco).

Spero che qualcuno di voi mi aiuti e che questo topic non sia uno di quelli che occupano spazio inutilmente nel forum. :rolleyes:

Link to comment
Share on other sites

Recommended Posts

  • 0
Cosa intendi con "esca premendo esc"?

Partecipante al Rpg2s.net Game Contest 2008/2009
http://www.rpg2s.net/contest/GameContest0809/gc0809-bannerino.jpg
Gioco in Sviluppo: Oromis' Tale

Premi Rpg2s.net Game Contest 2008/2009:
http://www.rpg2s.net/gif/GC_programmazione2.gif Miglior Programmazione XP: 2°
http://www.rpg2s.net/gif/GC_premio3.gif Longevità: 3°

Hiken... Tsubame Gaeshi!

Link to comment
Share on other sites

  • 0
  • 0

If input.trigger:: B

$scene = Scene_menu.new (4)

return

end

 

all'interno del def update

 

il codice sicuramente leggermente sbagliato ricopialo

http://img256.imageshack.us/img256/7639/ihateyou.gif

Un uomo senza religione è come un pesce senza bicicletta.

http://img18.imageshack.us/img18/3668/decasoft1.png

http://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif

Link to comment
Share on other sites

  • 0
  • 0
torno a casa e edito il messaggio , ricordati che vainserito nella scene non nella window

http://img256.imageshack.us/img256/7639/ihateyou.gif

Un uomo senza religione è come un pesce senza bicicletta.

http://img18.imageshack.us/img18/3668/decasoft1.png

http://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif

Link to comment
Share on other sites

  • 0
  • 0

va nella scene dove c'è il def update

 

if Input.trigger?(Input::B)

# Play cancel SE

$game_system.se_play($data_system.cancel_se)

# Switch to menu screen

$scene = Scene_Menu.new(3)

return

end

Edited by MasterSion

http://img256.imageshack.us/img256/7639/ihateyou.gif

Un uomo senza religione è come un pesce senza bicicletta.

http://img18.imageshack.us/img18/3668/decasoft1.png

http://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif

Link to comment
Share on other sites

  • 0

Allora io ho fatto questo(Quello ke ho io è molto più completo ma a me serve per un esempio)

 

class Window_Status < Window_Base

 

def initialize

super(148, 0, 492, 479)

self.contents = Bitmap.new(width - 32, height - 32)

 

refresh

end

 

 

def refresh

# per pulire la superficie

self.contents.clear

# Variabile

actor = $game_actors[1]

# Font del testo

self.contents.font.name = "Arial"

# Grandezza della scritta

self.contents.font.size = 24

# Colore della scritta

self.contents.font.color = system_color

# Nome del PG

draw_actor_name(actor, 148, 0)

# Attiva la scritta in grossetto

self.contents.font.bold = false

# Attiva la scritta in corsivo

self.contents.font.italic = false

# Classe del pg

draw_actor_class(actor, 250, 0)

# Livello del pg

draw_actor_level(actor, 0, 50)

end

 

end

 

ecco io h fatto tutto qua e non ho creato nessuna scena_status.Per cui mi dovresti spiegare un po tu come farlo perchè penso di aver commesso lo stesso errore anche con il menu infatti me lo hai dovuto fare te..

cmq ma il tutorial di sleeping allora a cosa serve se non ci puoi fare nulla apparte una schermata che poi neanche si chiude?

cmq2 spero mi potiate aiutare a caire.

Link to comment
Share on other sites

  • 0

Allora una volta che fai una window

crei una scena

all'interno della scena ci inserisci la window e l' Input.

Per far apparire una finestra all'interno di una scena

devi scrivere @stica*** = il nome della tua finestra.new

http://img256.imageshack.us/img256/7639/ihateyou.gif

Un uomo senza religione è come un pesce senza bicicletta.

http://img18.imageshack.us/img18/3668/decasoft1.png

http://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif

Link to comment
Share on other sites

  • 0

ok risolto.

Ora come puoi vedere ho fatto che la schermata non si apra totalmente infatti c'è uno spazio vuoto.Io vorrei che lo status si sovraponesse al menu.Nel senso che lo status si apra al posto di quella schermata in cui ci sono i parametri ma quando premo esc lo status si chiude e torni tutto come prima

Edited by Darkshiva
Link to comment
Share on other sites

  • 0
Non ho capito niente dove la vuoi mettere sta finestra ??

http://img256.imageshack.us/img256/7639/ihateyou.gif

Un uomo senza religione è come un pesce senza bicicletta.

http://img18.imageshack.us/img18/3668/decasoft1.png

http://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif

Link to comment
Share on other sites

  • 0

allora...io apro il menu e trovo il menu ke mi hai fatto(ci siamo!?)ora io vado con il cursore sul comando status,e il menu mi si apre ma dietro invece di vedere lo sfondo nero vorrei far vedere il pezzo del menu(quello con scritto oggetti ecc.....ma senza che interferisca con il menu status.

Se non hai capito ora dimmelo ke ti faccio un montaggio delle immagini con photoshop!!

 

Grazie di tutto!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...