Emudesc en Facebook!RSS

Retroceder   Foros de Emudesc > Crea tus propios juegos > RPG Maker > Scripts

Respuesta
 
Herramientas
  #1  
Antiguo 16-jul-2011, 16:48
Banneado
 
Fecha de Ingreso: abril-2011
Ubicación: Mafia
Mensajes: 1,028
~Doku se está dando a conocer
Predeterminado [XP]-Mover Cámara-[Aporte]

Aquí traigo un buen script.

Autor: Falcao

Versión: 1.5

Explicación:

Este script te permite mover la cámara al pulsar una tecla (es personalizable) así como al estilo super mario world de snes.

Script:

Código:
#==================================================================#
#==================================================================#
#  #*****************#        Efecto de camara v1.1, permite      #
#  #*** By Falcao ***#        mover las camaras del juego al      #                  
#  #*****************#        antojo del usuario                  #
#        RMXP                                                    #
# makerpalace.onlinegoo.com        V 1.5                          #
#==================================================================#

module Camara

# Boton para activar la camara (Tecla "D" del teclado)
Button = Input::Z  

# Velocidad de desplazamiento de la camara (del 1 al 10)
Speed = 5

#Interruptor que desabilita o abilita el script (on, off)
CamaraDisable = 50

end

$xrxs = {} if $xrxs == nil
  
class Game_System
  attr_accessor :camara
  alias falcaoscroll_initialize initialize
  def initialize
    falcaoscroll_initialize
    @camara = false
  end
end

class Active_Arrow 
  def initialize
    @arrow_up = Sprite.new
    @arrow_up.bitmap = RPG::Cache.icon("047-Skill04")
    @arrow_up.x = 325
    @arrow_up.y = 40
    @arrow_up.z = 200
    @arrow_up.angle = 180
    @arrow_up.visible = false
    
    @arrow_left = Sprite.new
    @arrow_left.bitmap = RPG::Cache.icon("047-Skill04")
    @arrow_left.x = 32
    @arrow_left.y = 220
    @arrow_left.z = 200
    @arrow_left.angle = 270
    @arrow_left.visible = false
    
    @arrow_down = Sprite.new
    @arrow_down.bitmap = RPG::Cache.icon("047-Skill04")
    @arrow_down.x = 316
    @arrow_down.y = 446
    @arrow_down.z = 200
    @arrow_down.visible = false
    
    @arrow_right = Sprite.new
    @arrow_right.bitmap = RPG::Cache.icon("047-Skill04")
    @arrow_right.x = 600
    @arrow_right.y = 242
    @arrow_right.z = 200
    @arrow_right.angle = 90
    @arrow_right.visible = false
  end
  def update
    if $game_system.camara == true
    case Input.dir4
    when 2
      @arrow_up.zoom_x = 1;  @arrow_up.zoom_y = 1
      @arrow_left.zoom_x = 1;  @arrow_left.zoom_y = 1
      @arrow_right.zoom_x = 1;  @arrow_right.zoom_y = 1
      @arrow_down.zoom_x = 1.4; @arrow_down.zoom_y = 1.4
    when 4
      @arrow_up.zoom_x = 1;  @arrow_up.zoom_y = 1
      @arrow_right.zoom_x = 1;  @arrow_right.zoom_y = 1
      @arrow_down.zoom_x = 1;  @arrow_down.zoom_y = 1
      @arrow_left.zoom_x = 1.4; @arrow_left.zoom_y = 1.4
    when 6
      @arrow_up.zoom_x = 1;  @arrow_up.zoom_y = 1
      @arrow_left.zoom_x = 1;  @arrow_left.zoom_y = 1
      @arrow_down.zoom_x = 1;  @arrow_down.zoom_y = 1
      @arrow_right.zoom_x = 1.4; @arrow_right.zoom_y = 1.4
    when 8
      @arrow_left.zoom_x = 1;  @arrow_left.zoom_y = 1
      @arrow_right.zoom_x = 1;  @arrow_right.zoom_y = 1
      @arrow_down.zoom_x = 1;  @arrow_down.zoom_y = 1
      @arrow_up.zoom_x = 1.4; @arrow_up.zoom_y = 1.4
    end
    @arrow_up.visible = true
      @arrow_left.visible = true
      @arrow_down.visible = true
      @arrow_right.visible = true
    else
      @arrow_up.visible = false
      @arrow_left.visible = false
      @arrow_down.visible = false
      @arrow_right.visible = false
    end
  end
  def dispose
    @arrow_up.dispose
    @arrow_up.bitmap.dispose
    @arrow_left.dispose
    @arrow_left.bitmap.dispose
    @arrow_down.dispose
    @arrow_down.bitmap.dispose
    @arrow_right.dispose
    @arrow_right.bitmap.dispose
  end
