LOGIN
SEARCH
PROFILE
keys: ↑ ↓
LOGOUT
INDEX
MEMBERS
keys: ↑ ↓
HOME
PORTAL
PLAY ALONG
PLAY with WORDS
PLAY with GRAPHICS
PLAY with SOUNDS
PLAY with CODES
PLAY with PROJECTS
keys: ← →
Guest Access
Register:
Members:



Go to page : Previous  1, 2, 3  Next

View previous topic View next topic Go down Message [Page 2 of 3]

Administrator
Administrator
#11 RMXP + XAS = CATERPILLAR! - Page 2 Empty Re: RMXP + XAS = CATERPILLAR!
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
Yo Drago, is this for the stop character animation?
I'm still wrenching on the site but this may take a small edit or placing above cog's extra animation script but it sounds like you got it working. Cool
I will have to check this out.
Administrator
Show Signature
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
Active Member
Active Member
#12 RMXP + XAS = CATERPILLAR! - Page 2 Empty Re: RMXP + XAS = CATERPILLAR!
Loading

LiTTleDRAgo

LiTTleDRAgo
Active Member
Active Member
Active Member
profile
I'm still not finished though...
It still not cross engined
Active Member
Show Signature
Active Member
http://littledrago.blogspot.com
Active Member
Active Member
#13 RMXP + XAS = CATERPILLAR! - Page 2 Empty Re: RMXP + XAS = CATERPILLAR!
Loading

LiTTleDRAgo

LiTTleDRAgo
Active Member
Active Member
Active Member
profile
making this compatible with VX and XAS at the same time is quite a pain, I think I should give up on cross enginering it

Spoiler:
Active Member
Show Signature
Active Member
http://littledrago.blogspot.com
Administrator
Administrator
#14 RMXP + XAS = CATERPILLAR! - Page 2 Empty Re: RMXP + XAS = CATERPILLAR!
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
I can imagine, can't wait to try your latest edit..

once I'm done with this HTML, I'll get back to RGSS

having a fully functional caterpillar and leader switch for XAS that allows combos based upon your party would be awesome to have...
Administrator
Show Signature
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
Active Member
Active Member
#15 RMXP + XAS = CATERPILLAR! - Page 2 Empty Re: RMXP + XAS = CATERPILLAR!
Loading

LiTTleDRAgo

LiTTleDRAgo
Active Member
Active Member
Active Member
profile
forgot to mention, there is a bug

if you use hookshot when your character position is same as one of your party, the game will freeze
Active Member
Show Signature
Active Member
http://littledrago.blogspot.com
Active Member
Active Member
#16 RMXP + XAS = CATERPILLAR! - Page 2 Empty Re: RMXP + XAS = CATERPILLAR!
Loading

LiTTleDRAgo

LiTTleDRAgo
Active Member
Active Member
Active Member
profile
I need someone to edit this to fit with xas

Code:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# [Xp] Caterpillar
# Version: 1.00
# Author : LiTTleDRAgo
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:

module Caterpillar
 
  ACTOR_MAX_PARTY = 4
  PARTY_SPEED = 4

end

#------------------------------------------------------------------------------
# SDK Check
#------------------------------------------------------------------------------
if Object.const_defined?('SDK')
 SDK.log('Caterpillar', 'LiTTleDRAgo', 2, '22.06.11')
 @drg_caterpillar_disabled = !SDK.enabled?('Caterpillar')
end

if !@drg_caterpillar_disabled
#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
#  This class handles the map. It includes scrolling and passable determining
#  functions. Refer to "$game_map" for the instance of this class.
#==============================================================================

class Game_Map
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  alias cater_game_map_setup setup
  #--------------------------------------------------------------------------
  # * Setup
  #--------------------------------------------------------------------------
  def setup(map_id)
    cater_game_map_setup(map_id)
    setup_caterpillar
  end
  #--------------------------------------------------------------------------
  # * Setup Train Actors
  #--------------------------------------------------------------------------
  def setup_caterpillar
    map_event = RPG::Event.new(0, 0)
    size = (2000+Caterpillar::ACTOR_MAX_PARTY)-1
    for i in 2001..size
      map_event.id = i
      @events[i] = Game_Event.new(0, map_event)
      @events[i].move_speed = Caterpillar::PARTY_SPEED
      @events[i].move_frequency = 6
      @events[i].follow_event_id = 0
      @events[i].uncensor = true
    end
    $game_party.caterpillar($game_party.caterpillar_visible)
  end
