Rpg˛S Forum uses cookies. Read the Privacy Policy for more info. To remove this message, please click the button to the right:    I accept the use of cookies

Vai al contenuto

Rpg˛S Forum uses cookies. Read the Privacy Policy for more info. To remove this message, please click the button to the right:    I accept the use of cookies

Screen Contest #90

Kamikun






  • Si prega di effettuare il log in prima di rispondere
Cambiare pagina evento via script - - - - -

    Squall_Leonheart
  • Alex (Rm2k)

  • Utenti
  • Rens: 92
  • 0
  • StellettaStellettaStellettaStellettaStelletta
  • 1388 messaggi
  • Sesso:Maschio
  • Provenienza:Salerno
  • Abilitā:Maestro

#1 Inviato 09 June 2020 - 21:51 PM

Ciao ragazzi!
Esiste uno script che consenta di cambiare pagina ad un evento attraverso un semplice comando?

In giro ho trovato questo ma non funziona...


 

=begin
EST - SIMPLE EVENT PAGES CONTROLLER
v.1.2a
Author: Estriole

also credits: 
1) Tsukihime
for giving me inspiration to create this script.
2) Killozapit
for giving me idea to use actual event pages so it can used by other event
  
Version History
v.1.0  - 2013-01-13 - finish the script
v.1.1  - 2013-01-16 - add ability to change event force page by name using string
                      or regexp.
                      example string: set_event_force_page(4,"test 1",3)
                      this will change all event with the name test 1 (not case sensitive)
                      example regexp: set_event_force_page(4,/test (.*)/i,3)
                      this will change all event that contain test x in name. 
                      so event with these name will change it's force page:
                      test 1, test 2, test 3, battle test 1, battle test abc, etc
                      this feature only useful for people who generate event ingame
                      using either event spawner, copier, etc. since they won't know the id
                      of that event until generated.
v.1.2  - 2013-01-18 - add function to use other event pages by setting the force page
                      to RPG::Event:Page object. also added new game interpreter
                      method to make even beginner able to use it. :D(hopefully)
v.1.2a - 2013-01-18 - fix some error with new method if map/event not exist.
                      also renamed the script (change system to controller) to
                      describe this script better. (i decide to stick with simple word :D)
                      
Introduction
Did you have many pages event and have hard time setting it right. this might be
your answer. by default the event page system is like this:
from the last page it check for that page condition. if condition met than use that
page. 

Imagine if your event pages is 100. and at start it use page 100. then you want by
choosing something in page 100 will make the event goes to page 1.
if default system you need to make ALL the event page 2 to 100 condition to NOT met.
this could cost you a whole lots of Switches...

this script make you able to bypass those. now you can just specify the event pages
you want to the event to use. and if not set it still use default event pages system.
if you want simpler explanation. just imagine this as label and go to label command.
but for pages.

and i also add that that chosen page also get checked for it's condition. so if that
chosen page condition not met it will be no page selected (blank event)

example i have these event pages:
page 1 - condition switch 1 on - set force page to page 2
page 2 - condition none - do something
page 3 - condition none - set force page to page 1

the event will be use page 3 (since you havent interact / turn on /off switch and also
because that last page condition is met thus that last page used)

then by talking to that event you set force page to page 1.
but you haven't turn on the switch 1 so it will be blank event. then when you
turn on switch 1. that event will use page 1. and by talking to that event will
proceed to page 2. and by talking again to event it will do something
note: should i make demo about this? i think it's clear enough.

you could also make all the pages without condition and then treat it like go to page.
just remember the event will pick your last page at the first time

How to use
1) Script call:

set_this_event_force_page(page_id)

->this will set current event to that page id

2) Script call:

set_event_force_page(map_id,event_id,page_id)

->this will set event id in that map id to that page id
->from 1.1 above: event_id can be number/event name/ regexp format

you could set the page_id to nil for both method to use default event page system

*** new from v.1.2 above ***
3) Script call:

event_use_page(map_id,event_id,source_map_id,source_event_id,source_page_id)

->this will set event id in that map id to use page from another event.
->event_id can be number/event name/ regexp format
->source_event_id cannot use event name/regexp. it must be number.

you could set the page_id to nil for both method to use default event page system


Compatibility
i think this compatible with most script. and it also don't break existing project.
since existing project event don't have force page set for them thus using default
event page system.

=end
class Game_Event < Game_Character
  attr_accessor :force_page  
  attr_reader   :event  
  alias est_force_event_page_find_page find_proper_page
  def find_proper_page
    return [@force_page].find{|page| conditions_met?(page)} if @force_page.is_a?(RPG::Event::Page) 
    if @force_page && @force_page > 0 && @force_page <= @event.pages.size
    return [@event.pages[@force_page-1]].find{|page| conditions_met?(page)}
    end
    est_force_event_page_find_page
  end
end

class Game_Interpreter
  def set_this_event_force_page(page_id)
    $game_map.force_pages[@map_id] = {} if !$game_map.force_pages[@map_id]
    $game_map.force_pages[@map_id][@event_id] = page_id
    $game_map.events[@event_id].force_page = page_id
    $game_map.refresh
  end
  def set_event_force_page(map_id,event_id,page_id)
    $game_map.force_pages[map_id] = {} if !$game_map.force_pages[map_id]
    $game_map.force_pages[map_id][event_id] = page_id
    if @map_id == map_id
      event_id = $game_map.get_event_id_by_name(event_id) if event_id.is_a?(String) or event_id.is_a?(Regexp)
      event_id = [event_id] if event_id.is_a?(Fixnum)
      event_id = event_id.to_a if !event_id.is_a?(Array)
      return if event_id == nil
      event_id.each do |id|  
        if $game_map.events[id]
        $game_map.events[id].force_page = page_id
        $game_map.refresh
        end #end if 
      end #end do
    end #end if
  end #end def
  def event_use_page(map_id,event_id,source_map_id,source_event_id,source_page_id)
    map = load_data(sprintf("Data/Map%03d.rvdata2", source_map_id)) rescue nil
    #event = map.events[source_event_id] rescue nil#if map
    page = map.events[source_event_id].pages[source_page_id-1] rescue nil#if event
    return if !page
    $game_map.force_pages[map_id] = {} if !$game_map.force_pages[map_id]
    $game_map.force_pages[map_id][event_id] = page
    if @map_id == map_id
      event_id = $game_map.get_event_id_by_name(event_id) if event_id.is_a?(String) or event_id.is_a?(Regexp)
      event_id = [event_id] if event_id.is_a?(Fixnum)
      event_id = event_id.to_a if !event_id.is_a?(Array)
      return if event_id == nil
      event_id.each do |id|  
        if $game_map.events[id]
        $game_map.events[id].force_page = page
        $game_map.refresh
        end #end if 
      end #end do
    end #end if
  end #end def set event force page pm
end #end class game interpreter

class Game_Map
  attr_accessor :force_pages
  alias est_force_event_page_game_map_init initialize
  def initialize
    est_force_event_page_game_map_init
    @force_pages = {}
  end

  alias est_force_event_page_setup_events setup_events
  def setup_events
      est_force_event_page_setup_events
      if @force_pages[@map_id]
        @force_pages[@map_id].each do |key,value|
          ids = key
          ids = get_event_id_by_name(key) if ids.is_a?(String) or ids.is_a?(Regexp)
          ids = [ids] if ids.is_a?(Fixnum)
          ids = ids.to_a if !ids.is_a?(Array)
          next if !ids
          ids.each do |id|
            @events[id].force_page = value if @events[id]
          end
        end
      end
      refresh
      refresh_tile_events
  end
  
  def get_event_id_by_name(string)
    event = []
     @events.each do |key,value|
       if string.is_a?(String)
       event.push(value) if value.name.upcase == string.upcase 
       else
       event.push(value) if string.match(value.name)
       #event.push(value) if value.name.match(string)
       end
     end
    return false if !event
    return id = event.collect{|ev|ev.id}
  end  
end

 


Iscriviti sul mio canale youtube -

https://www.youtube....w_as=subscriber

Seguimi su Instagram -

https://www.instagra...stralguitarist/

