-40%
Le deal à ne pas rater :
Tefal Ingenio Emotion – Batterie de cuisine 10 pièces (induction, ...
59.99 € 99.99 €
Voir le deal

Aller en bas
rick72747
rick72747
Membre

Nombre de messages : 12
Distinction : aucune
Date d'inscription : 08/06/2010

Marché dans 8 directions avec des charas Kaduki (inactif) Empty Marché dans 8 directions avec des charas Kaduki (inactif)

Jeu 7 Avr 2011 - 23:42
Bonjour
Type de script: Tout est dans le titre
Explication complete:: J'ai les charas Kadukis et quelque un sont en diagonales et je cherche un script pour les voirs marcher
en diagonale. Il y a un script comme ca sur le forum mais c'est pour de grand template.
Ressources supplémentaires: Ce chara est un exemple:
Spoiler:
Voila avec une information supplémentaire le chara aura comme nom : $nom du charas_5
Exemples dans un jeu video: Je ne peut pas
Scripts déjà possédés: Je ne pense pas que cela servirait a grand chose.
Merci d'avance !


rick72747
rick72747
Membre

Nombre de messages : 12
Distinction : aucune
Date d'inscription : 08/06/2010

Marché dans 8 directions avec des charas Kaduki (inactif) Empty Re: Marché dans 8 directions avec des charas Kaduki (inactif)

Sam 9 Avr 2011 - 10:55
UP !!!
Maloume
Maloume
Membre

Nombre de messages : 623
Age : 29
Localisation : Marseille mon con
Distinction : aucune
Date d'inscription : 28/05/2010

Marché dans 8 directions avec des charas Kaduki (inactif) Empty Re: Marché dans 8 directions avec des charas Kaduki (inactif)

Sam 9 Avr 2011 - 11:24
tu sais ça existe déja. J'ai plus le lien mais jte le rdonnerai stu veux.
rick72747
rick72747
Membre

Nombre de messages : 12
Distinction : aucune
Date d'inscription : 08/06/2010

Marché dans 8 directions avec des charas Kaduki (inactif) Empty Re: Marché dans 8 directions avec des charas Kaduki (inactif)

Sam 9 Avr 2011 - 22:31
D'accord je veux bien.
rick72747
rick72747
Membre

Nombre de messages : 12
Distinction : aucune
Date d'inscription : 08/06/2010

Marché dans 8 directions avec des charas Kaduki (inactif) Empty Re: Marché dans 8 directions avec des charas Kaduki (inactif)

Jeu 14 Avr 2011 - 18:21
UP !!! Pourquoi personne ne me reponds. Au moins dire que ca sert a rien de upper.
Maloume
Maloume
Membre

Nombre de messages : 623
Age : 29
Localisation : Marseille mon con
Distinction : aucune
Date d'inscription : 28/05/2010

Marché dans 8 directions avec des charas Kaduki (inactif) Empty Re: Marché dans 8 directions avec des charas Kaduki (inactif)

Jeu 14 Avr 2011 - 18:26
Ca sert à rien de upper. Jtexplique je cherche ce script mais ya tellement de trucs sur mon ordi que ça met du temps !
Garruk
Garruk
Membre

Nombre de messages : 1030
Age : 39
Localisation : Evreux 27
Distinction : The Master Show de 2011
Date d'inscription : 13/09/2009

Marché dans 8 directions avec des charas Kaduki (inactif) Empty Re: Marché dans 8 directions avec des charas Kaduki (inactif)

Jeu 14 Avr 2011 - 22:21
Djidane à mis une démo des script de Yanfly, le script est dans le pack regarde sur le forum il est dans la partie script, cherche "un nouveau monde", c'est un titre du genre. =)
Maloume
Maloume
Membre

Nombre de messages : 623
Age : 29
Localisation : Marseille mon con
Distinction : aucune
Date d'inscription : 28/05/2010

Marché dans 8 directions avec des charas Kaduki (inactif) Empty Re: Marché dans 8 directions avec des charas Kaduki (inactif)

Ven 15 Avr 2011 - 10:32
Je sais ça, malheureusement le téléchargement n'est plus dispo. Heureusement je l'ai toujours sur mon fixe mais j'y ai pas accès là.
Girlo
Girlo
Membre

Nombre de messages : 468
Age : 29
Localisation : Chez ta mamie [punchline]
Distinction : Ronce-Man dans toute sa splendeur [Coco' Marché dans 8 directions avec des charas Kaduki (inactif) 344805]
Date d'inscription : 31/07/2009

Marché dans 8 directions avec des charas Kaduki (inactif) Empty Re: Marché dans 8 directions avec des charas Kaduki (inactif)

Ven 15 Avr 2011 - 12:43
Il me semble que c'est ça que tu cherche Wink
Il est bien du pack de YanFly.

Au plaisir de t'avoir aidé rick72747 Smile



Code:
#===============================================================================
#
# Yanfly Engine Zealous - Extended Movement
# Last Date Updated: 2010.02.05
# Level: Easy, Normal, Hard
#
# This script adds for easy 8 directional movement and character sheet support.
# Although the character sheets need to be specially made, once done, they're
# extremely flexibile and offer a plethora of options. 8 directional movement
# allows the player to save a lot of time traveling basically anywhere quicker.
# There's also the ability to adjust the innate default dashing speed.
#
#===============================================================================
# Updates
# -----------------------------------------------------------------------------
# o 2010.01.05 - Added Reverse Poses.
# o 2010.01.10 - Idling pose options added.
# o 2010.01.08 - Started Script and Finished.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials but above ▼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Setting up 8 Directional Sprite Sheets
# -----------------------------------------------------------------------------
# 1. Create a typical 4 column by 2 row sprite sheet. The columns are as follow
#
#    Down            Down Left      Down Dash      Down Left Dash
#    Left            Upper Left      Left Dash      Upper Left Dash
#    Right          Down Right      Right Dash      Down Right Dash
#    Up              Upper Right    Up Dash        Up Right Dash
#
#    Ready/Idle      Victory Pose    2H Swing       
#    Damage          Evade/Dodge    1H Swing       
#    Dazed/Critical  Dead 1-3        Cast/Use Item 
#    Marching        Downed/Fallen  Channeling     
#
# 2. For the file name, place _8D after it.
#    example: Actor_01.png would look like Actor_01_8D.png
#
# 3. And just use them as your actor's graphic. It's as easy as that. You can
#    download some of the pre-made actor sheets on Pockethouse as reference.
#
# -----------------------------------------------------------------------------
# Equip Tags - Insert the following tags into Weapon and Armour noteboxes.
# -----------------------------------------------------------------------------
# <dash speed +n%> <dash speed -n%>
# Equipping the said piece of weapon/armour will increase or decrease the
# player's onscreen dash speed by n%. This effect is cummulative across all
# of the party members with the item equipped.
#
# -----------------------------------------------------------------------------
# Movement Route Event Editor Call Scripts
# -----------------------------------------------------------------------------
# @mirror = true    or    @mirror = false
# This will mirror the image of the used character set. They will still face
# the same direction but use the other side's character sheet instead.
#
# @pose = "value"
# This will cause your to do a unique pose so long as they have an _8D sheet.
# Replace value with any of the cases below:
#
#    Normal            Ready            Damage            Critical
#    March            Victory          Evade            Fallen
#    Dead1            Dead2            Dead3            2H Swing
#    1H Swing          Cast              Channel
#    1H Swing Reverse  2H Swing Reverse
#
# break_pose
# This breaks the character out of a pose and back to regular standing format.
# Important for those long pose sequences. If the player regains movement, the
# player will also break out of a pose when the next movement input is done.
#
#===============================================================================
# Compatibility
# -----------------------------------------------------------------------------
# - Works With: Anything that doesn't affect movement systems.
# -----------------------------------------------------------------------------
# Note: This script may not work with former Yanfly Engine ReDux scripts.
#      Use Yanfly Engine Zealous scripts to work with this if available.
#===============================================================================

$imported = {} if $imported == nil
$imported["ExtendedMovement"] = true

module YEZ
  module MOVEMENT
   
    # The following constant allows for 8 directional movement. Set it to
    # false if you don't wish for it to occur.
    ENABLE_8D_MOVEMENT = true
   
    # If the above is enabled, tap directioning is also available. For those
    # wondering what tap directioning is, the player can just tap a direction
    # and the player character will face that direction rather than straight
    # out walking that direction. The following adjusts how many frames the
    # game will allow leeway for tap facing.
    TAP_COUNTER = 6
   
    # The next two constants allow you to set idle poses after your player
    # doesn't touch any directional keys for however many frames. Remember,
    # there are 60 frames in a second. If you don't want a pose to trigger,
    # just leave the array empty and nothing will happen. Otherwise, fill
    # the array with any poses you would like the character do. Poses will
    # be randomly selected from the array.
    IDLE_POSE  = ["Ready", "March", "Victory"]
    IDLE_FRAMES = 360
   
    # The following determines the dash speed given to your player. The speed
    # value is a percentage out of 100. With 150, the player dashes +50% faster.
    # With 200, the player dashes twice as fast. You know the drill.
    DASH_SPEED_VARIABLE = 24
    DEFAULT_DASH_SPEED  = 150
   
  end # MOVEMENT
end # YEZ

#===============================================================================
# Editting anything past this point may potentially result in causing computer
# damage, incontinence, explosion of user's head, coma, death, and/or halitosis.
# Therefore, edit at your own risk.
#===============================================================================

module YEZ
  module REGEXP
    module BASEITEM
      DASH_SPEED = /^<(?:DASH_SPEED|dash speed)[ ]*([\+\-]\d+)([%%])>/i
    end
  end
end
module YEZ::MOVEMENT
  SUFFIX = "8D"
end # YEZ::MOVEMENT

#===============================================================================
# RPG::BaseItem
#===============================================================================

class RPG::BaseItem
 
  #--------------------------------------------------------------------------
  # common cache: yez_cache_baseitem_em
  #--------------------------------------------------------------------------
  def yez_cache_baseitem_em
    @dash_speed_bonus = 0
   
    self.note.split(/[\r\n]+/).each { |line|
      case line
      when YEZ::REGEXP::BASEITEM::DASH_SPEED
        @dash_speed_bonus = $1.to_i
      end
    } # end self.note.split
  end # yez_cache_baseitem_em
 
  #--------------------------------------------------------------------------
  # new method: dash_speed_bonus
  #--------------------------------------------------------------------------
  def dash_speed_bonus
    yez_cache_baseitem_em if @dash_speed_bonus == nil
    return @dash_speed_bonus
  end
 
end # RPG::BaseItem

#===============================================================================
# Game_Character
#===============================================================================

class Game_Character
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :mirror
  attr_accessor :pose
  attr_accessor :pattern
  attr_accessor :walk_anime
  attr_accessor :step_anime
  attr_accessor :move_frequency
  attr_accessor :anti_straighten
  attr_accessor :dash_speed
 
  #--------------------------------------------------------------------------
  # new method: break_pose
  #--------------------------------------------------------------------------
  def break_pose
    return unless @pose != nil and @pose != ""
    @pattern = 1
    @pose = nil
    @anti_straighten = false
    @walk_anime = true
    @step_anime = false
  end
 
  #--------------------------------------------------------------------------
  # alias method: update_stop
  #--------------------------------------------------------------------------
  alias update_stop_em update_stop unless $@
  def update_stop
    return if @anti_straighten
    update_stop_em
  end

  #--------------------------------------------------------------------------
  # alias method: move_lower_left
  #--------------------------------------------------------------------------
  alias move_lower_left_em move_lower_left
  def move_lower_left
    move_lower_left_em
    @direction = 1 unless @direction_fix
  end
 
  #--------------------------------------------------------------------------
  # alias method: move_lower_right
  #--------------------------------------------------------------------------
  alias move_lower_right_em move_lower_right
  def move_lower_right
    move_lower_right_em
    @direction = 3 unless @direction_fix
  end
 
  #--------------------------------------------------------------------------
  # alias method: move_upper_left
  #--------------------------------------------------------------------------
  alias move_upper_left_em move_upper_left
  def move_upper_left
    move_upper_left_em
    @direction = 7 unless @direction_fix
  end
 
  #--------------------------------------------------------------------------
  # alias method: move_upper_right
  #--------------------------------------------------------------------------
  alias move_upper_right_em move_upper_right
  def move_upper_right
    move_upper_right_em
    @direction = 9 unless @direction_fix
  end
 
  if YEZ::MOVEMENT::ENABLE_8D_MOVEMENT
  #--------------------------------------------------------------------------
  # overwrite method: move_random
  #--------------------------------------------------------------------------
  def move_random
    case rand(7)
    when 0;  move_down
    when 1;  move_left
    when 2;  move_right
    when 3;  move_up
    when 4
      if !dir8_passable?(2) and dir8_passable?(4)
        move_left
      elsif dir8_passable?(2) and !dir8_passable?(4)
        move_down
      else
        move_down
        move_left
        @direction = 1
      end
    when 5
      if !dir8_passable?(2) and dir8_passable?(6)
        move_right
      elsif dir8_passable?(2) and !dir8_passable?(6)
        move_down
      else
        move_down
        move_right
        @direction = 3
      end
    when 6
      if !dir8_passable?(8) and dir8_passable?(4)
        move_left
      elsif dir8_passable?(8) and !dir8_passable?(4)
        move_up
      else
        move_up
        move_left
        @direction = 7
      end
    when 7
      if !dir8_passable?(8) and dir8_passable?(6)
        move_right
      elsif dir8_passable?(8) and !dir8_passable?(6)
        move_up
      else
        move_up
        move_right
        @direction = 9
      end
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: move_toward_player
  #--------------------------------------------------------------------------
  def move_toward_player
    sx = distance_x_from_player
    sy = distance_y_from_player
    if sx != 0 or sy != 0
      if sx.abs > sy.abs
        sx > 0 ? move_left : move_right
        if @move_failed and sy != 0
          sy > 0 ? move_up : move_down
        end
      elsif sx.abs < sy.abs
        sy > 0 ? move_up : move_down
        if @move_failed and sx != 0
          sx > 0 ? move_left : move_right
        end
      elsif sx.abs == sy.abs
        if sx > 0 and sy > 0
          move_up
          move_left
          @direction = 7
        elsif sx < 0 and sy > 0
          move_up
          move_right
          @direction = 9
        elsif sx > 0 and sy < 0
          move_down
          move_left
          @direction = 1
        elsif sx < 0 and sy < 0
          move_down
          move_right
          @direction = 3
        end
      end
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: move_away_from_player
  #--------------------------------------------------------------------------
  def move_away_from_player
    sx = distance_x_from_player
    sy = distance_y_from_player
    if sx != 0 or sy != 0
      if sx.abs > sy.abs
        sx > 0 ? move_right : move_left
        if @move_failed and sy != 0
          sy > 0 ? move_down : move_up
        end
      elsif sx.abs < sy.abs
        sy > 0 ? move_down : move_up
        if @move_failed and sx != 0
          sx > 0 ? move_right : move_left
        end
      elsif sx.abs == sy.abs
        if sx > 0 and sy > 0
          move_down
          move_right
          @direction = 3
        elsif sx < 0 and sy > 0
          move_down
          move_left
          @direction = 1
        elsif sx > 0 and sy < 0
          move_up
          move_right
          @direction = 9
        elsif sx < 0 and sy < 0
          move_up
          move_left
          @direction = 7
        end
      end
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: move_forward
  #--------------------------------------------------------------------------
  def move_forward
    case @direction
    when 2;  move_down(false)
    when 4;  move_left(false)
    when 6;  move_right(false)
    when 8;  move_up(false)
    when 1
      if !dir8_passable?(2) and dir8_passable?(4)
        move_left
      elsif dir8_passable?(2) and !dir8_passable?(4)
        move_down
      else
        move_down
        move_left
      end
    when 3
      if !dir8_passable?(2) and dir8_passable?(6)
        move_right
      elsif dir8_passable?(2) and !dir8_passable?(6)
        move_down
      else
        move_down
        move_right
      end
    when 7
      if !dir8_passable?(8) and dir8_passable?(4)
        move_left
      elsif dir8_passable?(8) and !dir8_passable?(4)
        move_up
      else
        move_up
        move_left
      end
    when 9
      if !dir8_passable?(8) and dir8_passable?(6)
        move_right
      elsif dir8_passable?(8) and !dir8_passable?(6)
        move_up
      else
        move_up
        move_right
      end
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: move_backward
  #--------------------------------------------------------------------------
  def move_backward
    last_direction_fix = @direction_fix
    @direction_fix = true
    case @direction
    when 2;  move_up(false)
    when 4;  move_right(false)
    when 6;  move_left(false)
    when 8;  move_down(false)
    when 9
      if !dir8_passable?(2) and dir8_passable?(4)
        move_left
      elsif dir8_passable?(2) and !dir8_passable?(4)
        move_down
      else
        move_down
        move_left
      end
    when 7
      if !dir8_passable?(2) and dir8_passable?(6)
        move_right
      elsif dir8_passable?(2) and !dir8_passable?(6)
        move_down
      else
        move_down
        move_right
      end
    when 3
      if !dir8_passable?(8) and dir8_passable?(4)
        move_left
      elsif dir8_passable?(8) and !dir8_passable?(4)
        move_up
      else
        move_up
        move_left
      end
    when 1
      if !dir8_passable?(8) and dir8_passable?(6)
        move_right
      elsif dir8_passable?(8) and !dir8_passable?(6)
        move_up
      else
        move_up
        move_right
      end
    end
    @direction_fix = last_direction_fix
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: turn_random
  #--------------------------------------------------------------------------
  def turn_random
    case rand(7)
    when 0; turn_up
    when 1; turn_right
    when 2; turn_left
    when 3; turn_down
    when 4; set_direction(1)
    when 5; set_direction(3)
    when 6; set_direction(7)
    when 7; set_direction(9)
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: turn_toward_player
  #--------------------------------------------------------------------------
  def turn_toward_player
    sx = distance_x_from_player
    sy = distance_y_from_player
    if sx.abs > sy.abs
      sx > 0 ? turn_left : turn_right
    elsif sx.abs < sy.abs
      sy > 0 ? turn_up : turn_down
    elsif sx.abs == sy.abs
      if sx > 0 and sy > 0
        set_direction(7)
      elsif sx < 0 and sy > 0
        set_direction(9)
      elsif sx > 0 and sy < 0
        set_direction(1)
      elsif sx < 0 and sy < 0
        set_direction(3)
      end
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: turn_away_from_player
  #--------------------------------------------------------------------------
  def turn_away_from_player
    sx = distance_x_from_player
    sy = distance_y_from_player
    if sx.abs > sy.abs
      sx > 0 ? turn_right : turn_left
    elsif sx.abs < sy.abs
      sy > 0 ? turn_down : turn_up
    elsif sx.abs == sy.abs
      if sx > 0 and sy > 0
        set_direction(3)
      elsif sx < 0 and sy > 0
        set_direction(1)
      elsif sx > 0 and sy < 0
        set_direction(9)
      elsif sx < 0 and sy < 0
        set_direction(7)
      end
    end
  end
 
  #--------------------------------------------------------------------------
  # new method: dir8_passable?
  #--------------------------------------------------------------------------
  def dir8_passable?(direction)
    case direction
    when 1
      return passable?(@x-1, @y+1)
    when 2
      return passable?(@x, @y+1)
    when 3
      return passable?(@x+1, @y+1)
    when 4
      return passable?(@x-1, @y)
    when 6
      return passable?(@x+1, @y)
    when 7
      return passable?(@x-1, @y-1)
    when 8
      return passable?(@x, @y-1)
    when 9
      return passable?(@x+1, @y-1)
    end
  end
  end # YEZ::MOVEMENT::ENABLE_8D_MOVEMENT
 
end # Game_Character

#===============================================================================
# Game_Player
#===============================================================================

class Game_Player < Game_Character
 
  if YEZ::MOVEMENT::ENABLE_8D_MOVEMENT
  #--------------------------------------------------------------------------
  # overwrite method: move_by_input
  #--------------------------------------------------------------------------
  def move_by_input
    return unless movable?
    return if $game_map.interpreter.running?
    @tap_counter = YEZ::MOVEMENT::TAP_COUNTER if @tap_counter == nil
    @idle_frames = 0 if @idle_frames == nil
    if Input.dir8 != 0
      break_pose
      @tap_counter -= 1
      @direction = Input.dir8
      @idle_frames = 0
      return if @tap_counter > 0
    else
      @idle_frames += 1
      @tap_counter = YEZ::MOVEMENT::TAP_COUNTER
    end
    if @idle_frames > YEZ::MOVEMENT::IDLE_FRAMES and
    (@pose == nil or @pose == "")
      @pose = YEZ::MOVEMENT::IDLE_POSE[rand(YEZ::MOVEMENT::IDLE_POSE.size + 1)]
    end
    case Input.dir8
    when 2; move_down
    when 4; move_left
    when 6; move_right
    when 8; move_up
    when 1
      if !dir8_passable?(2) and dir8_passable?(4)
        move_left
      elsif dir8_passable?(2) and !dir8_passable?(4)
        move_down
      else
        move_down
        move_left
        @direction = Input.dir8
      end
    when 3
      if !dir8_passable?(2) and dir8_passable?(6)
        move_right
      elsif dir8_passable?(2) and !dir8_passable?(6)
        move_down
      else
        move_down
        move_right
        @direction = Input.dir8
      end
    when 7
      if !dir8_passable?(8) and dir8_passable?(4)
        move_left
      elsif dir8_passable?(8) and !dir8_passable?(4)
        move_up
      else
        move_up
        move_left
        @direction = Input.dir8
      end
    when 9
      if !dir8_passable?(8) and dir8_passable?(6)
        move_right
      elsif dir8_passable?(8) and !dir8_passable?(6)
        move_up
      else
        move_up
        move_right
        @direction = Input.dir8
      end
    end
  end
  end # YEZ::MOVEMENT::ENABLE_8D_MOVEMENT

  #--------------------------------------------------------------------------
  # overwrite method: update_move
  #--------------------------------------------------------------------------
  def update_move
    distance = 2 ** @move_speed
    if dash?
      distance *= @dash_speed
      distance /= 100
    end
    distance = Integer(distance)
    @real_x = [@real_x - distance, @x * 256].max if @x * 256 < @real_x
    @real_x = [@real_x + distance, @x * 256].min if @x * 256 > @real_x
    @real_y = [@real_y - distance, @y * 256].max if @y * 256 < @real_y
    @real_y = [@real_y + distance, @y * 256].min if @y * 256 > @real_y
    update_bush_depth unless moving?
    if @walk_anime
      @anime_count += 1.5
    elsif @step_anime
      @anime_count += 1
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: update_dash_speed
  #--------------------------------------------------------------------------
  def update_dash_speed
    dash_variable = YEZ::MOVEMENT::DASH_SPEED_VARIABLE
    if $game_variables[dash_variable] <= 0
      $game_variables[dash_variable] = YEZ::MOVEMENT::DEFAULT_DASH_SPEED
    end
    @dash_speed = $game_variables[YEZ::MOVEMENT::DASH_SPEED_VARIABLE]
    for member in $game_party.members
      for item in member.equips.compact do @dash_speed += item.dash_speed_bonus end
    end
  end
 
end # Game_Player

#===============================================================================
# Game_Interpreter
#===============================================================================

class Game_Interpreter
 
  #--------------------------------------------------------------------------
  # alias method: command_122
  #--------------------------------------------------------------------------
  alias command_122_em command_122 unless $@
  def command_122
    n = command_122_em
    $game_player.update_dash_speed if @params[0] ==
      YEZ::MOVEMENT::DASH_SPEED_VARIABLE
   
    return n
  end
 
end # Game_Interpreter

#===============================================================================
# Sprite_Character
#===============================================================================

class Sprite_Character < Sprite_Base
 
  #--------------------------------------------------------------------------
  # constants
  #--------------------------------------------------------------------------
  DIR8_FRAMES ={ 1=>2, 2=>2, 3=>6, 4=>4, 6=>6, 7=>4, 8=>8, 9=>8 }
 
  #--------------------------------------------------------------------------
  # alias method: update_bitmap
  #--------------------------------------------------------------------------
  alias update_bitmap_em update_bitmap unless $@
  def update_bitmap
    name_changed = (@character_name != @character.character_name)
    update_bitmap_em
    @appropiate_file = nil if name_changed
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: update_src_rect
  #--------------------------------------------------------------------------
  def update_src_rect
    if @tile_id == 0
      index = @character.character_index
      if !posing?
        @pose_pattern = nil
        @pose_duration = nil
      end
      if posing?
        pose_creation
      elsif dashing? and diagonal?
        @index_value = index+3
      elsif dashing?
        @index_value = index+2
      elsif diagonal?
        @index_value = index+1
      else
        @index_value = index
      end
      pattern = @character.pattern < 3 ? @character.pattern : 1
      @dir8 = DIR8_FRAMES[@character.direction]
      self.mirror = mirror?
      sx = (@index_value % 4 * 3 + pattern) * @cw
      sy = (@index_value / 4 * 4 + (@dir8 - 2) / 2) * @ch
      self.src_rect.set(sx, sy, @cw, @ch)
    end
  end
 
  #--------------------------------------------------------------------------
  # new method: posing?
  #--------------------------------------------------------------------------
  def posing?
    return false unless appropiate_filename?
    pose = (@character.pose != nil and !@character.pose != "")
    if pose and @pose_duration == nil
      @pose_duration = (18 - @character.move_frequency * 2)
      @pose_pattern = -1
    end
    @pose_duration = 0 if !pose
    return pose
  end
 
  #--------------------------------------------------------------------------
  # new method: diagonal?
  #--------------------------------------------------------------------------
  def diagonal?
    return false unless YEZ::MOVEMENT::ENABLE_8D_MOVEMENT
    return false unless appropiate_filename?
    return true if [1, 3, 7, 9].include?(@character.direction)
    return false
  end
 
  #--------------------------------------------------------------------------
  # new method: dashing?
  #--------------------------------------------------------------------------
  def dashing?
    return false unless @character.dash?
    return false unless appropiate_filename?
    return true if Input.dir8 != 0
    return false
  end
 
  #--------------------------------------------------------------------------
  # new method: appropiate_filename?
  #--------------------------------------------------------------------------
  def appropiate_filename?
    if @appropiate_file == nil
      name = @character_name[/(.*)_(.*)/]
      @appropiate_file = ($2.to_s == YEZ::MOVEMENT::SUFFIX)
    end
    return @appropiate_file
  end
 
  #--------------------------------------------------------------------------
  # new method: mirror?
  #--------------------------------------------------------------------------
  def mirror?
    @index_value = [@index_value, @index_value+7].min
    if @character.mirror and (@character.pose == nil or @character.pose == "")
      case @dir8
      when 2
        @dir8 = 6 if diagonal?
      when 4
        @dir8 = diagonal? ? 8 : 6
      when 6
        @dir8 = diagonal? ? 2 : 4
      when 8
        @dir8 = 4 if diagonal?
      end
    end
    return @character.mirror
  end
 
  #--------------------------------------------------------------------------
  # new method: pose_creation
  #--------------------------------------------------------------------------
  def pose_creation
    case @character.pose.upcase
    #---
    when "NORMAL"
      @index_value = @character.character_index
      @character.break_pose
    #---
    when "READY", "IDLE"
      @index_value = 4
      @character.set_direction(2)
      @character.step_anime = true
    when "DAMAGE", "DMG"
      @index_value = 4
      @character.set_direction(4)
      play_character_pose
    when "PIYORI", "CRITICAL", "DAZED", "DAZE", "DIZZY"
      @index_value = 4
      @character.set_direction(6)
      @character.step_anime = true
    when "MARCH", "FORWARD"
      @index_value = 4
      @character.set_direction(8)
      @character.step_anime = true
    #---
    when "VICTORY", "POSE"
      @index_value = 5
      @character.set_direction(2)
      play_character_pose
    when "EVADE", "DODGE"
      @index_value = 5
      @character.set_direction(4)
      play_character_pose
    when "DEAD", "DEAD1"
      @index_value = 5
      @character.set_direction(6)
      @character.anti_straighten = true
      @character.walk_anime = false
      @character.pattern = 0
    when "DEAD2"
      @index_value = 5
      @character.set_direction(6)
      @character.anti_straighten = true
      @character.walk_anime = false
      @character.pattern = 1
    when "DEAD3"
      @index_value = 5
      @character.set_direction(6)
      @character.anti_straighten = true
      @character.walk_anime = false
      @character.pattern = 2
    when "DOWN", "DOWNED", "FALLEN"
      @index_value = 5
      @character.set_direction(8)
    #---
    when "2H", "2H SWING"
      @index_value = 6
      @character.set_direction(2)
      play_character_pose
    when "1H", "1H SWING"
      @index_value = 6
      @character.set_direction(4)
      play_character_pose
    when "2H REVERSE", "2H SWING REVERSE"
      @index_value = 6
      @character.set_direction(2)
      play_character_pose(true)
    when "1H REVERSE", "1H SWING REVERSE"
      @index_value = 6
      @character.set_direction(4)
      play_character_pose(true)
    when "CAST", "INVOKE", "ITEM", "MAGIC"
      @index_value = 6
      @character.set_direction(6)
      play_character_pose
    when "CHANT", "CHANNEL", "CHARGE"
      @index_value = 6
      @character.set_direction(8)
      @character.step_anime = true
    #---
    else
      @index_value = @character.character_index
      @character.set_direction(2)
    end
  end
 
  #--------------------------------------------------------------------------
  # new method: play_character_pose
  #--------------------------------------------------------------------------
  def play_character_pose(reverse = false)
    update_amount = (18 - @character.move_frequency * 2)
    @character.anti_straighten = true
    @character.walk_anime = false
    @pose_duration += 1
    if @pose_pattern == nil
      @character.pattern = reverse ? 2 : 0
      @pose_pattern = reverse ? 2 : 0
    end
    if reverse and @pose_pattern > 0 and @pose_duration > update_amount
      @pose_duration = 0
      @pose_pattern -= 1
      @character.pattern = @pose_pattern
    elsif !reverse and @pose_pattern < 2 and @pose_duration > update_amount
      @pose_duration = 0
      @pose_pattern += 1
      @character.pattern = @pose_pattern
    end
  end
 
end # Sprite_Character

#===============================================================================
# Scene_Map
#===============================================================================

class Scene_Map < Scene_Base
 
  #--------------------------------------------------------------------------
  # alias method: start
  #--------------------------------------------------------------------------
  alias start_map_em start unless $@
  def start
    start_map_em
    $game_player.update_dash_speed
  end
 
end # Scene_Map

#===============================================================================
#
# END OF FILE
#
#===============================================================================
rick72747
rick72747
Membre

Nombre de messages : 12
Distinction : aucune
Date d'inscription : 08/06/2010

Marché dans 8 directions avec des charas Kaduki (inactif) Empty Re: Marché dans 8 directions avec des charas Kaduki (inactif)

Ven 15 Avr 2011 - 15:47
Voila merci mais ce script n'est pas compatible avec le sbs kaduki.
Non je ne parle pas de bug de script mais de character car dans le SBS Kaduki il faut mettre un "$" avant les noms et si je mets un "$" devant le charas ou il ya le bonhomme en diagonale et bien cela me prend tout la template et donc le perso a 4 collone de chara et 2 ligne de chara en jeu. Puis si j'enleve les "$" au nom des persos qu'il y a en combat et bas le combat ne veut pas demarrer donc ce n'est pas le script que je recherche.
Merci quand même.
Maloume
Maloume
Membre

Nombre de messages : 623
Age : 29
Localisation : Marseille mon con
Distinction : aucune
Date d'inscription : 28/05/2010

Marché dans 8 directions avec des charas Kaduki (inactif) Empty Re: Marché dans 8 directions avec des charas Kaduki (inactif)

Ven 15 Avr 2011 - 16:05
T'inkiète pas j'ai retrouvé le mien je vai l'adapter aux perso Kaduki !
Aïe. Ca faire, mais j'ai besoin de toutes les directions pour ton perso Kaduki
rick72747
rick72747
Membre

Nombre de messages : 12
Distinction : aucune
Date d'inscription : 08/06/2010

Marché dans 8 directions avec des charas Kaduki (inactif) Empty Re: Marché dans 8 directions avec des charas Kaduki (inactif)

Ven 15 Avr 2011 - 21:36
Ok je c'est pas si c'est sa que tu veux mais tiens:
Spoiler:
Balbereith
Balbereith
Staffeux retraité

Nombre de messages : 4129
Age : 31
Localisation : dans l'ombre...
Distinction : Péripatéticienne à temps perdu
Helly n°666 [Coco' ;D]
mon ptit balbounet p'tit jardinier en herbe(les râteaux ça le connait) [tonton Adurna]
Cultivateur professionnel de la commu' (il a de bons outils en de nombreux exemplaires Marché dans 8 directions avec des charas Kaduki (inactif) 522164 ) [Coco' Smile]
Date d'inscription : 13/05/2009

Marché dans 8 directions avec des charas Kaduki (inactif) Empty Re: Marché dans 8 directions avec des charas Kaduki (inactif)

Sam 3 Sep 2011 - 0:13
Inactif
locker => déplacer.
=> boite aux lettres du staff pour réouverure.
Contenu sponsorisé

Marché dans 8 directions avec des charas Kaduki (inactif) Empty Re: Marché dans 8 directions avec des charas Kaduki (inactif)

Revenir en haut
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum