collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

Autor Thema: Kleine Fragen, schnelle Antwort?  (Gelesen 194719 mal)

Offline Boogatie Roll

  • VX-Meister
  • ****
  • Beiträge: 676
  • Java[Spiele] Programmierer
    • BRolls Game Website
Re: Kleine Fragen, schnelle Antwort?
« Antwort #1305 am: März 26, 2010, 13:31:45 »
Habe eine dringende Frage, die ich schnell beantwortet haben möchte...^^
(deshalb kommts ja hier rein)
Also:
Ich habe den Bereich des "Erase Event" im Script editor gefunden.

Wenn ein Event erased wird, kommt es ja wieder wenn man auf die map wieder kommt.
Ich möchte aber eine Wartfunktion einsetzen. Dh. dass das Event erst nach einer bestimmten
Warteteit wiedekommt, wenn man die map betritt.
Bei meinen bisherigen eigenen Versuchen kam heraus, das der Held warten musste, und nicht das Event.

Hoffe ihr versteht was ich will, bei unklarheit bitte melden.

Vielen Dank im Vorraus an alle die mir helfen.^^

Re: Kleine Fragen, schnelle Antwort?

Offline Ðeity

  • No Pain, no gain!
  • Administrator
  • Eventmeister
  • ****
  • Beiträge: 427
  • No Pain, no Gain!
    • Deity-VX
Re: Kleine Fragen, schnelle Antwort?
« Antwort #1306 am: März 26, 2010, 16:18:44 »
Ein Event oder Common Event mit parallelem Prozess erstellen.
In diesem Event eine Variable 0 setzen. Waitbefehl in der Größe von z.B. 60 Frames einfügen und die Variable um 1 erhöhen. Nun nur noch die Abfrage ob die Variable den gewünschten Sekundenwert hat und einen Switch aktivieren, der ein Event wieder erscheinen lässt.
So muss es gehen. :)

MfG
Deity



Re: Kleine Fragen, schnelle Antwort?

Offline Boogatie Roll

  • VX-Meister
  • ****
  • Beiträge: 676
  • Java[Spiele] Programmierer
    • BRolls Game Website
Re: Kleine Fragen, schnelle Antwort?
« Antwort #1307 am: März 26, 2010, 17:43:01 »
Ein Event oder Common Event mit parallelem Prozess erstellen.
In diesem Event eine Variable 0 setzen. Waitbefehl in der Größe von z.B. 60 Frames einfügen und die Variable um 1 erhöhen. Nun nur noch die Abfrage ob die Variable den gewünschten Sekundenwert hat und einen Switch aktivieren, der ein Event wieder erscheinen lässt.
So muss es gehen. :)

MfG
Deity

Sorry, aber genau so will ich es ja nicht machen.
Ich will es im Scriptbereich den Wait haben, das der automatisch für alle Erase Event Befehle
gilt.
Sonst werden das zu viele Parallele Events...^^


Re: Kleine Fragen, schnelle Antwort?

Offline Ðeity

  • No Pain, no gain!
  • Administrator
  • Eventmeister
  • ****
  • Beiträge: 427
  • No Pain, no Gain!
    • Deity-VX
Re: Kleine Fragen, schnelle Antwort?
« Antwort #1308 am: März 26, 2010, 18:15:50 »
Versuch mal das hier aus:
WAITTIME = 60
class Game_Event
  alias update_erase_edit update
  def update
    if @erased
      @waittime += 1
    else
      @waittime = 0
    end
    if @waittime == WAITTIME
      @erased = false
      refresh
    end
    update_erase_edit
  end
end

Habs jetzt nicht ausgibig testen können, aber es müsste eigentlich dir helfen.
Einfach die Gewünschte Wartezeit in Frames unter WAITTIME festlegen und fertig. :)

MfG
Deity



Re: Kleine Fragen, schnelle Antwort?

Offline Boogatie Roll

  • VX-Meister
  • ****
  • Beiträge: 676
  • Java[Spiele] Programmierer
    • BRolls Game Website
Re: Kleine Fragen, schnelle Antwort?
« Antwort #1309 am: März 26, 2010, 18:28:57 »
hmm...
funktioniert nicht.
Wenn man neu auf die map geht ist es trotzdem sofort wieder da....
(ich hab dein script einfach über Main eingefügt)

Re: Kleine Fragen, schnelle Antwort?

Offline Ðeity

  • No Pain, no gain!
  • Administrator
  • Eventmeister
  • ****
  • Beiträge: 427
  • No Pain, no Gain!
    • Deity-VX
Re: Kleine Fragen, schnelle Antwort?
« Antwort #1310 am: März 26, 2010, 18:36:32 »
Och das möchtest du. Das Script macht nur eine Wartezeit auf der selben Map. Um das zu machen was du willst, müsste man einiges mehr machen. Weiß erlich gesagt garnicht wie man das am besten machen sollte.
Ich denk mal nach, aber garantieren tuhe ich nichts. :(

MfG
Deity



Re: Kleine Fragen, schnelle Antwort?

Offline syuka

  • RTP-Mapper
  • *
  • Beiträge: 20
  • blubb°°°°
Re: Kleine Fragen, schnelle Antwort?
« Antwort #1311 am: März 27, 2010, 13:53:27 »
ich hab mal ne frage :
und zwar hab ich eigene tile sets gemacht nun möchte ich gerne das wie bei dem normalen das zb ein baum vor einem fenster steht und das fenster im hintergrund bleibt und nicht weg ist wie mach ich das

Re: Kleine Fragen, schnelle Antwort?

Offline Kyoshiro

  • Global Mod
  • RPGVX-Forengott
  • ****
  • Beiträge: 1623
  • Stand up and fight!
    • Mein Blog
Re: Kleine Fragen, schnelle Antwort?
« Antwort #1312 am: März 27, 2010, 14:26:23 »
Das geht beim VX nicht einfach so, dazu musst du eventmappen.
Ist relativ einfach du musst dazu nur den Teil des Objekts (in deinem Fall der Baum) per Event anzeigen lassen.
So sieht das dann etwa aus:



MkG
Kyoshiro

Re: Kleine Fragen, schnelle Antwort?

Offline Cracker

  • Profi Amateur
  • Ralph
  • *
  • Beiträge: 6
Re: Kleine Fragen, schnelle Antwort?
« Antwort #1313 am: April 01, 2010, 18:01:08 »
Tagchen!

Hab mich schon lange nicht mehr mit dem VX beschäftigt.
Jetzt wollte ich fragen (einige reden oft davon) wo bekommt man die Mack Tiles her?

Re: Kleine Fragen, schnelle Antwort?

Offline PDM

  • Bibliothekar
  • Global Mod
  • VX-Kenner
  • ****
  • Beiträge: 468
    • Mein Blog
Re: Kleine Fragen, schnelle Antwort?
« Antwort #1314 am: April 01, 2010, 18:15:53 »
Von hier.(Klick)
Orginal Herkunft, sind im Sample game etwas anders (auch unter der Seite). Dort gibt es auch die Chars von Mack.
PDM's Gameplays
Skype-Name: lordpdm

Re: Kleine Fragen, schnelle Antwort?

Offline Snake

  • Moderator
  • VX-Kenner
  • ***
  • Beiträge: 538
  • Blubb, der Mod den keiner kennt! XD
Re: Kleine Fragen, schnelle Antwort?
« Antwort #1315 am: April 01, 2010, 20:45:37 »
Tagchen!

Hab mich schon lange nicht mehr mit dem VX beschäftigt.
Jetzt wollte ich fragen (einige reden oft davon) wo bekommt man die Mack Tiles her?


10 Sekunden Boardsuche oder alternativ in unsere
ressourcen-area schauen:
http://www.rpgvx.net/index.php?action=mgallery;sa=album;id=7;start=15
(hier halt als "RefMap")
Zitat
Snake 23:50

ich lads schnell


Silvanus 23:50

bist ne geile sau
:)

