collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

Autor Thema: Script Problem - Zeitaufgabe  (Gelesen 547 mal)

Offline Valentine

  • Eventmeister
  • ***
  • Beiträge: 352
Script Problem - Zeitaufgabe
« am: Januar 07, 2012, 15:02:50 »
Hallo!
Ich nutze ein Script, womit man eine Zeitaufgabe machen kann. Funktioniert alles soweit, nur leider friert es mir eine paralel laufende Zeit ein.

Das heißt, ich habe ein Timer Event. 60 Sekunden die ablaufen. Wird auch im Spiel rechts oben angezeigt.
Wenn ich nun aber dann die Zeitaufgabe mache, bleibt der Timer stehen.

Wie änder ich das im Script um, das das Timer normal weiterläuft während der Zeitaufgabe?

Hier ist das Script:

Spoiler for Hiden:
#=================================================#
#       Quick Time Event Script
#       >>>>>>>>> Version : 1.0
#---------------------------------------------------------------#
#       (Es ist an Sinnlosigkeit und Simpelheit
#       kaum zu überbieten, deshalbt wird bei
#       Benutzung um keine Danksagung gebeten.
#=================================================#
 
class Scene_Geschick < Window_Base
  def initialize(index, zeit)
# Dateinamen der Tasten; (Grafiken sollten 48x48 Pixel messen)
       @Taste_UP = "TasteOben.png"
       @Taste_DOWN = "TasteUnten.png"
       @Taste_LEFT = "TasteLinks.png"
       @Taste_RIGHT = "TasteRechts.png"
       @Taste_OK = "TasteOK.png"
       @Taste_ESC = "TasteEsc.png"
       @Richtige_Eingabe = "TasteDone.png"
       @Rich_Eing_Opacity = 255
# Dateinamen und Blending der Balken;...=["Name", (0=Norm, 1=Add, 2=Sub)]
# (Grafiken sollten 300x15 Pixel messen)
       @Balken_Overlay = ["Geschick-ZeitFüllung.png", 0]
       @Balken_BG = ["Geschick-Zeit.png", 0]
#---------------------------------------------------------------#
 
   super(-20, 310, 680, 80)
   self.contents = Bitmap.new(48*index+32, height - 32)
   self.opacity = 0
   self.z = 9998
   @Maximale_Tasten = index
   @Zeit = zeit
   @Zeit_Intervall = 1.00000 / @Zeit / 3
  end
  def main
    @spriteset = Spriteset_Map.new
   $geschick = false
   $tasten_need = []
   @inx = 0
   @show_x = 0
   while @inx < @Maximale_Tasten
     $tasten_need[@inx] = rand(6)
      bitmap = Cache.picture(@Taste_UP) if $tasten_need[@inx] == 0
      bitmap = Cache.picture(@Taste_DOWN) if $tasten_need[@inx] == 1
      bitmap = Cache.picture(@Taste_LEFT) if $tasten_need[@inx] == 2
      bitmap = Cache.picture(@Taste_RIGHT) if $tasten_need[@inx] == 3
      bitmap = Cache.picture(@Taste_OK) if $tasten_need[@inx] == 4
      bitmap = Cache.picture(@Taste_ESC) if $tasten_need[@inx] == 5
     self.contents.blt(@show_x, 0, bitmap, Rect.new(0, 0, 48, 48))
     @inx += 1
     @show_x  += 48
   end
   @inx = 0
   @show_x = 0
   @addition_1 = Sprite.new
   @addition_1.bitmap = Cache.picture(@Balken_BG[0])
   @addition_1.blend_type = @Balken_BG[1]
   @addition_1.x = 50
   @addition_1.y = 250
   @addition_1.z = 9997
   @addition_2 = Sprite.new
   @addition_2.bitmap = Cache.picture(@Balken_Overlay[0])
   @addition_2.blend_type = @Balken_Overlay[1]
   @addition_2.x = 50
   @addition_2.y = 250
   @addition_2.z = 9998