end
#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
#  This class handles the party. It includes information on amount of gold
#  and items. Refer to "$game_party" for the instance of this class.
#==============================================================================

class Game_Party
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader :caterpillar_visible
  #--------------------------------------------------------------------------
  # * Train Actors
  #--------------------------------------------------------------------------
  def caterpillar(visible)
    @caterpillar_visible = visible.nil? ? false : visible
    size = (2000+Caterpillar::ACTOR_MAX_PARTY)-1
    for i in 2001..size
      actor = $game_party.actors[i-2000]
      next if $game_map.events[i].nil?
      if $game_party.caterpillar_visible and actor
        $game_map.events[i].move_type = 5
        $game_map.events[i].moveto($game_player.x,$game_player.y)
        $game_map.events[i].character_name = actor.character_name
        $game_map.events[i].character_hue = actor.character_hue
      else $game_map.events[i].move_type = 4
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Add an Actor
  #    actor_id : actor ID
  #--------------------------------------------------------------------------
  def add_actor(actor_id)
    actor = $game_actors[actor_id]
    if @actors.size < Caterpillar::ACTOR_MAX_PARTY && !@actors.include?(actor)
      @actors.push(actor)
      $game_player.refresh
    end
  end
end
#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass for the
#  Game_Player and Game_Event classes.
#==============================================================================
class Game_Character
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :character_name,:character_hue,
      :through,  :move_speed, :move_frequency, :move_type,
      :follow_event_id, :uncensor,
      :x2, :y2
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  alias init_cater_fusion initialize
  alias update_cater_fusion update
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    init_cater_fusion
    setup_caterpillar
  end
  #--------------------------------------------------------------------------
  # * Setup Caterpillar
  #--------------------------------------------------------------------------
  def setup_caterpillar
    @follow_event_id = 0
    @x2 = @y2 = 0
  end
  #--------------------------------------------------------------------------
  # * Fusion with Event
  #--------------------------------------------------------------------------
  def move_type_fusion_with_event
    event = (@follow_event_id == 0) ? $game_player : $game_map.events[@follow_event_id]
    return unless event
    @x, @y, @x2, @y2 = event.x, event.y, event.x2, event.y2
    unless @character_name.empty?
      sx, sy = (@real_x - event.real_x).abs, (@real_y - event.real_y).abs
      speed = 7
      if Math.hypot(sx, sy) < 2**speed * 2
        self.character_name = "" if sx == 0 && sy == 0
      else turn_toward_event(@follow_event_id)
      end
    else# @real_x, @real_y = @x2, @y2
    end
  end
  #--------------------------------------------------------------------------
  # * Move to Party Leader
  #--------------------------------------------------------------------------
  def move_type_to_leader
    sx, sy = (@x - $game_player.x), (@y - $game_player.y)
    return if $xrxs_xas && self.throw_active
    return (sx == 0 && sy == 0) ? move_random : move_toward_player
        turn_toward_event  if (sx <= 1 && sx >= -1) && (sy <= 1 && sy >= -1)
    method_defined?(:move_to_me) ?  move_to_me :
    unless moving? || @direction_fix
      x = @direction == 4 ? -1 : @direction == 6 ? 1 : 0
      y = @direction == 2 ? 1 : @direction == 8 ? -1 : 0
      passable?(@x+x, @y+y, @direction) && !(x == 0 && y == 0) ? jump(x*2,y*2) :
      move_toward_player
    end
    @wait_count = 30 * 2 - 1 if !moving?
  end
  #--------------------------------------------------------------------------
  # * Turn Toward Event
  #--------------------------------------------------------------------------
  $noupperleft = true if !method_defined?(:turn_upper_left)
  def turn_toward_event(event_id = 0)
    event = (event_id == 0) ? $game_player : $game_map.events[event_id]
    return unless event
    sx, sy = @x - event.x, @y - event.y
    return if sx == 0 and sy == 0
    if sx.abs == sy.abs
      return if $noupperleft
      sy > 0 ? (sx > 0 ? turn_upper_left : turn_upper_right) :
        (sx > 0 ? turn_lower_left : turn_lower_right)
    else
      sx.abs > sy.abs ? (sx > 0 ? turn_left : turn_right) :
                      (sy > 0 ?  turn_up : turn_down)
    end
  end
  #--------------------------------------------------------------------------
  # * Turn Away From Event
  #--------------------------------------------------------------------------
  def turn_away_from_event(event_id = 0)
    event = (event_id == 0) ? $game_player : $game_map.events[event_id]
    return unless event
    sx, sy = @x - event.x, @y - event.y
    return if sx == 0 and sy == 0
    if sx.abs == sy.abs
      return if $noupperleft
      sy > 0 ? (sx > 0 ? turn_lower_right : turn_lower_left) :
        (sx > 0 ? turn_upper_right : turn_upper_left)
    else
      sx.abs > sy.abs ? (sx > 0 ? turn_right : turn_left) :
                      (sy > 0 ?  turn_down : turn_up)
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    update_cater_fusion
    return if @wait_count > 0 or @move_route_forcing or @starting or lock?
    if @stop_count > (40 - @move_frequency * 2) * (6 - @move_frequency)
      case @move_type
      when 4 then move_type_fusion_with_event
      when 5 then move_type_to_leader
      end
    end
  end