Re: Kleine Fragen, schnelle Antwort?

Offline _D3nn!§_

  • Hat Haare auf dem Kopf =D
  • Database-Verunstalter
  • **
  • Beiträge: 148
  • ~~(Dennisoftware)~~
    • Willste wohl gerne wissen wa? xD
Re: Kleine Fragen, schnelle Antwort?
« Antwort #1316 am: April 05, 2010, 20:57:48 »
Hallo,

Mein Problem ist, dass wenn ich mein Projekt mit "$scene = nil" beenden will,
nur folgende Fehlermeldung kommt :

Script 'Simple Mouse System 1.5' line 123: NoMethodError occurred.
undefined method `no_mouse' for nil:NilClass


Ich benutze folgende Skripts :

- Skip Title von Woratana
- Sprites above Pics von Woratana
- Simple Mouse System 1.5 von Woratana

Hier nochmal alle Vollständig als Text :

Skip Title
Spoiler for Hiden:
#==============================================================================
# ¦ [RMVX] +Skip Title Script+
#------------------------------------------------------------------------------
# Version 2.0
# by Woratana [woratana@hotmail.com]
# Release Date: 21/04/2008
#
# Exclusive for RPG RPG Revolution
#
# - To use this script:
# >> Put this script above Main
# >> Setup the script below
# >> Go to 'Main' in Script Editor, change:
# $scene = Scene_Title.new
# to:
# $scene = Skip_Title.new
#==============================================================================

class Skip_Title < Scene_Base

#------------------------------------
# SETUP START LOCATION HERE!
#-----------------------------------
  MAP_ID = 1 # Map ID of the Start Location
  START_XY = [0,12] # [X,Y] of the Start Location
  START_MEMBER = [1] # e.g. [Actor ID, Actor ID, Actor ID]
  # (0 for default start members.)
#------------------------------------
# SETUP START LOCATION END
#-----------------------------------

  def main
    @title = Scene_Title.new
    $BTEST ? @title.battle_test : start
  end
 
  def start
    @title.load_database
    @title.create_game_objects
    if START_MEMBER != 0
      $game_party.setup_starting_members_skip(START_MEMBER)
    else
      $game_party.setup_starting_members
    end
    $game_map.setup(MAP_ID)
    $game_player.moveto(START_XY[0],START_XY[1])
    $game_player.refresh
    $scene = Scene_Map.new
    $game_map.autoplay
  end
end

class Game_Party
  def setup_starting_members_skip(actor_list)
    @actors = []
    actor_list.each {|i| @actors << i }
  end
end

Sprites above Pics von Woratana
Spoiler for Hiden:
#===============================================================
# ? [VX] ? Pictures under Characters ? ?
# * Show pictures under characters on map but above map tiles *
#--------------------------------------------------------------
# ? by Woratana [woratana@hotmail.com]
# ? Thaiware RPG Maker Community
# ? Released on: 22/02/2009
# ? Version: 1.0
#--------------------------------------------------------------
# ? Update:
#--------------------------------------------------------------
# ? Version 1.0 (22/02/2009)
# - Unlimited numbers of picture under characters
#
#--------------------------------------------------------------
# ? Compatibility:
#--------------------------------------------------------------
# ? This script will rewrite 0 method(s):
#
#
# ? This script will alias 2 method(s):
#     Spriteset_Map.create_pictures
#     Sprite_Picture.update
#
# ? This script should work with most scripts
#
#--------------------------------------------------------------
# ? Installation:
#--------------------------------------------------------------
# 1) This script should be placed JUST AFTER ? Materials.
#
# ? Like this:
# ? Materials
# *Pictures under Characters
# ...
# ...
# ? Main Process
# Main
#
# 2) Setup this script in Setup Part below.
#
#--------------------------------------------------------------
# ? How to use:
#--------------------------------------------------------------
# ? Place this script and setup in the setup part.
#
#=================================================================

class Spriteset_Map

  #=================================================================
  # ++ Setup Part
  #-----------------------------------------------------------------
  FIRST_PICBELOW_ID = 5 # First ID of picture that will show below characters
  LAST_PICBELOW_ID = 20 # Last ID of picture that will show below characters

  #   For example, if you set FIRST to 10 and LAST to 15, picture ID 10-15
  # will show below characters on map.
  #=================================================================

  alias wora_picbelow_sprsetmap_crepic create_pictures

  #--------------------------------------------------------------------------
  # * Create Picture Sprite
  #--------------------------------------------------------------------------
  def create_pictures(*args)
    wora_picbelow_sprsetmap_crepic(*args)
    for pic_id in FIRST_PICBELOW_ID..LAST_PICBELOW_ID
      @picture_sprites[pic_id - 1].dispose
      # Create picture below player in viewport1, so it can show just below player
      @picture_sprites[pic_id - 1] = Sprite_Picture.new(@viewport1,
    $game_map.screen.pictures[pic_id])
    end
  end
end

class Sprite_Picture < Sprite
  alias wora_picbelow_sprpic_upd update

  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update(*args)
    wora_picbelow_sprpic_upd(*args)
    self.z = $game_player.screen_z - 1 if @picture.number >=
  Spriteset_Map::FIRST_PICBELOW_ID and @picture.number <= Spriteset_Map::LAST_PICBELOW_ID
  end
end

Simple Mouse System 1.5 von Woratana
Spoiler for Hiden:
#==============================================================================
#  Path Finding
#  Version: 2.0
#  Author: modern algebra (rmrk.net)
#  Date: April 10, 2008
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Thanks:
#    Patrick Lester! For his tutorial on A* Pathfinding algorithm (found at:
#        http://www.gamedev.net/reference/articles/article2003.asp) as well as
#        another amazingly helpful tutorial on using binary heaps (found at:
#        http://www.policyalmanac.org/games/binaryHeaps.htm). Without his excellent
#        tutorials, this script would not exist. So major thanks to him.
#    Zeriab, for tricking me into believing that this was an actual exercise.
#        Also, his table printout actually makes Tables useable :P
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Instructions:
#    To use, merely use this code in a script call INSIDE a Move Event:
#
#      find_path (target_x, target_y, diagonal, max_iterations)
#
#    where target_x and target_y are the target coordinates and diagonal is an
#    optional boolean value (true or false) stating whether or not to allow
#    diagonal movement. max_iterations is also optional, and you can set this if
#    you want the algorithm to quit if it is taking too long. The number you set
#    here refers to how many nodes you let it search through before cancelling
#    the process. If this is set to 0, it will take as many iterations as
#    necessary to find the shortest path.
#
#    You can also set a default value for diagonal and max_iterations
#    by call script with the codes:
#     
#      $game_system.pathfinding_diagonal = true/false # Allow diagonal movement
#      $game_system.pathfinding_iterations = integer # When <= 0, no limit
#
#    For scripters, you can force-move a character down a path via:
#
#      character.force_path (x, y, diagonal, max_iterations)
#
#    character is any Game_Character object, such as $game_player or an event.
#
#    Then, when you do not specifically set diagonal or limit, it will default
#    to the values you set in there
#==============================================================================
#==============================================================================
# ** Game_System
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    new instance variables - pathfinding_diagonal, pathfinding_iterations
#    aliased method - initialize
#==============================================================================

class Game_System
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_accessor :pathfinding_diagonal
  attr_accessor :pathfinding_iterations
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_pathfinding_options_init_j5yt initialize
  def initialize
    modalg_pathfinding_options_init_j5yt
    @pathfinding_diagonal = false
    @pathfinding_iterations = 0
  end
end

#==============================================================================
# ** Game_Character
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    new methods - find_path
#==============================================================================

class Game_Character
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Find Path
  #    trgt_x, trgt_y : the target coordinates
  #    diagonal       : Is diagonal movement allowed?
  #    max_iterations : maximum number of iterations
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def find_path (trgt_x, trgt_y, diagonal = $game_system.pathfinding_diagonal,
                    max_iterations = $game_system.pathfinding_iterations)
    path = $game_map.find_path (self.x, self.y, trgt_x, trgt_y, diagonal,
                     max_iterations, self)
    # Add the path to the move route being executed.
    @move_route.list.delete_at (@move_route_index)
    path.each { |i| @move_route.list.insert (@move_route_index, i) }
    @move_route_index -= 1
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Force Path
  #    trgt_x, trgt_y : target coordinates
  #    diagonal       : Is diagonal movement allowed?
  #    max_iterations : maximum number of iterations
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def force_path (trgt_x, trgt_y, diagonal = $game_system.pathfinding_diagonal,
                    max_iterations = $game_system.pathfinding_iterations)
    path = $game_map.find_path (self.x, self.y, trgt_x, trgt_y, diagonal,
                          max_iterations, self)
    # The path retrieved is actually backwards, so it must be reversed
    path.reverse!
    # Add an end ccommand
    path.push (RPG::MoveCommand.new (0))
    move_route = RPG::MoveRoute.new
    move_route.list = path
    move_route.repeat = false
    force_move_route (move_route)
  end
end

#==============================================================================
# ** Game_Map
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    new method - removefrom_binaryheap, find_path
#==============================================================================
class Game_Map
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Remove from Heap
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def removefrom_binaryheap
    @open_nodes[1] = @open_nodes[@listsize]
    @listsize -= 1
    v = 1
    loop do
      u = v
      w = 2*u
      # Check if it's cost is greater than that of it's children
      if w + 1 <= @listsize # If both children exist
        v = w if @total_cost[@open_nodes[u]] >= @total_cost[@open_nodes[w]]
        v = w + 1 if @total_cost[@open_nodes[v]] >= @total_cost[@open_nodes[w + 1]]
      elsif w <= @listsize # If only one child exists
        v = w if @total_cost[@open_nodes[u]] >= @total_cost[@open_nodes[w]]
      end
      # Break if parent has less cost than it's children
      if u == v
        break
      else
        temp = @open_nodes[u]
        @open_nodes[u] = @open_nodes[v]
        @open_nodes[v] = temp
      end
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Find Path
  #    src_x, src_y   : the source coordinates
  #    trgt_x, trgt_y : the target coordinates
  #    diagonal       : Is diagonal movement allowed?
  #    max_iterations : maximum number of iterations
  #    char           : character to follow the path
  #--------------------------------------------------------------------------
  #  Uses the A* method of pathfinding to find a path
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def find_path (src_x, src_y, trgt_x, trgt_y, diagonal, max_iterations, char)
    # No possible path if the target itself is impassable
    path = []
    # Finished if Target Location is closed
    return path if !char.passable? (trgt_x, trgt_y)
    # Initialize
    max_elements = width*height + 2
    openx = Table.new (max_elements)
    openy = Table.new (max_elements)
    @open_nodes = Table.new (max_elements)
    @total_cost = Table.new (max_elements)
    heuristic = Table.new (max_elements)
    step_cost = Table.new (width, height)
    parent_x = Table.new (width, height)
    parent_y = Table.new (width, height)
    actual_list = Table.new (width, height)
    # Add the source node to the open list
    new_openid = 1
    @open_nodes[1] = 1
    openx[1] = src_x
    openy[1] = src_y
    dist = [(trgt_x - src_x).abs, (trgt_y - src_y).abs]
    heuristic[1] = diagonal ? (dist.max*14) + (dist.min*10) : (dist[0] + dist[1])*10
    @total_cost[1] = heuristic[1]
    actual_list[src_x, src_y] = 1
    @listsize = 1
    count = 0
    loop do
      break if actual_list[trgt_x, trgt_y] != 0
      count += 1
      # Update Graphics every 500 iterations
      Graphics.update if count % 500 == 0
      return path if count == max_iterations
      return path if @listsize == 0
      node = @open_nodes[1]
      # Set the x and y value as parent to all possible children
      parent_xval, parent_yval = openx[node], openy[node]
      actual_list[parent_xval, parent_yval] = 2
      removefrom_binaryheap
      # Check all adjacent squares
      for i in 0...8
        break if i > 3 && !diagonal
        # Get the node
        x, y = case i
        when 0 then [parent_xval, parent_yval - 1] # UP
        when 1 then [parent_xval, parent_yval + 1] # DOWN
        when 2 then [parent_xval - 1, parent_yval] # LEFT
        when 3 then [parent_xval + 1, parent_yval] # RIGHT
        when 4 then [parent_xval - 1, parent_yval - 1] # UP LEFT
        when 5 then [parent_xval + 1, parent_yval - 1] # UP RIGHT
        when 6 then [parent_xval - 1, parent_yval + 1] # DOWN LEFT
        when 7 then [parent_xval + 1, parent_yval + 1] # DOWN RIGHT
        end
        # Next if this node is already in the closed list
        next if actual_list[x,y] == 2
        # Next if this tile in impassable
        next unless char.passable? (x, y) # Is the tile passable?
        # Take into account diagonal passability concerns
        if i > 3
          next unless case i
          when 4 then char.passable? (x + 1, y) || char.passable? (x, y + 1)
          when 5 then char.passable? (x - 1, y) || char.passable? (x, y + 1)
          when 6 then char.passable? (x + 1, y) || char.passable? (x, y - 1)
          when 7 then char.passable? (x - 1, y) || char.passable? (x, y - 1)
          end
        end
        # Check if this node already open
        plus_step_cost = ((x - parent_xval).abs + (y - parent_yval).abs) > 1 ? 14 : 10
        temp_step_cost = step_cost[parent_xval, parent_yval] + plus_step_cost
        if actual_list[x,y] == 1
          # If this is a better path to that node
          if temp_step_cost < step_cost[x, y]
            # Change Parent, step, and total cost
            parent_x[x, y] = parent_xval
            parent_y[x, y] = parent_yval
            step_cost[x, y] = temp_step_cost
            # Find index of this position
            index = 1
            while index < @listsize
              index += 1
              break if openx[@open_nodes[index]] == x &&
                                                openy[@open_nodes[index]] == y
            end
            @total_cost[@open_nodes[index]] = temp_step_cost + heuristic[@open_nodes[index]]
          else
            next
          end
        else # If not on open nodes
          # Add to open nodes
          new_openid += 1 # New Id for new item
          @listsize += 1 # Increase List Size
          @open_nodes[@listsize] = new_openid
          step_cost[x, y] = temp_step_cost
          # Calculate Heuristic
          d = [(trgt_x - x).abs, (trgt_y - y).abs]
          heuristic[new_openid] = diagonal ? (d.max*14) + (d.min*10) : (d[0] + d[1])*10
          @total_cost[new_openid] = temp_step_cost + heuristic[new_openid]
          parent_x[x, y] = parent_xval
          parent_y[x, y] = parent_yval
          openx[new_openid] = x
          openy[new_openid] = y
          index = @listsize
          actual_list[x, y] = 1
        end
        # Sort Binary Heap
        while index != 1
          temp_node = @open_nodes[index]
          if @total_cost[temp_node] <= @total_cost[@open_nodes[index / 2]]
            @open_nodes[index] = @open_nodes[index / 2]
            index /= 2
            @open_nodes[index] = temp_node
          else
            break
          end
        end
      end
    end
    # Get actual target node
    path_x, path_y = trgt_x, trgt_y
    # Make an array of MoveRoute Commands
    while path_x != src_x || path_y != src_y
      # Get Parent x, Parent Y
      prnt_x, prnt_y = parent_x[path_x, path_y], parent_y[path_x, path_y]
      # DOWN = 1, LEFT = 2, RIGHT = 3, UP = 4, DL = 5, DR = 6, UL = 7, UR = 8
      if path_x < prnt_x # LEFT
        # Determine if upper, lower or direct left
        code = path_y < prnt_y ? 7 : path_y > prnt_y ? 5 : 2
      elsif path_x > prnt_x # RIGHT
        # Determine if upper, lower or direct right
        code = path_y < prnt_y ? 8 : path_y > prnt_y ? 6 : 3
      else # UP or DOWN
        code = path_y < prnt_y ? 4 : 1
      end
      path.push (RPG::MoveCommand.new (code))
      path_x, path_y = prnt_x, prnt_y
    end
    return path
  end
end
Spoiler for Hiden:
#==============================================================================
# ** Mouse Input Module (Revised)
#------------------------------------------------------------------------------
#   by DerVVulfman
#   version 1.2
#   08-18-2007
#------------------------------------------------------------------------------
#   Based on...
#   Mouse Input Module
#   by Near Fantastica
#------------------------------------------------------------------------------
#   Set_Pos feature by
#   Freakboy
#------------------------------------------------------------------------------
#
#   THE CALLS:
#
#   Mouse.click?
#   This returns a true/false value  when you test whether a button is clicked.
#   The values you pass are 1 (for the left mouse button), 2 (for the right) or
#   3 (for the middle button).
#
#   Mouse.press?
#   This returns a true/false value  when you test  whether a button is pressed
#   and kept depressed.  The values you pass are 1 (for the left mouse button),
#   2 (for the right mouse button), or 3 (for the middle).
#
#   Mouse.pixels
#   This returns the  mouse's screen coordinates  in pixels.  Based on a screen
#   with a 640x480 dimension,  this returns an array of the mouse's position in
#   index values.  Calling Mouse.pixels returns both x & y positions  in a sin-
#   gle string,  but calling Mouse.pixels[0] returns the x position (0-639) and
#   calling Mouse.pixels[1]  returns  the y position (0-439).   If the mouse is
#   outside of the game's window region, this call returns nil.
#
#   Mouse.tiles
#   This returns  the mouse's screen  coordinates  in map tiles.   Based on the
#   system's 20x15 tile size,  this returns it in index values  (a 0-19 width &
#   a 0-14 height).  This functions the same manner as Mouse.pixels.
#
#   Mouse.set_pos
#   This allows you  to forcefully position the mouse at an x/y position within
#   the game screen by pixel coordinates.  Given the game's normal screen width
#   of 640x480, adding:  Mouse.set_pos(320,240)  should position the mouse dead
#   center of the gaming window.
#
#   Mouse.update
#   Add this routine  into your update routines  to update  the mouse position.
#   It must be called otherwise you won't get valid mouse coordinates.
#
#==============================================================================

module Mouse
  @mouse_menu = 0
  #--------------------------------------------------------------------------
  # * Mouse Click
  #     button      : button
  #--------------------------------------------------------------------------
  def Mouse.click?(button)
    return true if @keys.include?(button)
    return false
  end 
  #--------------------------------------------------------------------------
  # * Mouse Pressed
  #     button      : button
  #--------------------------------------------------------------------------
  def Mouse.press?(button)
    return true if @press.include?(button)
    return false
  end
  #--------------------------------------------------------------------------
  # * Mouse Pressed
  #     button      : button
  #--------------------------------------------------------------------------
  def Mouse.area?(x, y, width=32, height=32)
    return false if @pos == nil
    return true if @pos[0] >= x and @pos[0] <= (x+width) and @pos[1] >= y and @pos[1] <= (y+height)
    return false
  end
  #--------------------------------------------------------------------------
  # * Mouse Pixel Position
  #--------------------------------------------------------------------------
  def Mouse.pixels
    return @pos == nil ? [0, 0] : @pos
  end
  #--------------------------------------------------------------------------
  # * Mouse Tile Position
  #--------------------------------------------------------------------------
  def Mouse.tiles
    return nil if @pos == nil
    x = @pos[0] / 32
    y = @pos[1] / 32
    return [x, y]
  end
  #--------------------------------------------------------------------------
  # * Set Mouse Position
  #--------------------------------------------------------------------------
  def Mouse.set_pos(x_pos=0, y_pos=0)
    width, height = Mouse.client_size
    if (x_pos.between?(0, width) && y_pos.between?(0, height))
      x = Mouse.client_pos[0] + x_pos; y = Mouse.client_pos[1] + y_pos
      Win32API.new('user32', 'SetCursorPos', 'NN', 'N').call(x, y)
    end
  end
  #--------------------------------------------------------------------------
  # * Mouse Update
  #--------------------------------------------------------------------------
  def Mouse.update
    @pos            = Mouse.pos
    @keys, @press   = [], []
    @keys.push(1)   if Win32API.new("user32","GetAsyncKeyState",['i'],'i').call(1) & 0X01 == 1
    @keys.push(2)   if Win32API.new("user32","GetAsyncKeyState",['i'],'i').call(2) & 0X01 == 1
    @keys.push(3)   if Win32API.new("user32","GetAsyncKeyState",['i'],'i').call(4) & 0X01 == 1
    @press.push(1)  if Win32API.new("user32","GetKeyState",['i'],'i').call(1) & 0X01 == 1
    @press.push(2)  if Win32API.new("user32","GetKeyState",['i'],'i').call(2) & 0X01 == 1
    @press.push(3)  if Win32API.new("user32","GetKeyState",['i'],'i').call(4) & 0X01 == 1
  end 
  #--------------------------------------------------------------------------
  # * Automatic functions below
  #--------------------------------------------------------------------------
  #
  #--------------------------------------------------------------------------
  # * Obtain Mouse position in screen
  #--------------------------------------------------------------------------
  def Mouse.global_pos
    pos = [0, 0].pack('ll')
    if Win32API.new('user32', 'GetCursorPos', 'p', 'i').call(pos) != 0
      return pos.unpack('ll')
    else
      return nil
    end
  end
  #--------------------------------------------------------------------------
  # * Return Screen mouse position within game window
  #--------------------------------------------------------------------------
  def Mouse.pos
    x, y = Mouse.screen_to_client(*Mouse.global_pos)
    width, height = Mouse.client_size
    begin
      if (x >= 0 and y >= 0 and x < width and y < height)
        return x, y
      else
        return nil
      end
    rescue
      return nil
    end
  end
  #--------------------------------------------------------------------------
  #  * Pass Screen to Game System
  #--------------------------------------------------------------------------
  def Mouse.screen_to_client(x, y)
    return nil unless x and y
    pos = [x, y].pack('ll')
    if Win32API.new('user32', 'ScreenToClient', %w(l p), 'i').call(Mouse.hwnd, pos) != 0
      return pos.unpack('ll')
    else
      return nil
    end
  end
  #--------------------------------------------------------------------------
  # * Get Screen Window Handle
  #--------------------------------------------------------------------------
  def Mouse.hwnd
    game_name = "\0" * 256
    Win32API.new('kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l').call('Game','Title','',game_name,255,".\\Game.ini")
    game_name.delete!("\0")
    return Win32API.new('user32', 'FindWindowA', %w(p p), 'l').call('RGSS Player',game_name)
  end
  #--------------------------------------------------------------------------
  # * Get Game Window Size
  #--------------------------------------------------------------------------
  def Mouse.client_size
    rect = [0, 0, 0, 0].pack('l4')
    Win32API.new('user32', 'GetClientRect', %w(l p), 'i').call(Mouse.hwnd, rect)
    right, bottom = rect.unpack('l4')[2..3]
    return right, bottom
  end
  #--------------------------------------------------------------------------
  # * Get Window Position (RGSS Player)
  #--------------------------------------------------------------------------
  def Mouse.client_pos
    rect = [0, 0, 0, 0].pack('l4')
    Win32API.new('user32', 'GetWindowRect', %w(l p), 'i').call(Mouse.hwnd, rect)
    left, upper = rect.unpack('l4')[0..1]
    return left+4, upper+30
  end
end
Spoiler for Hiden:
#==============================================================================
# [VX] SMS - Simple Mouse System
#------------------------------------------------------------------------------
# ? by Woratana [woratana@hotmail.com]
# ? Released on: 14/04/2008 (D-M-Y)
# ? Version: 1.5
#
# ? Credit: DerVVulfman, Near Fantastica, and Freak Boy [Mouse Input Module]
# lambchop, shun, Cybersam, Astro_mech, and Mr.Mo [Super Simple Mouse System]
# - Modern Algebra, Zeriab, Patrick Lester [Path Finding]
# - Near Fantastica, Fuso [Path Finding]
#
# - I will not be able to script this without those people and scripts above
#-----------------------------------------------------------------------------
#====[REQUIRE]=====
# - DerVVulfman's Mouse Input Module
# - Modern Algebra's Path Finding [version 2.0]
#
#====[FEATURE]=====
# - Support to use mouse in many scenes / windows
# - Mouse Pointer
# - Click on map to move player with Path Finding
# - Click on event to go talk/interact with that event
# - Click on event to walk to that event
# - You can choose scene(s) that don't want to use mouse
# - You can turn mouse ON/OFF automatically by call script:
# $scene.no_mouse = (true/false) # True to turn off mouse

#====[MOUSE TAGS]=====
# Put one (or more) of these tags in the event command 'Comment..'
# [mauto] : This event will run automatically after click on it
# [mnone] : This event will not be determine as event when click on it
# (a.k.a. Player will not interact with it)

# [mtop] : Player will always stop at tile above this event when click on it
# [mleft] : Same as [mtop], but left side
# [mright] : Same as [mtop], but right side
# [mdown] : Same as [mtop], but below
#------------------------------------------------------------------------------

module Mouse
#==============================================================================
# MOUSE SETUP PART
#----------------------------------------------------------------------------
Scroll_Delay = 30 # (in Frames)
# Mouse Delay when scroll up or down the list

Path_Finding_Iteration = 0 # (Integer, 0 for no limit)
# How deep you want path finding to process until find the way
# less number will be able to find only easy path, less lag
# high number will be able to find complicated path, possible to increase lag

Scene_No_Mouse = []
# Scene(s) that you don't want to use mouse
# e.g. Scene_No_Mouse = [Scene_File, Scene_Map, Scene_Title]

Auto_Find_Destination = true
# It will automatically find the cloeset destination on map
# when click on unpassable tile.
#==============================================================================
end

#==============================================================================
# ** Mouse Input Module
#==============================================================================
class << Mouse
  show_cursor = Win32API.new('user32', 'ShowCursor', 'l', 'l')
  show_cursor.call(0)

  $mousec = Sprite.new
  $mousec.z = 10001
  $mousec.x = $mousec.y = 1000
  $mouse_icon = $base_cursor = 'Maus'
  $mousec.bitmap = Cache.system($base_cursor)
  $mouse_duration = -1
  $mouse_changed = false
 
  alias wor_mouse_upd_mouse update unless $@
  def Mouse.update
    wor_mouse_upd_mouse
    if $scene.no_mouse
      $mousec.visible = false if $mousec.visible
      return
    else; $mousec.visible = true if !$mousec.visible
    end
    if $mouse_old_icon.nil? or $mouse_old_icon != $mouse_icon
      $mouse_old_icon = $mouse_icon
      $mousec.bitmap = Cache.system($mouse_old_icon)
    end
    if @pos.nil?
      $mousec.x = 1000 if $mousec.x != 1000
      $mousec.y = 1000 if $mousec.y != 1000
    else
      $mousec.x = @pos[0] if $mousec.x != @pos[0]
      $mousec.y = @pos[1] if $mousec.y != @pos[1]
    end
  end
 
  def Mouse.map_pos
    return nil if @pos == nil
    x = ($game_map.display_x / 256) + (@pos[0] / 32)
    y = ($game_map.display_y / 256) + (@pos[1] / 32)
    return [x, y]
  end
end

#==============================================================================
# ** Input
#==============================================================================
class << Input
  alias wor_input_upd_mouse update unless $@
  alias wor_input_trig_mouse trigger? unless $@
  alias wor_input_rep_mouse repeat? unless $@
  def Input.update
    wor_input_upd_mouse
    Mouse.update
  end
 
  def Input.trigger?(input)
    return wor_input_trig_mouse(input) if Mouse.pos.nil?
    if input == Input::B and !$scene.no_mouse
      return (wor_input_trig_mouse(input) or Mouse.click?(2))
    elsif input == Input::C and !$scene.no_mouse
      if $scene.is_a?(Scene_Map) and !$game_message.visible
        return wor_input_trig_mouse(input)
      else
        return (wor_input_trig_mouse(input) or Mouse.click?(1))
      end
    else
      return wor_input_trig_mouse(input)
    end
  end
 
  def Input.repeat?(input)
    if input == Input::B and !$scene.no_mouse
      return (wor_input_rep_mouse(input) or Mouse.click?(2))
    else
      return wor_input_rep_mouse(input)
    end
  end
end
#==============================================================================
# ** Graphics
#==============================================================================
class << Graphics
  alias wor_graph_fadeout_mouse fadeout unless $@
  def Graphics.fadeout(frames = 1)
    $mousec.visible = false if !$mousec.nil?
    wor_graph_fadeout_mouse(frames)
  end
end
#==============================================================================
# ** Window_Selectable
#==============================================================================
class Window_Selectable < Window_Base
  alias wor_winsel_ini_mouse initialize
  alias wor_winsel_upd_mouse update
  def initialize(*args)
    wor_winsel_ini_mouse(*args)
    @scroll_wait = 0
    @cursor_wait = 0
  end

  def update
    wor_winsel_upd_mouse
    update_mouse if self.active and self.visible
  end
 
  def update_mouse
    @cursor_wait -= 1 if @cursor_wait > 0
    (0..@item_max - 1).each do |i|
      irect = item_rect(i)
      irx = self.x + 16 + irect.x - self.ox
      iry = self.y + 16 + irect.y - self.oy
      move_cursor(i) if Mouse.area?(irx, iry, irect.width, irect.height)
    end
  end

  def move_cursor(index)
    return if @index == index
    @scroll_wait -= 1 if @scroll_wait > 0
    row1 = @index / @column_max
    row2 = index / @column_max
    bottom = self.top_row + (self.page_row_max - 1)
    if row1 == self.top_row and row2 < self.top_row
      return if @scroll_wait > 0
      @index = [@index - @column_max, 0].max
      @scroll_wait = Mouse::Scroll_Delay
    elsif row1 == bottom and row2 > bottom
      return if @scroll_wait > 0
      @index = [@index + @column_max, @item_max - 1].min
      @scroll_wait = Mouse::Scroll_Delay
    else
      @index = index
    end
    return if @cursor_wait > 0
    Sound.play_cursor
    @cursor_wait += 2
  end
end
#==============================================================================
# ** Window_MenuStatus
#==============================================================================
class Window_MenuStatus < Window_Selectable
  def item_rect(index)
    return Rect.new(0, index * 96, contents.width, 96)
  end
end
#==============================================================================
# ** Window_NameInput
#==============================================================================
class Window_NameInput < Window_Base
  alias wor_winnam_upd_mouse update
  def update
    wor_winnam_upd_mouse
    if self.active and self.visible
      (0..TABLE[@mode].size - 1).each do |i|
      irect = item_rect(i)
      irx = self.x + 16 + irect.x - self.ox
      iry = self.y + 16 + irect.y - self.oy
      @index = i if Mouse.area?(irx, iry, irect.width, irect.height)
      end
    end
  end
end
#==============================================================================
# ** Window_PartyCommand
#==============================================================================
class Window_PartyCommand < Window_Command
  def update_mouse
    (0..@item_max - 1).each do |i|
    irect = item_rect(i)
    irx = self.viewport.ox + 16 + irect.x - self.ox
    iry = 288 + 16 + irect.y - self.oy
    self.index = i if Mouse.area?(irx, iry, irect.width, irect.height)
    end
  end
end
#==============================================================================
# ** Window_ActorCommand
#==============================================================================
class Window_ActorCommand < Window_Command
  def update_mouse
    (0..@item_max - 1).each do |i|
    irect = item_rect(i)
    irx = self.viewport.ox + 288 + 16 + irect.x
    iry = 288 + 16 + irect.y
    self.index = i if Mouse.area?(irx, iry, irect.width, irect.height)
    end
  end
end
#==============================================================================
# ** Window_Message
#==============================================================================
class Window_Message < Window_Selectable
  def update_mouse
    (0..@item_max - 1).each do |i|
      irect = item_rect(i)
      irx = self.x + 16 + irect.x - self.ox
      iry = self.y + 16 + irect.y - self.oy + ($game_message.choice_start * WLH)
      self.index = i if Mouse.area?(irx, iry, irect.width, irect.height)
    end
  end
end

#==============================================================================
# ** Scene_Base
#==============================================================================
class Scene_Base
  alias wor_scebase_posstr_mouse post_start
  alias wor_scebase_preter_mouse pre_terminate
  attr_accessor :no_mouse
 
  def post_start
    if !$mousec.nil?
      $mousec.visible = true
      @no_mouse = false
      # If this scene is in Scene_No_Mouse
      Mouse::Scene_No_Mouse.each do |sce|
        if $scene.is_a?(sce)
          $mousec.visible = false
          @no_mouse = true
        end
      end
    end
    wor_scebase_posstr_mouse
  end
 
  def pre_terminate
    $mousec.visible = false if !$mousec.nil?
    wor_scebase_preter_mouse
  end
end
#==============================================================================
# ** Scene_File
#==============================================================================
class Scene_File < Scene_Base
  alias wor_scefil_upd_mouse update
  def update
    (0..@item_max - 1).each do |i|
      ix = @savefile_windows[i].x
      iy = @savefile_windows[i].y
      iw = @savefile_windows[i].width
      ih = @savefile_windows[i].height
      if Mouse.area?(ix, iy, iw, ih)
        @savefile_windows[@index].selected = false
        @savefile_windows[i].selected = true
        @index = i
      end
    end
    wor_scefil_upd_mouse
  end
end
#==============================================================================
# ** Scene_Map
#==============================================================================
class Scene_Map < Scene_Base
  alias wor_scemap_upd_mouse update
 
  def update
    wor_scemap_upd_mouse
    if !@no_mouse
      # IF left click
      if Mouse.click?(1) and !$game_message.visible and
        !$game_map.interpreter.running?
        mouse_xy = Mouse.map_pos
        return if mouse_xy.nil?
        old_direction = $game_player.direction
        $game_player.turn_toward_pos(mouse_xy[0], mouse_xy[1])
        # IF click near player, and there's trigger to event, run event
        return if ($game_player.front?(mouse_xy[0],mouse_xy[1]) and
      $game_player.check_action_event)
        $game_player.clear_path
        $game_player.mouse_force_path(mouse_xy[0], mouse_xy[1])
      # IF middle click
      elsif Mouse.click?(3) and !$game_message.visible and
        !$game_map.interpreter.running?
        mouse_xy = Mouse.map_pos
        return if mouse_xy.nil?
        $game_player.clear_path
        $game_player.turn_toward_pos(mouse_xy[0], mouse_xy[1])
      end
    end
  end
end
#==============================================================================
# ** Game_Character
#==============================================================================
class Game_Character
  def mouse_force_path(x, y, auto_check = ($game_map.events_xy(x, y).size > 0))
    ori_x, ori_y = x, y
    path_xy = $game_map.find_dest_xy(x, y, @x, @y)
    return if path_xy.nil?
    x, y = path_xy[0] ,path_xy[1]
    # Force_move from MA's path finding
    if map_passable?(x,y)
      path = $game_map.find_path (self.x, self.y, x, y, false,
      Mouse::Path_Finding_Iteration, self)
      path.reverse!
      # Turn toward destination
      newmove = RPG::MoveCommand.new
      newmove.code = 45 # Script..
      newmove.parameters = ["turn_toward_pos(#{ori_x},#{ori_y})"]
      path.push newmove
      # Add script to check if there's event trigger
      if auto_check
        newmove = RPG::MoveCommand.new
        newmove.code = 45
        newmove.parameters = ['check_action_event']
        path.push newmove
      end
      # Add an end command
      path.push (RPG::MoveCommand.new (0))
      move_route = RPG::MoveRoute.new
      move_route.list = path
      move_route.repeat = false
      force_move_route (move_route)
    end
  end
 
  def clear_path
    @move_route_index = 0
    @move_route = RPG::MoveRoute.new
    @move_route.repeat = false
  end

  def turn_toward_pos(x,y)
    sx = distance_x_from_pos(x)
    sy = distance_y_from_pos(y)
    if sx.abs > sy.abs                    # Horizontal distance is longer
      sx > 0 ? turn_left : turn_right
    elsif sx.abs < sy.abs                 # Vertical distance is longer
      sy > 0 ? turn_up : turn_down
    end
  end

  def distance_x_from_pos(x)
    sx = @x - x
    if $game_map.loop_horizontal?
      if sx.abs > $game_map.width / 2
        sx -= $game_map.width
      end
    end
    return sx
  end
 
  def distance_y_from_pos(y)
    sy = @y - y
    if $game_map.loop_vertical?
      if sy.abs > $game_map.height / 2
        sy -= $game_map.height
      end
    end
    return sy
  end
 
  def front?(x,y)
    case @direction
    when 2; return true if (x == @x-1 and y == @y)
    when 4; return true if (x == @x and y == @y-1)
    when 6; return true if (x == @x and y == @y+1)
    when 8; return true if (x == @x+1 and y == @y)
    end
    return false
  end
end
#==============================================================================
# ** Game_Map
#==============================================================================
class Game_Map
  # Find Destination for Path Finding
  def find_dest_xy(x, y, self_x, self_y)
    has_event = false
    event_ary = events_xy(x, y)
    # Remove Event that has 'mnone'
    (event_ary).each do |i|
      event_ary.delete(i) if i.comment?('[mnone]')
    end
    # Return original x, y if there are more than 1 events,
    # or the only event has priority type 'Below Character'
    if (event_ary.size == 1 and event_ary[0].priority_type != 1) or
    event_ary.size > 1
      return [x, y]
    elsif event_ary.size == 1
      # IF there's event, check for reserved direction
      has_event = true
      if event_ary[0].comment?('[mtop]')
        return [x, y-1]
      elsif event_ary[0].comment?('[mleft]')
        return [x-1, y]
      elsif event_ary[0].comment?('[mright]')
        return [x+1, y]
      elsif event_ary[0].comment?('[mdown]')
        return [x, y+1]
      elsif event_ary[0].comment?('[mauto]')
        event_ary[0].start
        return nil
      end
    end
    # Check for passable direction or it's Same X/Y or doesn't allow auto-find
    if (event_ary.size != 1 and $game_player.map_passable?(x, y)) or (self_x == x and self_y == y) or
  (!Mouse::Auto_Find_Destination and !has_event)
      return [x, y]
    end
    # Find nearest path
    nx = (self_x - x)
    ny = (self_y - y)
    npath_real = []
    if (nx.abs < ny.abs and nx != 0) or (ny == 0) # X is closer than Y
      npath_real << (nx > 0 ? 'right' : 'left')
    else # EQUAL, or Y is closer than X
      npath_real << (ny > 0 ? 'up' : 'down')
    end
    npath_real_tran = move_translate(npath_real, x, y) # Translate word to value
    # If the fastest way is possible, return it
    if $game_player.map_passable?(npath_real_tran[0][0], npath_real_tran[0][1])
      return [npath_real_tran[0][0], npath_real_tran[0][1]]
    end
    npath = []
    # Add other possible ways
    npath << 'up' if !npath_real.include?('up')
    npath << 'left' if !npath_real.include?('left')
    npath << 'down' if !npath_real.include?('down')
    npath << 'right' if !npath_real.include?('right')
    npath = move_translate(npath, x, y) # Translate other possible ways
    (0..npath.size-1).each do |np| # Calculate distance from each point
      npath[np] =
      [npath[np], (self_x - npath[np][0]).abs + (self_y - npath[np][1]).abs]
    end
    npath = npath.sort_by {|i| i[1]} # Sort by Distance
    # Check to move~
    npath.each do |n|
      return [n[0][0], n[0][1]] if $game_player.map_passable?(n[0][0], n[0][1])
    end
    # IF there's no way to go
    return nil
  end
 
  def move_translate(ary, x, y)
    (0..ary.size - 1).each do |n|
      if ary[n] == 'up'
        ary[n] = [x, y-1]
      elsif ary[n] == 'left'
        ary[n] = [x-1, y]
      elsif ary[n] == 'right'
        ary[n] = [x+1, y]
      elsif ary[n] == 'down'
        ary[n] = [x, y+1]
      end
    end
    return ary
  end
end
#==============================================================================
# ** Game_Event
#==============================================================================
class Game_Event < Game_Character
  def comment?(comment, return_index = false )
    if !@list.nil?
      for i in 0...@list.size - 1
        next if @list[i].code != 108
        (0..@list[i].parameters.size - 1).each do |j|
          if @list[i].parameters[j].include?(comment)
            return [true, [i,j]] if return_index
            return true
          end
        end
      end
    end
    return [false, nil] if return_index
    return false
  end
end

Kann mir jemand helfen ?
« Letzte Änderung: April 08, 2010, 21:21:27 von _D3nn!§_ »
Spoiler for Hiden:
-------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------

Spoiler for Hiden:
[desc=Es fehlen nur
nochmal eine kleine
Bugsäuberung und
der Feinschliff ! ^^
]The new Horizon of Evil 2[/desc]
[desc=Downloadbereit ! (Mein Profil oder VX Spiele !)]Gun For Fun[/desc]

Re: Kleine Fragen, schnelle Antwort?

Offline FlipelyFlip

  • Will sein Alter nicht verraten xD
  • Administrator
  • VX-Großmeister
  • ****
  • Beiträge: 884
  • Heyho (=
    • Flips Musik Kariere auf Facebook xD
Re: Kleine Fragen, schnelle Antwort?
« Antwort #1317 am: April 05, 2010, 21:16:31 »
wieso willst du dein Projekt mit $scene = nil beenden? oO

Re: Kleine Fragen, schnelle Antwort?

Offline _D3nn!§_

  • Hat Haare auf dem Kopf =D
  • Database-Verunstalter
  • **
  • Beiträge: 148
  • ~~(Dennisoftware)~~
    • Willste wohl gerne wissen wa? xD
Re: Kleine Fragen, schnelle Antwort?
« Antwort #1318 am: April 06, 2010, 18:16:31 »
Weil ich statt den Titelscreen eine Map benutze ^^ !
Spoiler for Hiden:
-------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------

Spoiler for Hiden:
[desc=Es fehlen nur
nochmal eine kleine
Bugsäuberung und
der Feinschliff ! ^^
]The new Horizon of Evil 2[/desc]
[desc=Downloadbereit ! (Mein Profil oder VX Spiele !)]Gun For Fun[/desc]

Re: Kleine Fragen, schnelle Antwort?

Offline darklight

  • RPG Maker VX Anfänger^^
  • RTP-Mapper
  • *
  • Beiträge: 24
    • WoD
Re: Kleine Fragen, schnelle Antwort?
« Antwort #1319 am: April 06, 2010, 19:42:10 »
Hallo,
ich habe ein Problem,
Wenn ich mein spiel im Fullscreen Modus starte dann flackert das beim fenstermodus nicht.!
Was kann ich tun?

 


 Bild des Monats

rooftop party

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