---------------------------------------------------------------------------------------------------------------------------------------
Contest vinti
---------------------------------------------------------------------------------------------------------------------------------------

FACE CONTEST # 3
BANNER CONTEST #69


    Guardian of Irael
  • Coniglietto Rosso

  • Rpg˛S Admin
  • Rens: 195
  • 19
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 58424 messaggi
  • Sesso:Maschio
  • Provenienza:Bagnaia (Viterbo)
  • Abilitā:Apprendista


#2 Inviato 09 June 2020 - 21:54 PM

Nell'altro sportello avevo suggerito una cosa, non so se l'hai vista: semplicemente attivare tramite script una switch che appunto attiva la nuova pagina.

Serve per forza forzare manualmente via script il cambio pagina? Non ritorni sulla mappa per averlo automatico? ^ ^


(\_/)
(^ ^) <----coniglietto rosso, me!     
(> <)

 
Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^
 
KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^
 
FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^  
 
REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

Spoiler


    Squall_Leonheart
  • Alex (Rm2k)

  • Utenti
  • Rens: 92
  • 0
  • StellettaStellettaStellettaStellettaStelletta
  • 1388 messaggi
  • Sesso:Maschio
  • Provenienza:Salerno
  • Abilitā:Maestro

#3 Inviato 10 June 2020 - 13:32 PM

Nell'altro sportello avevo suggerito una cosa, non so se l'hai vista: semplicemente attivare tramite script una switch che appunto attiva la nuova pagina.

Serve per forza forzare manualmente via script il cambio pagina? Non ritorni sulla mappa per averlo automatico? ^ ^

Guardian ma dove posso trovare diciamo tutti i comandi della sintassi? Principalmente ho questo problema.

Riguardo la switch avevo pensato di assegnargli una $game_local_switches[A] == true ma nemmeno funziona >.<

Il problema principale subentra perché attraverso una Scene devo cambiare pagina all'evento. O il mio comando è sbagliato (probabile) oppure devo passare ad una switch non locale.

Tu cosa mi consigli?
 


Iscriviti sul mio canale youtube -

https://www.youtube....w_as=subscriber

Seguimi su Instagram -

https://www.instagra...stralguitarist/

---------------------------------------------------------------------------------------------------------------------------------------
Contest vinti
---------------------------------------------------------------------------------------------------------------------------------------

FACE CONTEST # 3
BANNER CONTEST #69


    Guardian of Irael
  • Coniglietto Rosso

  • Rpg˛S Admin
  • Rens: 195
  • 19
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 58424 messaggi
  • Sesso:Maschio
  • Provenienza:Bagnaia (Viterbo)
  • Abilitā:Apprendista


#4 Inviato 10 June 2020 - 13:43 PM

Purtroppo non ho un topic dedicato ai comandi di XP. Se cerchi che emulano gli eventi li trovi nello script interpreter, ma c'è da capirli ed individuarli.

^ ^

 

Per la switch locale non ha senso quel codice, cioè la switch locale si riferisce ad un preciso evento di una precisa mappa, quindi gli servono sicuramente altri pezzi per capire di quale evento si tratta.

La switch normale dovrebbe comunque funzionare.

^ ^

 

$game_self_switches[[mapid, idevento, 'A']] = true

$game_map.need_refresh = true


(\_/)
(^ ^) <----coniglietto rosso, me!     
(> <)

 
Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^
 
KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^
 
FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^  
 
REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

Spoiler


    Squall_Leonheart
  • Alex (Rm2k)

  • Utenti
  • Rens: 92
  • 0
  • StellettaStellettaStellettaStellettaStelletta
  • 1388 messaggi
  • Sesso:Maschio
  • Provenienza:Salerno
  • Abilitā:Maestro

#5 Inviato 10 June 2020 - 14:29 PM


 

$game_self_switches[[mapid, idevento, 'A']] = true

$game_map.need_refresh = true

Guardian mi da l'errore di sintassi.
Ma forse non va bene per la Scene?


Iscriviti sul mio canale youtube -

https://www.youtube....w_as=subscriber

Seguimi su Instagram -