end
#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
#  This class handles the player. Its functions include event starting
#  determinants and map scrolling. Refer to "$game_player" for the one
#  instance of this class.
#==============================================================================
class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  alias cater_game_player_moveto moveto
  alias cater_game_player_refresh refresh
  alias passable_cater  passable?
  #--------------------------------------------------------------------------
  # * Moveto
  #--------------------------------------------------------------------------
  def moveto(x, y)
    cater_game_player_moveto(x, y)
    size = (2000+Caterpillar::ACTOR_MAX_PARTY)-1
    (2001..size).each {|i| $game_map.events[i].moveto(x, y)}
  end
  #--------------------------------------------------------------------------
  # * Move to Designated Position
  #    x : x-coordinate
  #    y : y-coordinate
  #--------------------------------------------------------------------------
  def originmoveto(x, y)
    @x,@y = x % $game_map.width, y % $game_map.height
    @real_x,@real_y = @x * 128, @y * 128
    @prelock_direction = 0
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    cater_game_player_refresh
    self.character_name = @character_name
    $game_party.caterpillar($game_party.caterpillar_visible)
  end
  #--------------------------------------------------------------------------
  # * Passable
  #--------------------------------------------------------------------------
  def passablecater?(x, y, d)
    result = passable_cater(x,y,d)
    new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
    new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
    return true if $xrxs_xas && self.is_a?(Game_Player) && $game_system.fly
    return false unless $game_map.valid?(new_x, new_y)
    return result if @through
    return false unless $game_map.passable?(x, y, d, self) &&
          $game_map.passable?(new_x, new_y, 10 - d)
    $game_map.events.each_value {|event|
      if event.x == new_x && event.y == new_y
        unless event.through
          return true if event.name =~ /<Tembus>/i or
                  event.id > 2000
          return false if self != $game_player
          return false if event.character_name != ""
        end
      end }
    if $game_player.x == new_x and $game_player.y == new_y
      unless $game_player.through
        return false if @character_name != ""
      end
    end
    return result
  end
  #--------------------------------------------------------------------------
  # * Passable
  #--------------------------------------------------------------------------
  def passable?(x, y, d)
    new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
    new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
    return true if $DEBUG and Input.press?(Input::CTRL)
    return false unless $game_map.valid?(new_x, new_y)
    return passablecater?(x, y, d)
  end
end
#===============================================================================
# ■ Patch for XAS
#===============================================================================
if $xrxs_xas
module XRXS_EnemySensor
 #--------------------------------------------------------------------------
 # ● Update Sensor
 #--------------------------------------------------------------------------
  alias update_sensor_uncensor update_sensor
  def update_sensor
    update_sensor_uncensor if !self.uncensor
  end