Graphics.transition
      loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   Graphics.freeze
   @addition_1.dispose
   @addition_2.dispose
   @spriteset.dispose
   self.contents.dispose
   self.dispose
  end
  def update
   if Input.trigger?(Input::C)
     if $tasten_need[@inx] == 4
       Sound.play_decision
        bitmap = Cache.picture(@Richtige_Eingabe)
        self.contents.blt(@show_x, 0, bitmap, Rect.new(0, 0, 48, 48), @Rich_Eing_Opacity)
        @inx += 1
        @show_x += 48
          self.ox += 48 if @show_x >= 320 and @Maximale_Tasten > 12
      else
        Sound.play_cancel
           $geschick = false
           $scene = Scene_Map.new
      end
    elsif Input.trigger?(Input::B)
       if $tasten_need[@inx] == 5
      Sound.play_decision
      bitmap = Cache.picture(@Richtige_Eingabe)
        self.contents.blt(@show_x, 0, bitmap, Rect.new(0, 0, 48, 48), @Rich_Eing_Opacity)
        @inx += 1
        @show_x += 48
          self.ox += 48 if @show_x >= 320 and @Maximale_Tasten > 12
      else
        Sound.play_cancel
           $geschick = false
           $scene = Scene_Map.new
         end
         elsif Input.trigger?(Input::UP)
       if $tasten_need[@inx] == 0
       Sound.play_decision
        bitmap = Cache.picture(@Richtige_Eingabe)
        self.contents.blt(@show_x, 0, bitmap, Rect.new(0, 0, 48, 48), @Rich_Eing_Opacity)
        @inx += 1
        @show_x += 48
          self.ox += 48 if @show_x >= 320 and @Maximale_Tasten > 12
      else
        Sound.play_cancel
           $geschick = false
           $scene = Scene_Map.new
         end
         elsif Input.trigger?(Input::DOWN)
       if $tasten_need[@inx] == 1
       Sound.play_decision
        bitmap = Cache.picture(@Richtige_Eingabe)
        self.contents.blt(@show_x, 0, bitmap, Rect.new(0, 0, 48, 48), @Rich_Eing_Opacity)
        @inx += 1
        @show_x += 48
          self.ox += 48 if @show_x >= 320 and @Maximale_Tasten > 12
      else
        Sound.play_cancel
           $geschick = false
           $scene = Scene_Map.new
         end
         elsif Input.trigger?(Input::LEFT)
       if $tasten_need[@inx] == 2
       Sound.play_decision
        bitmap = Cache.picture(@Richtige_Eingabe)
        self.contents.blt(@show_x, 0, bitmap, Rect.new(0, 0, 48, 48), @Rich_Eing_Opacity)
        @inx += 1
        @show_x += 48
          self.ox += 48 if @show_x >= 320 and @Maximale_Tasten > 12
      else
        Sound.play_cancel
           $geschick = false
           $scene = Scene_Map.new
         end
         elsif Input.trigger?(Input::RIGHT)
       if $tasten_need[@inx] == 3
       Sound.play_decision
        bitmap = Cache.picture(@Richtige_Eingabe)
        self.contents.blt(@show_x, 0, bitmap, Rect.new(0, 0, 48, 48), @Rich_Eing_Opacity)
        @inx += 1
        @show_x += 48
        self.ox += 48 if @show_x >= 320 and @Maximale_Tasten > 12
      else
        Sound.play_cancel
      $geschick = false
      $scene = Scene_Map.new
      end
     end
     if @inx >= @Maximale_Tasten
       Sound.play_decision
       $geschick = true
      $scene = Scene_Map.new
       return
     end
   @addition_1.update
   @spriteset.update
   @addition_2.zoom_x -= @Zeit_Intervall
   @addition_2.update
   if @addition_2.zoom_x <= 0
     Sound.play_cancel
     $geschick = false
     $scene = Scene_Map.new
   end
   end
end
« Letzte Änderung: Januar 07, 2012, 15:12:54 von Valentine »

 


 Bild des Monats

rooftop party

Views: 3581
By: papilion

 Umfrage

  • Wer soll das BdM gewinnen?
  • Dot Kandidat 1
  • 3 (25%)
  • Dot Kandidat 2
  • 1 (8%)
  • Dot Kandidat 3
  • 2 (16%)
  • Dot Kandidat 4
  • 0 (0%)
  • Dot Kandidat 5
  • 6 (50%)
  • Stimmen insgesamt: 12
  • View Topic

 Schnellsuche





SimplePortal 2.3.3 © 2008-2010, SimplePortal