https://www.instagra...stralguitarist/

---------------------------------------------------------------------------------------------------------------------------------------
Contest vinti
---------------------------------------------------------------------------------------------------------------------------------------

FACE CONTEST # 3
BANNER CONTEST #69


    Guardian of Irael
  • Coniglietto Rosso

  • Rpg˛S Admin
  • Rens: 195
  • 19
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 58424 messaggi
  • Sesso:Maschio
  • Provenienza:Bagnaia (Viterbo)
  • Abilitā:Apprendista


#6 Inviato 10 June 2020 - 14:41 PM

Questo non lo so, credo di no...

hai scritto per bene numeo mappa  e nuemro evento? ^ ^


(\_/)
(^ ^) <----coniglietto rosso, me!     
(> <)

 
Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^
 
KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^
 
FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^  
 
REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

Spoiler


    Squall_Leonheart
  • Alex (Rm2k)

  • Utenti
  • Rens: 92
  • 0
  • StellettaStellettaStellettaStellettaStelletta
  • 1388 messaggi
  • Sesso:Maschio
  • Provenienza:Salerno
  • Abilitā:Maestro

#7 Inviato 10 June 2020 - 15:01 PM

Questo è il frammento di codice

 

      case @time 
      when 0
        Audio.se_play ("Audio/SE/1Pin.wav")
        @conteggio.bitmap = RPG::Cache.picture("1") rescue nil
        $game_self_switches[[001, 009, 'A']] = false
        $game_self_switches[[001, 009, 'B']] = true
        $game_map.need_refresh = true

In questo modo mi da Syntax error.
Secondo te qual è il problema?


Iscriviti sul mio canale youtube -

https://www.youtube....w_as=subscriber

Seguimi su Instagram -

https://www.instagra...stralguitarist/

---------------------------------------------------------------------------------------------------------------------------------------
Contest vinti
---------------------------------------------------------------------------------------------------------------------------------------

FACE CONTEST # 3
BANNER CONTEST #69


    Guardian of Irael
  • Coniglietto Rosso

  • Rpg˛S Admin
  • Rens: 195
  • 19
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 58424 messaggi
  • Sesso:Maschio
  • Provenienza:Bagnaia (Viterbo)
  • Abilitā:Apprendista


#8 Inviato 10 June 2020 - 15:06 PM

Solitamente si consiglia sempre di mettere i numeri senza gli zero davanti, quello dovrebbe essere sicuramente un errore, non so se può dare altri problemi.

^ ^


(\_/)
(^ ^) <----coniglietto rosso, me!     
(> <)

 
Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^
 
KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^
 
FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^  
 
REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

Spoiler


    Squall_Leonheart
  • Alex (Rm2k)

  • Utenti
  • Rens: 92
  • 0
  • StellettaStellettaStellettaStellettaStelletta
  • 1388 messaggi
  • Sesso:Maschio
  • Provenienza:Salerno
  • Abilitā:Maestro

#9 Inviato 10 June 2020 - 15:22 PM

Solitamente si consiglia sempre di mettere i numeri senza gli zero davanti, quello dovrebbe essere sicuramente un errore, non so se può dare altri problemi.

^ ^

Adesso va avanti ma non accade niente. Effettivamente cambiando pagina all'evento la cosa principale che cambia è l'animazione.
Cosa suggerisci?

Ho attivato gli update della mappa quindi le animazioni presenti continuano. Sembra come se non connettesse la switch locale.. Anche se ho notato che cambia la frequenza dell'animazione. Come se non cambiasse la grafica ma leggesse tutto il resto.


Modificato da Squall_Leonheart, 10 June 2020 - 15:40 PM.

Iscriviti sul mio canale youtube -

https://www.youtube....w_as=subscriber

Seguimi su Instagram -

https://www.instagra...stralguitarist/

---------------------------------------------------------------------------------------------------------------------------------------
Contest vinti
---------------------------------------------------------------------------------------------------------------------------------------

