RPG maker VX
Últimos temas
» Script de menu
por maxi Jue 04 Dic 2014, 1:44 pm

» Ayuda intro animado!!!
por maxi Miér 03 Dic 2014, 9:41 pm

» ayuda con este engin
por maxi Miér 03 Dic 2014, 8:42 am

» Hud de Vida 100% Personalizable - Engine Sencillo! Sin Scripts :)
por davidaikago Jue 20 Nov 2014, 10:58 am

» Ultimate parallax control by:GDS [ace]
por arellano Miér 08 Oct 2014, 8:28 pm

» Script Touhou (animated) Map name (v1.4)
por davidaikago Miér 08 Oct 2014, 2:09 pm

» tutorial puerta nueva
por davidaikago Miér 08 Oct 2014, 9:08 am

» cámara de fotos
por davidaikago Miér 08 Oct 2014, 9:05 am

» Imperial Action System II Demo
por davidaikago Miér 08 Oct 2014, 8:47 am

» VE Batalla animada [ACE]
por FhierusIV Jue 18 Sep 2014, 10:57 am

» Nuevo Reglamento del Foro [Vigente desde Septiembre 2014]
por maxi Miér 17 Sep 2014, 8:37 am

» MOG|Animated Title
por Souta21 Mar 09 Sep 2014, 7:24 pm

» Tutorial Engine - Cambiar Character al Equipar Objeto
por maxi Lun 21 Jul 2014, 10:19 am

» Script de climas
por gambasoxd Sáb 19 Jul 2014, 8:58 am

» Script de contraseña(codigo) para abrir un cofre
por rpgame Jue 03 Jul 2014, 6:03 pm

¿Quién está en línea?
En total hay 1 usuario en línea: 0 Registrados, 0 Ocultos y 1 Invitado

Ninguno

[ Ver toda la lista ]


La mayor cantidad de usuarios en línea fue 117 el Mar 09 Ago 2011, 3:39 pm.

VE| Sprite in windows

Ir abajo

VE| Sprite in windows

Mensaje por pigu_6 el Sáb 24 Nov 2012, 10:25 pm

Script de Victor saint, los creditos para el

Se necesitan estos 3 scripts para q funcione
1. VE|Basic module
[Tienes que estar registrado y conectado para ver este vínculo]

2. VE|Animated Battle
[Tienes que estar registrado y conectado para ver este vínculo]

3. VE| Sprite in Windows (no puedo subir mas archivos a pastebin por hoy)

Código:
#==============================================================================
# ** Victor Engine - Sprite in Windows
#------------------------------------------------------------------------------
# Author : Victor Sant
#
# Version History:
#  v 1.00 - 2012.03.22 > First relase
#------------------------------------------------------------------------------
#  This script is an add on for the 'VE - Animated Battle', it's a tool for
# scripters that allows to add a animated sprite of the battler in windows.
# This script alone don't do anything, it needs the scripter to manually
# set the method that adds the animated sprite.
#------------------------------------------------------------------------------
# Compatibility
#  Requires the script 'Victor Engine - Basic Module' and
#  'Victor Engine - Animated Battle'
#
# * Alias methods (Default)
#  class Window_Base < Window
#    def initialize(x, y, width, height)
#    def update
#    def dispose
#
#  class Window_MenuActor < Window_MenuStatus
#    def initialize
#
#------------------------------------------------------------------------------
# Instructions:
#  To instal the script, open you script editor and paste this script on
#  a new section on bellow the Materials section. This script must also
#  be bellow all the required scripts.
#
#------------------------------------------------------------------------------
# Additional instructions:
#
#  To add the animated sprite, you must add the following method on the window
#  script, this isn't recomended for people without any script knowlegde.
#  draw_animated_actor(battler, x, y, dir, fade)
#    battler : the object with the battler information, it must be a valid
#      Game_Actor or Game_Enemy object.
#    x    : position x of the sprite on the window
#    y    : position y of the sprite on the window
#    dir  : string battler face direction: 'left', 'right', 'down' or 'up'
#      can be omited or nil, in that case the battler will face left.
#    fade : fade effect when the battlers are shown, can be omited
#        if true there will be an fade effect when showing the battlers.
#
#==============================================================================

#==============================================================================
# ** Victor Engine
#------------------------------------------------------------------------------
#  Setting module for the Victor Engine
#==============================================================================

module Victor_Engine
  #--------------------------------------------------------------------------
  # * required
  #  This method checks for the existance of the basic module and other
  #  VE scripts required for this script to work, don't edit this
  #--------------------------------------------------------------------------
  def self.required(name, req, version, type = nil)
    if !$imported[:ve_basic_module]
      msg = "The script '%s' requires the script\n"
      msg += "'VE - Basic Module' v%s or higher above it to work properly\n"
      msg += "Go to http://victorscripts.wordpress.com/ to download this script."
      msgbox(sprintf(msg, self.script_name(name), version))
      exit
    else
      self.required_script(name, req, version, type)
    end
  end
  #--------------------------------------------------------------------------
  # * script_name
  #  Get the script name base on the imported value
  #--------------------------------------------------------------------------
  def self.script_name(name, ext = "VE")
    name = name.to_s.gsub("_", " ").upcase.split
    name.collect! {|char| char == ext ? "#{char} -" : char.capitalize }
    name.join(" ")
  end
end

$imported ||= {}
$imported[:ve_sprite_in_window] = 1.00
Victor_Engine.required(:ve_sprite_in_window, :ve_basic_module, 1.00, :above)
Victor_Engine.required(:ve_sprite_in_window, :ve_animated_battle, 1.00, :above)