end
end
#--------------------------------------------------------------------------
# SDK Check End
#--------------------------------------------------------------------------
end
#--------------------------------------------------------------------------
# END OF SCRIPT
#--------------------------------------------------------------------------

to test it

$game_party.caterpillar(true/false)

btw, this forum is so laggy on computer with low bandwith :swt:
Active Member
Show Signature
Active Member
http://littledrago.blogspot.com
Administrator
Administrator
#17 RMXP + XAS = CATERPILLAR! - Page 2 Empty Re: RMXP + XAS = CATERPILLAR!
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
O.o what's this? You made a newer version!? Cool

maybe I can test this in the newer X-plat?
I would like to include the leader switch and caterpillar like in the old one.

more and more methods...

yeah, it could also be the host Forumotion, I use multiple pcz to test this site:

my netbook with good bandwidth and low processing can be laggy for anything video / flash

my desktop low bandwidth and high processing
just browsing can be choppy

my tower high bandwidth and high processing
runs like a charm ^,^

most of the time it's fine, but there are times where it's choppy like a mofo..

I've started a simple site, maybe I'll add more to it...? http://gameface101.playogame.com/h1-g101

ok, I hope to get a solid working version for X3.91 even when XAS4 comes out with the Ally System, I'll still be making projects with XAS3.91
Administrator
Show Signature
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
Active Member
Active Member
#18 RMXP + XAS = CATERPILLAR! - Page 2 Empty Re: RMXP + XAS = CATERPILLAR!
Loading

LiTTleDRAgo

LiTTleDRAgo
Active Member
Active Member
Active Member
profile
there are problems that I haven't fix,

1. if the actor dies the caterpillar still following the player as if nothing happened
2. when use leader switch, the position didn't swap
3. when party member fall, they didn't return
Active Member
Show Signature
Active Member
http://littledrago.blogspot.com
Active Member
Active Member
#19 RMXP + XAS = CATERPILLAR! - Page 2 Empty Re: RMXP + XAS = CATERPILLAR!
Loading

LiTTleDRAgo

LiTTleDRAgo
Active Member
Active Member
Active Member
profile
Here is another caterpillar script
ripped and modified from tons of addons to fit xas

credit to blizzard
Code:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Caterpillar by Blizzard
# Version: 2.2b
# Type: Game Experience Improvement
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Compatibility:
#
#  93% compatible with SDK v1.x. 60% compatible with SDK v2.x. You might
#  experience problems with pixel movement scripts or map graphic manipulating
#  scripts. Blizz-ABS disables this add-on automatically and uses the
#  Blizz-ABS Caterpillar system.
#
#
# Features:
#
#  - your party members follow you on the map
#  - less code than other caterpillar scripts
#  - use $game_player.update_buffer('reset') if you need all party members to
#    gather around the player
#
# To disable/enable = $game_system.CATERPILLAR = true/false
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# max number of party members
MAX_PARTY = 4
# actor IDs where the actor is animated even when not walking
ANIMATED_IDS = []
# 0 - shows all characters; 1 - shows "ghosts"; 2 - removes from caterpillar
DEAD_DISPLAY = 1
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#==============================================================================
# Game_Character
#==============================================================================
   
class Game_Character
 
  alias passable_caterpillar_later? passable?
  def passable?(x, y, d)
    result = passable_caterpillar_later?(x, y, d)
    return result if $BlizzABS && BlizzABS::VERSION >= 1.01
    return result if self.is_a?(Game_Player) || self.is_a?(Game_Member)
    new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
    new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
    unless @through
      $game_player.members.each {|member|
          if member.character_name != '' && member.x == new_x && member.y == new_y
            return false
          end}
    end
    return result
  end