FACE CONTEST # 3
BANNER CONTEST #69


    Guardian of Irael
  • Coniglietto Rosso

  • Rpg˛S Admin
  • Rens: 195
  • 19
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 58424 messaggi
  • Sesso:Maschio
  • Provenienza:Bagnaia (Viterbo)
  • Abilitā:Apprendista


#10 Inviato 10 June 2020 - 15:55 PM

Purtroppo non saprei cosa suggerire. Non è che la nuova pagina è ad inizio automatico? XD La mappa si blocca anche senza quel pezzo di codice? Cioè senza le due righe delle switch? Tutte le volte prova a debuggare linea per linea.

^ ^


(\_/)
(^ ^) <----coniglietto rosso, me!     
(> <)

 
Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^
 
KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^
 
FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^  
 
REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

Spoiler


    Squall_Leonheart
  • Alex (Rm2k)

  • Utenti
  • Rens: 92
  • 0
  • StellettaStellettaStellettaStellettaStelletta
  • 1388 messaggi
  • Sesso:Maschio
  • Provenienza:Salerno
  • Abilitā:Maestro

#11 Inviato 10 June 2020 - 17:07 PM

Purtroppo non saprei cosa suggerire. Non è che la nuova pagina è ad inizio automatico? XD La mappa si blocca anche senza quel pezzo di codice? Cioè senza le due righe delle switch? Tutte le volte prova a debuggare linea per linea.

^ ^

No assolutamente. L'evento è su pressione del tasto. Diciamo che siccome sto programmando una Scene, sono riuscito a mettere che nonostante la Window_Command le animazioni della mappa continuino. Ora la seconda pagina dell'evento credo si attivi, perché cambia la frequenza e la velocità dell'animazione. Quello che non cambia è il file immagine che ho impostato nella seconda pagina come characters!
Mi chiedo se esiste un modo per cambiare grafica, frequenza dell'animazione e pagina all'evento nel corso di una Scene.


Iscriviti sul mio canale youtube -

https://www.youtube....w_as=subscriber

Seguimi su Instagram -

https://www.instagra...stralguitarist/

---------------------------------------------------------------------------------------------------------------------------------------
Contest vinti
---------------------------------------------------------------------------------------------------------------------------------------

FACE CONTEST # 3
BANNER CONTEST #69


    Guardian of Irael
  • Coniglietto Rosso

  • Rpg˛S Admin
  • Rens: 195
  • 19
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 58424 messaggi
  • Sesso:Maschio
  • Provenienza:Bagnaia (Viterbo)
  • Abilitā:Apprendista


#12 Inviato 10 June 2020 - 17:12 PM

Dovrebbero essere comandi impostabili dal muovi evento/percorso evento, prova a guardare l'interpreter per vedere se trovi lo script associato a tali comandi.

^ ^


(\_/)
(^ ^) <----coniglietto rosso, me!     
(> <)

 
Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^
 
KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^
 
FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^  
 
REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

Spoiler


    Squall_Leonheart
  • Alex (Rm2k)

  • Utenti
  • Rens: 92
  • 0
  • StellettaStellettaStellettaStellettaStelletta
  • 1388 messaggi
  • Sesso:Maschio
  • Provenienza:Salerno
  • Abilitā:Maestro

#13 Inviato 10 June 2020 - 20:34 PM

Dovrebbero essere comandi impostabili dal muovi evento/percorso evento, prova a guardare l'interpreter per vedere se trovi lo script associato a tali comandi.

^ ^

Guardian ho capito il problema! L'errore non stava nel tuo codice, bensì nel fatto che, per rimanere lo sfondo della mappa attivo, avevo questa stringa :    @spriteset = Spriteset_Map.new  -  Con i successivi update e dispose.

Ora se la tolgo non ho la mappa con le animazioni alle spalle... Cosa che mi serve. Così purtroppo cambiava ma la mappa diventava sempre nuova e quindi non andava.

Come posso rimanere gli spriteset senza farli ricreare?


Iscriviti sul mio canale youtube -

https://www.youtube....w_as=subscriber

Seguimi su Instagram -

https://www.instagra...stralguitarist/

---------------------------------------------------------------------------------------------------------------------------------------
Contest vinti
---------------------------------------------------------------------------------------------------------------------------------------