end

class Game_Player < Game_Character
  include Camara
  alias falcaocamara_update update
  def update
    falcaocamara_update
      if Input.trigger?(Button) and @camera_action == nil and
        $game_switches[CamaraDisable] == false
        if $xrxs["xas"] == true
        $game_switches[6] = true
        $game_map.refresh
      end
      @walk_anime = false
      $game_system.camara = true
      @camera_action = 1
    elsif Input.trigger?(Button) and @camera_action == 1 and
      $game_switches[CamaraDisable] == false
      center(x, y)
      if $xrxs["xas"] == true
        $game_switches[6] = false
        $game_map.refresh
      end
      @move_speed = 4
      @walk_anime = true
      $game_system.camara = false
      @camera_action = nil
    end
    if $game_system.camara == true
      @move_speed = -20
    unless $game_temp.message_window_showing
      case Input.dir4
      when 2
        turn_down
        $game_map.start_scroll(2, 1,Speed)
      when 4
        turn_left
        $game_map.start_scroll(4, 1,Speed)
      when 6
        turn_right
        $game_map.start_scroll(6, 1,Speed)
      when 8
        turn_up
        $game_map.start_scroll(8, 1,Speed)
      end
    end  
  end
end
end

class Scene_Map
  alias falcaoscroll_main main
  def main
    @arrow_active = Active_Arrow.new
    falcaoscroll_main
    @arrow_active.dispose
  end
  alias falcaoscroll_update update
  def update
    @arrow_active.update
    falcaoscroll_update
  end
end
Instrucciones:

Por defecto se activa pulsando la tecla D, PUEDEN CAMBIARLA por la que quieran y modificar otras cosillas en esta parte del script:

Código:
# Boton para activar la camara (Tecla "D" del teclado)
Button = Input::Z  

# Velocidad de desplazamiento de la camara (del 1 al 10)
Speed = 5

#Interruptor que desabilita o abilita el script (on, off)
CamaraDisable = 50
Espero que les guste

Saludos.


Responder Con Cita
  #2  
Antiguo 16-jul-2011, 17:32
Avatar de Blues~
Advanced Member
 
Fecha de Ingreso: julio-2011
Mensajes: 469
Blues~ se está dando a conocer
Predeterminado Re: [XP]-Mover Cámara-[Aporte]

¡Asi es Night Shade!. ¡Que buen aporte!. Este script ya lo conocia, pero no lo encontraba. Gracias por haberlo traido, se va para mi juego.

+1
Responder Con Cita
Respuesta



Temas Similares para: [XP]-Mover Cámara-[Aporte]
Tema Autor Foro Respuestas Último mensaje
sabeis mover canales en la wii? y sabeis mover el canal disco? yo si Luffy D´monkey Wii Scene 21 22-nov-2010 01:32
Mover Moviles nicox_gba+gc Sugerencias 6 25-nov-2009 23:24
Nintendo wii (No mover) ivanxddx Cafetería 13 07-jul-2009 11:09


La franja horaria es GMT +1. La hora actual es: 22:03.


Powered by vBulletin®


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93