end
#==============================================================================
# Game_Player
#==============================================================================
class Game_Player
  attr_reader :members
  attr_reader :move_speed
  alias init_caterpillar_later initialize
  def initialize
    init_caterpillar_later
    @members = []
    (1...MAX_PARTY).each {|i| @members.push(Game_Member.new(i))} unless $BlizzABS
  end
  alias upd_caterpillar_later update
  def update
    upd_caterpillar_later
    refresh if DEAD_DISPLAY > 0
    @members.each {|member| member.update}
    if  ANIMATED_IDS.include?(actor.id)
      @step_anime = true
    end
  end
  alias straighten_caterpillar_later straighten
  def straighten
    straighten_caterpillar_later
    @members.each {|member| member.straighten}
  end
  alias refresh_caterpillar refresh
  def refresh
    unless $game_system.CATERPILLAR
      refresh_caterpillar
      return
    end
    act, $game_party.actors[0] = $game_party.actors[0], actor
    $game_party.actors.pop if $game_party.actors[0] == nil
    refresh_caterpillar
    return if actor == nil
    $game_party.actors[0] = act
    if actor.dead? && DEAD_DISPLAY == 1
      @opacity = Graphics.frame_count % 4 / 2 * 255
      @blend_type = 1
    end
  end
  def actor
    if DEAD_DISPLAY > 0
      $game_party.actors.each {|actor| return actor unless actor.dead?}
    end
    return $game_party.actors[0]
  end
  def update_buffer(next_move)
    if next_move == nil
      @members.each {|member| member.buffer = []}
    else
      @members.each {|member| member.update_buffer(
          next_move == 'reset' ? nil : next_move)}
    end
  end
  alias move_down_caterpillar_later move_down
  def move_down(turn_enabled = true)
    update_buffer(2) if passable?(@x, @y, 2)
    move_down_caterpillar_later
  end
  alias move_left_caterpillar_later move_left
  def move_left(turn_enabled = true)
    update_buffer(4) if passable?(@x, @y, 4)
    move_left_caterpillar_later
  end
  alias move_right_caterpillar_later move_right
  def move_right(turn_enabled = true)
    update_buffer(6) if passable?(@x, @y, 6)
    move_right_caterpillar_later
  end
  alias move_up_caterpillar_later move_up
  def move_up(turn_enabled = true)
    update_buffer(8) if passable?(@x, @y, 8)
    move_up_caterpillar_later
  end
  alias move_lower_left_caterpillar_later move_lower_left
  def move_lower_left
    if passable?(@x, @y, 2) && passable?(@x, @y + 1, 4) ||
      passable?(@x, @y, 4) && passable?(@x - 1, @y, 2)
      update_buffer(1)
    end
    move_lower_left_caterpillar_later
  end
  alias move_lower_right_caterpillar_later move_lower_right
  def move_lower_right
    if passable?(@x, @y, 2) && passable?(@x, @y + 1, 6) ||
      passable?(@x, @y, 6) && passable?(@x + 1, @y, 2)
      update_buffer(3)
    end
    move_lower_right_caterpillar_later
  end
 
  alias move_upper_left_caterpillar_later move_upper_left
  def move_upper_left
    if passable?(@x, @y, 8) && passable?(@x, @y - 1, 4) ||
      passable?(@x, @y, 4) && passable?(@x - 1, @y, 8)
      update_buffer(7)
    end
    move_upper_left_caterpillar_later
  end
 
  alias move_upper_right_caterpillar_later move_upper_right
  def move_upper_right
    if passable?(@x, @y, 8) && passable?(@x, @y - 1, 6) ||
      passable?(@x, @y, 6) && passable?(@x + 1, @y, 8)
      update_buffer(9)
    end
    move_upper_right_caterpillar_later
  end
 
  alias jump_caterpillar_later jump
  def jump(x_plus, y_plus)
    if (x_plus != 0 || y_plus != 0) && passable?(@x + x_plus, @y + y_plus, 0)
      update_buffer([x_plus, y_plus])
    end
    jump_caterpillar_later(x_plus, y_plus)
  end
 
  alias moveto_caterpillar moveto
  def moveto(x, y)
    update_buffer(nil)
    moveto_caterpillar(x, y)
    @members.each {|member|
        member.moveto(x, y)
        case @direction
        when 2 then member.turn_down
        when 4 then member.turn_left
        when 6 then member.turn_right
        when 8 then member.turn_up
        end}
  end
 
end
 
#==============================================================================
# Game_Member
#==============================================================================