FACE CONTEST # 3
BANNER CONTEST #69


    Guardian of Irael
  • Coniglietto Rosso

  • Rpg˛S Admin
  • Rens: 195
  • 19
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 58424 messaggi
  • Sesso:Maschio
  • Provenienza:Bagnaia (Viterbo)
  • Abilitā:Apprendista


#14 Inviato 10 June 2020 - 21:34 PM

Prova a riattivare e commentare riga per riga il codice di quello script che ti crea l'animazione dietro, così magari si riesce a capire cosa può dare incompatibilità.

In caso posta pure il codice di quell'animazione dello sfondo della mappa. Sicuro di non poterne fare a meno? Sembra una cosa pesantissima > <

^ ^


(\_/)
(^ ^) <----coniglietto rosso, me!     
(> <)

 
Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^
 
KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^
 
FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^  
 
REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

Spoiler


    Squall_Leonheart
  • Alex (Rm2k)

  • Utenti
  • Rens: 92
  • 0
  • StellettaStellettaStellettaStellettaStelletta
  • 1388 messaggi
  • Sesso:Maschio
  • Provenienza:Salerno
  • Abilitā:Maestro

#15 Inviato 10 June 2020 - 21:45 PM

Nell'evento c'è solamente un messaggio ed un muovi evento, cambia grafica in "conteggio"

Questa è poi la Scene che chiamo via script:

 

class Scene_Rianimazione
   
  def main
    @window_rianimazione = Window_Rianimazione.new
    @window_rianimazione.opacity = 100
    @window_help = Window_Help.new
    @window_help.opacity = 100
    @window_help.y = 100
    @window_help.width = 320
    @window_help.set_text("Premi invio per recuperare le forze e liberarti!")
    @time = 0
    @conteggio = Sprite.new
    @conteggio.bitmap = RPG::Cache.picture("1") rescue nil 
    @conteggio.x = -0
    @conteggio.y = 60 
    @conteggio.z = 255
    @conteggio.opacity = 255
    @spriteset = Spriteset_Map.new
    Graphics.transition
    loop do
    @spriteset.update  
    $game_map.update
    Graphics.update
    Input.update
    update
    time
    if $scene != self  
      break  
    end
  end
  Graphics.freeze
  @spriteset.dispose
  @conteggio.dispose
  @window_rianimazione.dispose
  @window_help.dispose
end

def update
  
    @window_help.update
   if Input.trigger?(Input::C)
     if $game_variables[5] == 0
       $game_actors[1].hp += 3
       @window_rianimazione.refresh
     else if $game_variables[5] == 1
       $game_actors[1].hp += 2
       @window_rianimazione.refresh
     else if $game_variables[5] > 2
       $game_actors[1].hp += 1
       @window_rianimazione.refresh
     end
   end
   end
     end
    end
 end


   def time  
     
     case @time 
     when 100
        Audio.se_play ("Audio/SE/3Pin.wav")
        @conteggio.bitmap = RPG::Cache.picture("3") rescue nil 
     end
     case @time 
     when 50
        Audio.se_play ("Audio/SE/2Pin.wav")
        @conteggio.bitmap = RPG::Cache.picture("2") rescue nil 
     end
      case @time 
      when 0
        Audio.se_play ("Audio/SE/1Pin.wav")
        @conteggio.bitmap = RPG::Cache.picture("1") rescue nil 
      end
      @time += 1
      $game_map.need_refresh = true
        if $game_actors[1].hp >= ($game_actors[1].maxhp * 30 / 100)
         @window_help.set_text("SI LIBERA!")
         $game_variables[5] += 1
         $game_switches[1] = true
         $game_map.need_refresh = true
         $scene = Scene_Map.new
         end
     if @time > 150
       if $game_actors[1].hp >= ($game_actors[1].maxhp * 30 / 100)
         @window_help.set_text("SI LIBERA!")
         $game_variables[5] += 1
         $game_switches[1] = true
         $game_map.need_refresh = true
         $scene = Scene_Map.new
       else 
       $scene = Scene_Gameover.new
       end
       end
     end

