Emudesc en Facebook!RSS

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

Respuesta
 
Herramientas
  #1  
Antiguo 12-jul-2011, 03:20
Avatar de Blues~
Advanced Member
 
Fecha de Ingreso: julio-2011
Mensajes: 469
Blues~ se está dando a conocer
Icon11 Necesito un script (O engine) de sonidos de paso al caminar [RMXP]

Como lo dice el titulo: Necesito un script o engine de sonidos de paso al caminar.

Ya tengo el sonido del paso, intenté hacer un engine, pero resulto en un terrible FAIL.

El script no lo encuentro EN NINGUNA PARTE so... si me pueden conseguirlo, o explicarme como hacer el bendito engine, se los agradeceria.


Responder Con Cita
  #2  
Antiguo 12-jul-2011, 16:29
Banneado
 
Fecha de Ingreso: abril-2011
Ubicación: Mafia
Mensajes: 1,028
~Doku se está dando a conocer
Predeterminado Re: Necesito un script (O engine) de sonidos de paso al caminar [RMXP]

Código:
#==============================================================================
# ** Hear_Steps
#------------------------------------------------------------------------------
#  by arevulopapo
#  9.11.2006
#==============================================================================

class Game_Character
 #--------------------------------------------------------------------------
 attr_reader  :id                      # ID
 attr_reader  :x                        # map x-coordinate (logical)
 attr_reader  :y                        # map y-coordinate (logical)
 attr_reader  :real_x                  # map x-coordinate (real * 128)
 attr_reader  :real_y                  # map y-coordinate (real * 128)
 attr_reader  :tile_id                  # tile ID (invalid if 0)
 attr_reader  :character_name          # character file name
 attr_reader  :character_hue            # character hue
 attr_reader  :opacity                  # opacity level
 attr_reader  :blend_type              # blending method
 attr_reader  :direction                # direction
 attr_reader  :pattern                  # pattern
 attr_reader  :move_route_forcing      # forced move route flag
 attr_reader  :through                  # through
 attr_accessor :animation_id            # animation ID
 attr_accessor :transparent              # transparent flag
 attr_accessor :hear_steps
 attr_accessor :step_sound
 #--------------------------------------------------------------------------
 def initialize
  @hear_steps = false
  @step_sound = "Audio/SE/paso"
  @id = 0
  @x = 0
  @y = 0
  @real_x = 0
  @real_y = 0
  @tile_id = 0
  @character_name = ""
  @character_hue = 0
  @opacity = 255
  @blend_type = 0
  @direction = 2
  @pattern = 0
  @move_route_forcing = false
  @through = false
  @animation_id = 0
  @transparent = false
  @original_direction = 2
  @original_pattern = 0
  @move_type = 0
  @move_speed = 4
  @move_frequency = 6
  @move_route = nil
  @move_route_index = 0
  @original_move_route = nil
  @original_move_route_index = 0
  @walk_anime = true
  @step_anime = false
  @direction_fix = false
  @always_on_top = false
  @anime_count = 0
  @stop_count = 0
  @jump_count = 0
  @jump_peak = 0
  @wait_count = 0
  @locked = false
  @prelock_direction = 0
 end
 
 def update
  if self.moving? and self.hear_steps == true and (Graphics.frame_count + 2 * self.id) % (18 - @move_speed) == 0
    if self.screen_x > 0 and self.screen_x < 640 and self.screen_y > 0 and self.screen_y < 480
      volume = 100 - 5 * Math.sqrt((self.x - $game_player.x)*(self.x - $game_player.x) + (self.y - $game_player.y)*(self.y - $game_player.y))
      Audio.se_play(@step_sound, volume, 100)
    end
  end
  
  # Branch with jumping, moving, and stopping
  if jumping?
    update_jump
  elsif moving?
    update_move
  else
    update_stop
  end
  # If animation count exceeds maximum value
  # * Maximum value is move speed * 1 taken from basic value 18
  if @anime_count > 18 - @move_speed * 2
    # If stop animation is OFF when stopping
    if not @step_anime and @stop_count > 0
      # Return to original pattern
      @pattern = @original_pattern
    # If stop animation is ON when moving
    else
      # Update pattern
      @pattern = (@pattern + 1) % 4
    end
    # Clear animation count
    @anime_count = 0
  end
  # If waiting
  if @wait_count > 0
    # Reduce wait count
    @wait_count -= 1
    return
  end
  # If move route is forced
  if @move_route_forcing
    # Custom move
    move_type_custom
    return
  end
  # When waiting for event execution or locked
  if @starting or lock?
    # Not moving by self
    return
  end
  # If stop count exceeds a certain value (computed from move frequency)
  if @stop_count > (40 - @move_frequency * 2) * (6 - @move_frequency)
    # Branch by move type
    case @move_type
    when 1  # Random
      move_type_random
    when 2  # Approach
      move_type_toward_player
    when 3  # Custom
      move_type_custom
    end
  end
 end
 
end
Para que se escuche los pasos del heroe:

Llamar script:
get_character(-1).hear_steps = true

Para que se escuche los pasos del evento que se pone el script:

Llamar script:
get_character(0).hear_steps = true
Responder Con Cita
Respuesta



Temas Similares para: Necesito un script (O engine) de sonidos de paso al caminar [RMXP]
Tema Autor Foro Respuestas Último mensaje
[Videotutorial] Para Crear Gamesharks de N64 con Cheat Engine [Paso a Paso] Henryxs87 Nintendo 64 2 09-dic-2010 01:47
ayuda con script ffx batalla lateral RMXP goku4650 RPG Maker 2 20-oct-2010 07:07
[RMXP] Engine Fogata C.R.K RPG Maker 2 17-ago-2010 22:20
RPG maker VX busco script para caminar en diagonal Angar RPG Maker 5 10-jul-2010 00:14
Engine:Tiro con arco [RMXP] C.R.K RPG Maker 6 20-feb-2009 21:29


La franja horaria es GMT +1. La hora actual es: 10:48.


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