class Game_Member < Game_Character
 
  attr_accessor :buffer
  attr_reader :battler
 
  def dead?
    return actor != nil ? actor.dead? : false
  end
 
  def initialize(index)
    super()
    @index, @force_movement, @buffer, @through = index, 0, [], true
  end
 
  def refresh
    unless $game_system.CATERPILLAR && actor != nil
      @character_name, @character_hue = '', 0
      return
    end
    @character_name = actor.character_name
    @character_hue = actor.character_hue
    if actor.dead? && DEAD_DISPLAY == 1
      @opacity, @blend_type = Graphics.frame_count % 4 / 2 * 255, 1
    else
      @opacity, @blend_type = 255, 0
    end
  end
 
  def actor
    case DEAD_DISPLAY
    when 0 then return $game_party.actors[@index]
    when 1
      alive = 0
      $game_party.actors.each {|actor| alive += 1 unless actor.dead?}
      if @index >= alive
        ind, flag = @index - alive, true
      else
        ind, flag = @index, false
      end
      $game_party.actors.each_index {|i|
          ind -= 1 if (flag == $game_party.actors[i].dead?)
          return $game_party.actors[i] if ind < 0}
    when 2
      ind = @index
      $game_party.actors.each_index {|i|
          ind -= 1 unless $game_party.actors[i].dead?
          return $game_party.actors[i] if ind < 0}
    end
    return nil
  end
 
  def update
    refresh
    @transparent = $game_player.transparent
    @move_speed = $game_player.move_speed
    unless moving? || @buffer.size <= @index && @force_movement <= 0
      if @buffer.size > 0
        move = @buffer.shift
        if move.is_a?(Array)
          jump(move[0], move[1])
        else
          case move
          when 1 then move_lower_left
          when 2 then move_down(true)
          when 3 then move_lower_right
          when 4 then move_left(true)
          when 6 then move_right(true)
          when 7 then move_upper_left
          when 8 then move_up(true)
          when 9 then move_upper_right
          end
        end
        @force_movement -= 1 if @force_movement > 0
      end
    end
    super
    @step_anime = (ANIMATED_IDS.include?($game_party.actors[@index].id))
  end
 
  def update_buffer(next_move)
    if next_move == nil
      @force_movement = @buffer.size
    else
      @buffer.push(next_move)
      @force_movement = @buffer.size if next_move.is_a?(Array)
    end
  end
 
  def check_event_trigger_touch(x, y) # don't remove this, it's necessary...
  end
 
  def screen_z(height = 0)
    return (super - @index)
  end
 
end

#==============================================================================
# Spriteset_Map
#==============================================================================

class Spriteset_Map
 
  alias init_caterpillar_later initialize
  def initialize
    init_caterpillar_later
    return if $BlizzABS && BlizzABS::VERSION >= 1.01
    $game_player.members.each {|member|
        sprite = Sprite_Character.new(@viewport1, member)
        sprite.update
        @character_sprites.push(sprite)}
  end
 
end

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

class Scene_Map
 
  alias transfer_player_caterpillar_later transfer_player
  def transfer_player
    transfer_player_caterpillar_later
    return if $BlizzABS
    case $game_temp.player_new_direction
    when 2 then $game_player.members.each {|member| member.turn_down}
    when 4 then $game_player.members.each {|member| member.turn_left}
    when 6 then $game_player.members.each {|member| member.turn_right}
    when 8 then $game_player.members.each {|member| member.turn_up}
    end
  end
 
end

class Game_System
  attr_accessor :CATERPILLAR
  alias init_system_cater initialize
  def initialize
    init_system_cater
    @CATERPILLAR = true
  end
end
Active Member
Show Signature
Active Member
http://littledrago.blogspot.com
Active Member
Active Member
#20 RMXP + XAS = CATERPILLAR! - Page 2 Empty Re: RMXP + XAS = CATERPILLAR!
Loading

kimono

kimono
Active Member
Active Member
Active Member
profile
Hello G@mef@ce,

The script works perfectly, I suggest some minor improvement if you want to add this:
- the followers can use the _ANI graphic when they don't move.
- the script may add a "one step tower Hero" command rather than be stupidly stuck behind the hero.

Great script with Switch Leader, thanks for release it for XAS 3.91!
Active Member
Show Signature
Active Member

Sponsored content

profile

View previous topic View next topic Back to top Message [Page 2 of 3]

Go to page : Previous  1, 2, 3  Next

 

Chatbox system disabled
Personal messaging disabled