#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This is a superclass of all windows in the game.
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Alias method: initialize
  #--------------------------------------------------------------------------
  alias :initialize_ve_sprite_in_window :initialize
  def initialize(x, y, width, height)
    initialize_ve_sprite_in_window(x, y, width, height)
    @animate_battlers = {}
  end
  #--------------------------------------------------------------------------
  # * Alias method: update
  #--------------------------------------------------------------------------
  alias :update_ve_sprite_in_window :update
  def update
    update_ve_sprite_in_window
    @animate_battlers.values.each {|sprite| update_sprite(sprite) if sprite }
  end
  #--------------------------------------------------------------------------
  # * Alias method: dispose
  #--------------------------------------------------------------------------
  alias :dispose_ve_sprite_in_window :dispose
  def dispose
    dispose_ve_sprite_in_window
    @animate_battlers.values.each {|sprite| sprite.dispose if sprite }
  end
  #--------------------------------------------------------------------------
  # * New method: draw_animated_actor
  #--------------------------------------------------------------------------
  def draw_animated_actor(battler, x, y, dir = 'left', fade = false)
    sprite = @animate_battlers[[battler.id, battler.actor?]]
    sprite.dispose if sprite && !shared_bimap(sprite)
    if !sprite || sprite.bitmap.disposed?
      viewport  = Viewport.new(0, 0, width - 32, height - 32)
      viewport.z = self.z
      sprite = Sprite_Animated_Battler.new(viewport, battler, dir, fade)
      @animate_battlers[[battler.id, battler.actor?]] = sprite
    end
    sprite.setup_position(x, y)
    update_sprite(sprite)
  end
  #--------------------------------------------------------------------------
  # * New method: update_sprite
  #--------------------------------------------------------------------------
  def update_sprite(sprite)
    sprite.update
    sprite.sprite_position(self.ox, self.oy)
    sprite.visible        = self.visible
    sprite.viewport.rect.x = self.x + 16
    sprite.viewport.rect.y = self.y + 16
  end
  #--------------------------------------------------------------------------
  # * New method: shared_bimap
  #--------------------------------------------------------------------------
  def shared_bimap(battler)
    list = @animate_battlers.values - [battler]
    list.any? {|sprite| battler.bitmap == sprite.bitmap }
  end
end

#==============================================================================
# ** Window_MenuActor
#------------------------------------------------------------------------------
#  This window is for selecting actors that will be the target of item or
# skill use.
#==============================================================================

class Window_MenuActor < Window_MenuStatus
  #--------------------------------------------------------------------------
  # * Alias method: initialize
  #--------------------------------------------------------------------------
  alias :initialize_ve_sprite_in_window_menuactor :initialize
  def initialize
    initialize_ve_sprite_in_window_menuactor
    refresh
  end
end

#==============================================================================
# ** Sprite_Animated_Battler
#------------------------------------------------------------------------------
#  This sprite is used to display battlers on windows
#==============================================================================

class Sprite_Animated_Battler < Sprite_Battler
  #--------------------------------------------------------------------------
  # * Initialize
  #--------------------------------------------------------------------------
  def initialize(viewport, battler, dir, fade)
    @fade = fade
    super(viewport, battler)
    @battler.direction = setup_direction(dir)
    update
  end
  #--------------------------------------------------------------------------
  # * init_variables
  #--------------------------------------------------------------------------
  def init_variables
    @frame = 0
    @sufix = ""
    @pose_sufix = ""
    @anim_sufix = VE_SPRITE_SUFIX
    @pose_count  = 0
    @frame_width  = 0
    @frame_height = 0
    @pose_value  = {}
    @icon_list    = {}
    @throw_list  = []
    if @fade
      start_effect(:appear)
    else
      self.opacity = 255
      @battler_visible = true
    end
    @battler.clear_poses
    setup_positions
  end
  #--------------------------------------------------------------------------
  # * setup_position
  #--------------------------------------------------------------------------
  def setup_position(x, y)
    @x = x + 32
    @y = y + 64
  end
  #--------------------------------------------------------------------------
  # * sprite_position
  #--------------------------------------------------------------------------
  def sprite_position(ox, oy)
    self.x = @x + adjust_x - ox
    self.y = @y + adjust_y - oy
  end
  #--------------------------------------------------------------------------
  # * update_position
  #--------------------------------------------------------------------------
  def setup_direction(dir)
    case dir.downcase
    when 'down'  then 2
    when 'left'  then 4
    when 'right' then 6
    when 'up'    then 8
    else 4
    end
  end
end

Para hacerlo funcionar si no tienen ningun script de menu puesto,es decir q estan con el menu base del rpgmaker deben hacer esto:


vamos a la lista de scripts a los q vienen por defecto en el Rpgmaker, particlarmente al Window_MenuStatus en la linea 52

Sustituimos el q dice Draw_actor_face(.........................)

por

draw_animated_actor(actor, rect.x + 10, rect.y + 20, 'left', fade = true)

En este post esta la explicacion de como ponerle los sprites a cada personaje, enemigos y usarlos en batalla
[Tienes que estar registrado y conectado para ver este vínculo]



Muestra del script:
[Tienes que estar registrado y conectado para ver esa imagen]
avatar
pigu_6
300
300

Masculino

Edad 27

Cantidad de envíos 397

Maker Cash 714

Reputación 95


Extras
Sobre mí::

Volver arriba Ir abajo

Volver arriba

- Temas similares

 
Permisos de este foro:
No puedes responder a temas en este foro.