collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

Autor Thema: Advance Scroll System Error  (Gelesen 706 mal)

Offline Franky

  • Blutiger Fortgeschrittener
  • Eventmeister
  • ***
  • Beiträge: 390
Advance Scroll System Error
« am: Juni 24, 2011, 23:57:17 »
Hey Leute,
Ich habe ein paar Komplikationen mit dem Script "Advance Scroll System". Unten seht ihr den Fehler, der auftaucht, wenn man
einen beliebigen Befehl des Scripts im Parallel Process ausführt (wie das Beispiel schon zeigt: scroll(UPLEFT, 10, 2.5)).
Bei einem Action Button passiert dies nicht.
Der Fehler hängt nicht mit anderen Scripts zusammen, da selbst in einem neuen Projekt der selbe Error aufblitzt.



#===============================================================
# ? [VX] ? Advance Scroll System ? ?
# * Scroll with speed like 2.5 or 1.6, and/or in diagonal direction~ *
#--------------------------------------------------------------
# ? by Woratana [woratana@hotmail.com]
# ? Thaiware RPG Maker Community
# ? Released on: 25/05/2008
# ? Version: 1.0
#--------------------------------------------------------------

#==================================================================
# ** HOW TO USE **
#-----------------------------------------------------------------
# To start scroll, call script:
#  scroll(direction, distance, speed)
#
# * direction: Scroll direction
# ** You can use these words for direction:
# ** DOWNLEFT, DOWN, DOWNRIGHT, LEFT, RIGHT, UPLEFT, UP, UPRIGHT
#
# * distance: Scroll Distance (1 for 1 tile)
#
# * speed: Scroll Speed, it can be any positive number (3, 2.3, 4.5, ...)
#
# For example:
#  scroll(UPLEFT, 10, 2.5)
# will scroll in UP-LEFT diretion for 10 tiles, with speed 2.5
#==================================================================

class Game_Map
  def update_scroll
    if @scroll_rest > 0                 # If scrolling
      distance = 2 ** @scroll_speed     # Convert to distance
      case @scroll_direction
      when 1  # Down-Left
        scroll_down(distance)
        scroll_left(distance)
      when 2  # Down
        scroll_down(distance)
      when 3  # Down-Right
        scroll_down(distance)
        scroll_right(distance)
      when 4  # Left
        scroll_left(distance)
      when 6  # Right
        scroll_right(distance)
      when 7  # Up-Left
        scroll_up(distance)
        scroll_left(distance)
      when 8  # Up
        scroll_up(distance)
      when 9 # Up-Right
        scroll_up(distance)
        scroll_right(distance)
      end
      @scroll_rest -= distance          # Subtract scrolled distance
    end
  end
end

class Game_Interpreter
  DOWNLEFT = 1
  DOWN = 2
  DOWNRIGHT = 3
  LEFT = 2
  RIGHT = 6
  UPLEFT = 7
  UP = 8
  UPRIGHT = 9
 
  def scroll(direction, distance, speed)
    @params[0], @params[1], @params[2] = direction, distance, speed.to_f
    command_204
  end
end

 


 Bild des Monats

rooftop party

Views: 3615
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