Ora mi basterebbe che l'animazione dell'evento proseguisse con la grafica che imposto, per poter settare il time in modo sincronizzato al movimento. Il tutto simula un arbitro che conta come nel wrestling.


Iscriviti sul mio canale youtube -

https://www.youtube....w_as=subscriber

Seguimi su Instagram -

https://www.instagra...stralguitarist/

---------------------------------------------------------------------------------------------------------------------------------------
Contest vinti
---------------------------------------------------------------------------------------------------------------------------------------

FACE CONTEST # 3
BANNER CONTEST #69


    Guardian of Irael
  • Coniglietto Rosso

  • Rpg˛S Admin
  • Rens: 195
  • 19
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 58424 messaggi
  • Sesso:Maschio
  • Provenienza:Bagnaia (Viterbo)
  • Abilitā:Apprendista


#16 Inviato 11 June 2020 - 11:58 AM

Non mi è ben chiara la cosa. L'ultimo problema che avevi era che @spriteset = Spriteset_Map.new ti dava problemi con il codice del refresh per il cambio switch scritto sopra? Però solo se quella variabile la scrivi su un call script? > <


(\_/)
(^ ^) <----coniglietto rosso, me!     
(> <)

 
Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^
 
KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^
 
FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^  
 
REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

Spoiler


    Squall_Leonheart
  • Alex (Rm2k)

  • Utenti
  • Rens: 92
  • 0
  • StellettaStellettaStellettaStellettaStelletta
  • 1388 messaggi
  • Sesso:Maschio
  • Provenienza:Salerno
  • Abilitā:Maestro

#17 Inviato 11 June 2020 - 15:54 PM

Non mi è ben chiara la cosa. L'ultimo problema che avevi era che @spriteset = Spriteset_Map.new ti dava problemi con il codice del refresh per il cambio switch scritto sopra? Però solo se quella variabile la scrivi su un call script? > <

Aspetta, ricapitolo altrimenti ti confondo solo le idee.
Il primo problema era che, la switch locale, nonostante si attivasse non cambiasse la grafica dell'evento disposto nella pagina che si attiva con la switch.
Adesso, per cercare di ovviare questa cosa, ho fatto un cambia grafica con "muovi evento" prima di chiamare la scena. Il problema è che la scena nonostante mantenga le animazioni, riporta l'evento alla grafica iniziale.
Credo che tutto ciò avvenga proprio a causa dello Spritsetmap, perché appunto con la dicitura .new resetta i valori no?


Iscriviti sul mio canale youtube -

https://www.youtube....w_as=subscriber

Seguimi su Instagram -

https://www.instagra...stralguitarist/

---------------------------------------------------------------------------------------------------------------------------------------
Contest vinti
---------------------------------------------------------------------------------------------------------------------------------------

FACE CONTEST # 3
BANNER CONTEST #69


    Guardian of Irael
  • Coniglietto Rosso

  • Rpg˛S Admin
  • Rens: 195
  • 19
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 58424 messaggi
  • Sesso:Maschio
  • Provenienza:Bagnaia (Viterbo)
  • Abilitā:Apprendista


#18 Inviato 11 June 2020 - 19:01 PM

 

Adesso, per cercare di ovviare questa cosa, ho fatto un cambia grafica con "muovi evento" prima di chiamare la scena. Il problema è che la scena nonostante mantenga le animazioni, riporta l'evento alla grafica iniziale.
Credo che tutto ciò avvenga proprio a causa dello Spritsetmap, perché appunto con la dicitura .new resetta i valori no?

è possibile, sì. Prova a disattivare lo script se pensi che sia proprio quello il problema.

Per ovviare alla cosa potresti mettere una switch su ON che attiva un evento che si occupa di fare il muovi evento col cambio grafica, ecc... dovrebbe prima attivarsi lo script dello spritesetmap e poi l'evento attivato dalla switch. Comunque sia prima prova a disattivare lo script.

^ ^


(\_/)
(^ ^) <----coniglietto rosso, me!     
(> <)

 
Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^
 
KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^
 
FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^  
 
REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

Spoiler





  • Feed RSS