RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Zeriab Caterpillar 1.1c [RMVX Edition]

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Well, it's likely an incompatibility. I can't say much more than that. Try starting a new project, adding your scripts in one by one and note the last script you added when it crashes. Then share that script with me and I'll take a look.

@neuromonster - sorry; I never noticed that error before since I had always modified and so it never showed up in my testing. It is easy to fix and I will release a new version with it fixed very soon; I'd like to explore whether DCZ's problem is a general error in the script first.

****
Rep:
Level 84
3...2...1...
It can't be incompatibility. It worked perfectly, and then I changed a number in the SBS to make my battler stand closer to the middle of the screen. I haven't added any scripts since then. If it is compatibility, then it is probably with the KCG's Large Party script. It was the most recent on I added.

Edit: I put it into a game with only the Large party script and the caterpillar one. It's incompatible with that one. I've got it so that I can only have 4 people in my party at a time, but can hold up to 6 in the reserve, if that info is helpful or not. Hopefully I'll have my database done shortly so that I can start the actual game so I can put it up on here.
« Last Edit: October 08, 2010, 11:30:35 PM by DarkCodeZero »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Well, wha the error is telling me is that $game_map.events is not defined the first time the caterpillar is refreshed. Since that can't happen if isolated to this script, I think it's likely to be a script incompatibility. Anyway, test it out and recreate the error in a new project, then upload it and send it to me.

**
Rep:
Level 85
Sorry. I hope I am not breaking the rules by bumping and old thread. I am having issues with this script. When I press the restart button (f12 or something) and try to load up the game again, I get an "stacking error" on line 459. I have no idea what is wrong with it ...

Thanks ahead of time!

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
Add a new section at the very top of the script editor and copy & paste the following snippet into that section:
Code: [Select]
unless $@.nil?
  game_exe = 'Game' # Name of the .exe file
  exec = game_exe + ' debug' if $DEBUG  # XP
  exec = game_exe + ' test'  if $TEST   # VX
  Thread.new{system(exec)}
  exit
end

*hugs*

**
Rep:
Level 85
Thanks for helping me out. :D

I tried to use it - but it did a weird thing. The test window was brought to the back of all my windows, but it works. :D Though I don't know what the problem is.

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
When you test play the editor waits until the game instance ends.
My scripts opens a new instance and closes the current one.
When you play normally it's less evident ^_^

**
Rep:
Level 85
Oh alright. :D Sorry, I have one more question - using the automated caterpillar, is there anyway that the person could face the same way you are facing when entering a room?

**
Rep:
Level 84
yeah, I've been facing the same problem

***
Rep:
Level 70
RMRK Junior
Sorry for the Necropost. 

This script is awesome!  It has a few bugs, but hey, people are human!

Has anyone else noticed that when you get On or Off a Vehicle, the Characters just start following the Vehicle (Boat, Ship, Airship)?
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Most Missed Member2014 Zero to Hero2014 Best IRC Quote2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
Sorry for the Necropost.
Excused in scripts and recourses sections, don't worry as long as you have something worth posting to post.
This script is awesome!  It has a few bugs, but hey, people are human!
People are human? YOU CHANGED MY LIFE
Has anyone else noticed that when you get On or Off a Vehicle, the Characters just start following the Vehicle (Boat, Ship, Airship)?
Can you not just turn the switch off then?
it's like a metaphor or something i don't know

***
Rep:
Level 70
RMRK Junior
...Can you not just turn the switch off then?

Not for every place that a player can land a vehicle in a world, and I'd like to stay away from more Parallel Processes if possible.  It interferes with other events.  Of course, its probably just the fact that I suck at life.  Just a humble suggestion.
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!

*
Rep: +0/-0Level 69
RMRK Junior
well...that script is great...but...there's a little BIG problem:
if I save the game and then I load it...the characters that was following:
1) dont follow me
2) are untouchable
that's a biiiiig prob....
what can we do to fix it?
the DEMO have this prob too!

**
Rep: +0/-0Level 71
RMRK Junior
well...that script is great...but...there's a little BIG problem:
if I save the game and then I load it...the characters that was following:
1) dont follow me
2) are untouchable
that's a biiiiig prob....
what can we do to fix it?
the DEMO have this prob too!

im also having this problem, but it can be solved by adding a dummy party member and removing it again when the game loads to refresh the caterpillar.

Also when i use Set move route in the player it often gets stuck in the caterpillar... Specially with the move backward command or any move type that causes it to move to the caterpillar.

When using the SilverWind addon, how do you set move routes/play animations to the generated events?

*
Rep: +0/-0Level 67
Geisha can has cheesburger?
This little code by GubiD fixes the problem with the saves. Enjoy. :3

Code: [Select]
class Scene_Map < Scene_Base
  alias upd_basic_scn_map_cat_fix_zeriab update_basic unless $@
  def update_basic
    upd_basic_scn_map_cat_fix_zeriab
    if @last_map_refresh == nil
      $game_system.caterpillar.refresh
      @last_map_refresh = $game_map.map_id
    elsif @last_map_refresh != $game_map.map_id and Graphics.framecount % 120 == 0
      $game_system.caterpillar.refresh
      @last_map_refresh = $game_map.map_id
    end
  end
end

*
Rep: +0/-0Level 65
RMRK Junior
First of all, great script. Thank you for maintaining it.

I'm having an issue where after the actors join my party they don't follow me, they just remain stationary after teleporting to the player's position. I have a feeling there is an incompatibility with ArcThunder's Pixel Movement script, but I can't find where.

Can you help me out?

Here is the pixel movement script:

Code: [Select]
#-------------------------------------------------------------------------------
# * Arcthunder Pixel Movement
#-------------------------------------------------------------------------------
# * By Khas Arcthunder (nilokruch@live.com)
# * Version: 1.0 US
# * Released on: 21/07/2011
#
#-------------------------------------------------------------------------------
# * Author's note
#-------------------------------------------------------------------------------
# Thank you for choosing Arcthunder scripts. If you find any bug, please let
# me know by reporting it at the official threads (threads created by me - Khas)
#
# You can find more scripts and updates (in portuguese or english) at:
# http://arcthunder.host.org/
#
# If you like my scripts and want to donate a little, anything you can give
# would be appreciated. Please visit http://arcthunder.host.org/ to donate.
#
#-------------------------------------------------------------------------------
# * Terms of use
#-------------------------------------------------------------------------------
# You must give credit to Khas if you are using any Arcthunder script;
# All Arcthunder Scripts are licensed under a Creative Commons license;
# All Arcthunder Scripts are for non-commercial projects, if you need
# them for a commercial game, please send a email to nilokruch@live.com
# All Arcthunder Scripts are for personal use, you may edit them and use in your
# own project, but you can't post any modified version without my permission.
#
#-------------------------------------------------------------------------------
# * Instructions
#-------------------------------------------------------------------------------
# 1. How to use
# Just place this script after materials. This script will change the movement
# of the player, the events and the vehicles of your game.
#
# 2. Physics system
# In order to make this script working correctly, there's a system called
# Khas Physics. This system will load all Pixel Movement maps at the start
# of the game and it will save the settings into a file called
# "Khas Physics.rgss2a". You must refresh the file if you make any modifications
# at the maps of your game.
#
# There's two ways of refreshing Physics:
# a. Delete the "Khas Physics.rgss2a"
# b. Set Force_Physics_Update = true
#
# When you finish your game and it's ready to send to other people, remember to
# delete "Khas Physics.rgss2a" before encrypting! The Physics System will
# automatically create a new file when the player plays at the first time.
#
# 3. Event Commands (put on comments of events on map)
# You may put special commands for some events. There are two special commands:
#
# a. [collision X]
# This command sets the collision constant of the event to X.
#
# b. [forcedefaultcmd]
# This command forces the event to move as the default RMVX movement.
#
# 4. Event Commands (script codes)
# You may call some new commands for the player or map events:
#
# character.centralize(x,y)
# This command centralizes the character at x,y.
#
# character.px
# This command returns the Pixel X coordinate.
#
# character.py
# This command returns the Pixel Y coordinate.
#
# character.pixel_passable?(px,py)
# This command checks the passability at px,py coordinates.
#
#-------------------------------------------------------------------------------
# * Incompatibilities
#-------------------------------------------------------------------------------
# The Arcthunder Pixel Movement is incompatible with:
# 1. RMVX Loop maps
# 2. Heavy modifications in Game_Character, Game_Player and Game_Event
# 3. Anti-lag scripts
# 4. Action Battle Systems (A compatible ABS is coming soon! Arcthunder ABS!)
#
#-------------------------------------------------------------------------------
# * Setup part
#-------------------------------------------------------------------------------
module Pixel_Core
 
  # Pixel Movement maps (ID)
  # Example:
  # Maps = [1,3,4,5,6,7]
  Maps = [1,2,3]
 
#-------------------------------------------------------------------------------
# * Physics update
#-------------------------------------------------------------------------------
 
  # Force physics to update when testing?
  # If you set this option to false you may delete the physics file manually
  # to refresh the collision system. You only will need to refresh the file
  # when you make a change in any map.
  Force_Physics_Update = true
 
#-------------------------------------------------------------------------------
# * Auto-Multiply system
#-------------------------------------------------------------------------------
 
  # Multiply event commands? (event_commands will be multiplied by Pixel constant)
  # Please note that it isn't a very precise feature, it's better if you
  # multiply the commands by yourself to get better results.
  Multiply_Commands = false
 
  # Commands that will be multiplied (ID, separated by commas)
  Commands = [1,2,3,4,5,6,7,8,9,10,11,12,13]
 
#-------------------------------------------------------------------------------
# * Pixel settings (OTHER SETTINGS THAN THE DEFAULT MAY CRASH YOUR GAME!!!)
#-------------------------------------------------------------------------------

  # Axis [x plus, y plus, width, height]
  # Default: [0,0,0.75,0.75]
  # True Pixel: [0.25,0.25,0.25,0.50]
  Axis = [0.25,0.25,0.25,0.50]
 
  # Bush axis [x plus, y plus, width, height]
  Bush_Axis = [0.5,0.75,0.0,0.0]
 
  # Counter axis [x plus, y plus, width, height]
  Counter_Axis = [0.25,0.25,0.25,0.25]
 
  # Pixel constant (32/Pixel must be an integer!) - Best setting: 4
  Pixel = 4
 
  # Tile divisor (256/Tile must be an integer!) - Best setting: 0.25
  Tile = 0.25
 
  # Default collision range (must be an integer!)
  Collision = 3
 
  # Trigger range (direction => [x,y])
  Trigger_Range = {2=>[0,2],4=>[-2,0],6=>[2,0],8=>[0,-2]}
 
  # Counter range
  Counter_Range = {2=>[0,3],4=>[-3,0],6=>[3,0],8=>[0,-3]}
 
  # Vehicle Range (gettin on or off vehicles)
  Vehicle_Range = {2=>[0,3],4=>[-3,0],6=>[3,0],8=>[0,-3]}
end

#-------------------------------------------------------------------------------
# * End of setup part
#-------------------------------------------------------------------------------

class Game_Character
  include Pixel_Core
  attr_accessor :px
  attr_accessor :py
  attr_accessor :collision
  alias apm_initialize initialize
  alias apm_moveto moveto
  alias apm_jump jump
  alias apm_update_bush_depth update_bush_depth
  alias apm_force_move_route force_move_route
  alias default_mr move_right
  alias default_ml move_left
  alias default_mu move_up
  alias default_md move_down
  alias default_mur move_upper_right
  alias default_mul move_upper_left
  alias default_mlr move_lower_right
  alias default_mll move_lower_left
  def initialize
    apm_initialize
    if (Maps.include?($game_map.map_id) rescue false)
      @x = @x.to_f
      @y = @y.to_f
      @pixel = true
    else
      @pixel = false
    end
    @px = (@x*Pixel).to_i
    @py = (@y*Pixel).to_i
    @collision = Collision
  end
  def moveto(x,y)
    @pixel = Maps.include?($game_map.map_id)
    apm_moveto(x,y)
    if Maps.include?($game_map.map_id)
      @x = @x.to_f
      @y = @y.to_f
    end
    @px = (@x*Pixel).to_i
    @py = (@y*Pixel).to_i
  end
  def update_bush_depth
    if @pixel
      if object? or @priority_type != 1 or @jump_count > 0
        @bush_depth = 0
      else
        bush = $physics[$game_map.map_id][@px,@py,4] == 1
        if bush and not moving?
          @bush_depth = 8
        elsif not bush
          @bush_depth = 0
        end
      end
    else
      apm_update_bush_depth
    end
  end
  def move_down(t=true)
    @pixel ? pixel_md(t) : default_md(t)
  end
  def move_up(t=true)
    @pixel ? pixel_mu(t) : default_mu(t)
  end
  def move_left(t=true)
    @pixel ? pixel_ml(t) : default_ml(t)
  end
  def move_right(t=true)
    @pixel ? pixel_mr(t) : default_mr(t)
  end
  def move_upper_right
    @pixel ? pixel_mur : default_mur
  end
  def move_upper_left
    @pixel ? pixel_mul : default_mul
  end
  def move_lower_right
    @pixel ? pixel_mlr : default_mlr
  end
  def move_lower_left
    @pixel ? pixel_mll : default_mll
  end
  def pixel_mr(turn_ok)
    if pixel_passable?(@px+1,@py)
      turn_right
      @x += Tile
      @px += 1
      @real_x = (@x-Tile)*256
      increase_steps
      @move_failed = false
    else
      turn_right if turn_ok
      check_touch(@px+1, @py)
      @move_failed = true
    end
  end
  def pixel_ml(turn_ok)
    if pixel_passable?(@px-1,@py)
      turn_left
      @x -= Tile
      @px -= 1
      @real_x = (@x+Tile)*256
      increase_steps
      @move_failed = false
    else
      turn_left if turn_ok
      check_touch(@px-1, @py)
      @move_failed = true
    end
  end
  def pixel_mu(turn_ok)
    if pixel_passable?(@px,@py-1)
      turn_up
      @y -= Tile
      @py -= 1
      @real_y = (@y+Tile)*256
      increase_steps
      @move_failed = false
    else
      turn_up if turn_ok
      check_touch(@px, @py-1)
      @move_failed = true
    end
  end
  def pixel_md(turn_ok)
    if pixel_passable?(@px,@py+1)
      turn_down
      @y += Tile
      @py += 1
      @real_y = (@y-Tile)*256
      increase_steps
      @move_failed = false
    else
      turn_down if turn_ok
      check_touch(@px, @py+1)
      @move_failed = true
    end
  end
  def pixel_mur
    pixel_mu(true)
    pixel_mr(true)
  end
  def pixel_mul
    pixel_mu(true)
    pixel_ml(true)
  end
  def pixel_mlr
    pixel_md(true)
    pixel_mr(true)
  end
  def pixel_mll
    pixel_md(true)
    pixel_ml(true)
  end
  def pixel_passable?(px,py)
    return false unless $game_map.pixel_valid?(px,py)
    return true if @through or debug_through?
    return false if $physics[$game_map.map_id][px,py,0] == 0
    return false if collision?(px,py)
    return true
  end
  def collision?(px,py)
    for event in $game_map.events.values
      if (event.px - px).abs <= event.collision && (event.py - py).abs <= event.collision
        next if event.through || event == self
        return true if event.priority_type == 1
      end
    end
    if @priority_type == 1 && !$game_player.in_airship?
      return true if ($game_player.px - px).abs <= @collision && ($game_player.py - py).abs <= @collision
    end
    return false
  end
  def check_touch(px,py)
  end
  def force_move_route(mr)
    apm_force_move_route(mr)
    multiply_commands
  end
  def multiply_commands
    return unless @pixel
    return unless Multiply_Commands
    return if @move_route.list.empty?
    new_route = []
    for cmd in @move_route.list
      if Commands.include?(cmd.code)
        Pixel.times do
          new_route << cmd
        end
      else
        new_route << cmd
      end
    end
    @move_route.list = new_route
  end
  def centralize(fx=@x.to_i,fy=@y.to_i)
    cx = @x - fx
    cy = @y - fy
    tx = (cx/Tile).to_i
    ty = (cy/Tile).to_i
    ty.times do; (cy > 0 ? pixel_mu(false) : pixel_md(false)); end
    tx.times do; (cx > 0 ? pixel_ml(false) : pixel_mr(false)); end
  end
  def move_random
    if @pixel
      case rand(8)
        when 0;  pixel_mu(false)
        when 1;  pixel_md(false)
        when 2;  pixel_ml(false)
        when 3;  pixel_mr(false)
        when 4;  pixel_mur
        when 5;  pixel_mul
        when 6;  pixel_mlr
        when 7;  pixel_mll
      end
    else
      case rand(4)
        when 0;  move_down(false)
        when 1;  move_left(false)
        when 2;  move_right(false)
        when 3;  move_up(false)
      end
    end
  end
  def move_type_toward_player
    sx = @x - $game_player.x
    sy = @y - $game_player.y
    if sx.abs + sy.abs >= 20
      move_random
    else
      if @pixel
      move_toward_player
      else
        case rand(6)
        when 0..3; move_toward_player
        when 4; move_random
        when 5; move_forward
        end
      end
    end
  end
  def move_toward_player
    sx = distance_x_from_player
    sy = distance_y_from_player
    if @pixel
      unless sy == 0
        sy > 0 ? pixel_mu(true) : pixel_md(true)
      end
      unless sx == 0
        sx > 0 ? pixel_ml(true) : pixel_mr(true)
      end
    else
      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
        else
          sy > 0 ? move_up : move_down
          if @move_failed and sx != 0
            sx > 0 ? move_left : move_right
          end
        end
      end
    end
  end
  def move_away_from_player
    sx = distance_x_from_player
    sy = distance_y_from_player
    if @pixel
      unless sy == 0
        sy < 0 ? pixel_mu(true) : pixel_md(true)
      end
      unless sx == 0
        sx < 0 ? pixel_ml(true) : pixel_mr(true)
      end
    else
      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
        else
          sy > 0 ? move_down : move_up
          if @move_failed and sx != 0
            sx > 0 ? move_right : move_left
          end
        end
      end
    end
  end
  def jump(xp,yp)
    apm_jump(xp,yp)
    @px = @x*Pixel
    @py = @y*Pixel
  end
end

class Game_Player < Game_Character
  alias apm_get_on_vehicle get_on_vehicle
  alias apm_get_off_vehicle get_off_vehicle
  def get_on_vehicle
    @pixel ? pixel_gov : apm_get_on_vehicle
  end
  def get_off_vehicle
    @pixel ? pixel_offv : apm_get_off_vehicle
  end
  def pixel_offv 
    if in_airship?
      return unless pixel_airdocs?(@px,@py)
    else
      fx = @px+Vehicle_Range[@direction][0]
      fy = @py+Vehicle_Range[@direction][1]
      return unless pixel_walk?(fx,fy)
    end
    $game_map.vehicles[@vehicle_type].get_off
    if in_airship?
      @direction = 2
    else
      jump(Vehicle_Range[@direction][0]*Tile,Vehicle_Range[@direction][1]*Tile)
      @transparent = false
    end
    @vehicle_getting_off = true
    @move_speed = 4
    @through = false
    @walking_bgm.play
    make_encounter_count
  end
  def pixel_gov
    fx = @px+Trigger_Range[@direction][0]
    fy = @py+Trigger_Range[@direction][1]
    if ($game_map.boat.px - fx).abs <= $game_map.boat.collision && ($game_map.boat.py - fy).abs <= $game_map.boat.collision
      return false if $physics[$game_map.map_id][@px+Vehicle_Range[@direction][0],@py+Vehicle_Range[@direction][1],1] == 0
      jump(Vehicle_Range[@direction][0]*Tile,Vehicle_Range[@direction][1]*Tile)
      @vehicle_getting_on = true
      @vehicle_type = 0
      @walking_bgm = RPG::BGM::last
      $game_map.boat.get_on
      return true
    elsif ($game_map.ship.px - fx).abs <= $game_map.ship.collision && ($game_map.ship.py - fy).abs <= $game_map.ship.collision
      return false if $physics[$game_map.map_id][@px+Vehicle_Range[@direction][0],@py+Vehicle_Range[@direction][1],2] == 0
      jump(Vehicle_Range[@direction][0]*Tile,Vehicle_Range[@direction][1]*Tile)
      @vehicle_getting_on = true
      @vehicle_type = 1
      @walking_bgm = RPG::BGM::last
      $game_map.ship.get_on
      return true
    elsif ($game_map.airship.px - fx).abs <= $game_map.airship.collision && ($game_map.airship.py - fy).abs <= $game_map.airship.collision
      $game_player.centralize($game_map.airship.x,$game_map.airship.y)
      @vehicle_getting_on = true
      @vehicle_type = 2
      @through = true
      @walking_bgm = RPG::BGM::last
      $game_map.airship.get_on
      return true
    end
    return false
  end
  def pixel_walk?(px,py)
    lvt = @vehicle_type
    @vehicle_type = -1
    result = pixel_passable?(px,py)
    @vehicle_type = lvt
    return result
  end
  def pixel_airdocs?(px,py)
    return false if $physics[$game_map.map_id][px,py,3] == 0
    return false if collision?(px,py)
    return true
  end
  def pixel_passable?(px,py)
    return false unless $game_map.pixel_valid?(px,py)
    return true if @through or debug_through?
    case @vehicle_type
    when 0
      return false if $physics[$game_map.map_id][px,py,1] == 0
    when 1
      return false if $physics[$game_map.map_id][px,py,2] == 0
    when 2
      return true
    else
      return false if $physics[$game_map.map_id][px,py,0] == 0
    end
    return false if collision?(px,py)
    return true
  end
  def move_by_input
    return unless movable?
    return if $game_map.interpreter.running?
    if @pixel
      case Input.dir8
        when 1; pixel_mll
        when 2; pixel_md(true)
        when 3; pixel_mlr
        when 4; pixel_ml(true)
        when 6; pixel_mr(true)
        when 7; pixel_mul
        when 8; pixel_mu(true)
        when 9; pixel_mur
      end
    else
      case Input.dir4
        when 2;  move_down
        when 4;  move_left
        when 6;  move_right
        when 8;  move_up
      end
    end
  end
  def update_encounter
    return if $TEST and Input.press?(Input::CTRL)
    return if in_vehicle?
    if @pixel
      @encounter_count -= ($physics[$game_map.map_id][@px,@py,4] == 1 ? 2 : 1)
    else
      @encounter_count -= ($game_map.bush?(@x, @y) ? 2 : 1)
    end
  end
  def collision?(px,py)
    for event in $game_map.events.values
      if (event.px - px).abs <= event.collision && (event.py - py).abs <= event.collision
        next if event.through
        return true if event.priority_type == 1
      end
    end
    return false
  end
  def check_touch(px,py)
    return false if $game_map.interpreter.running?
    result = false
    for event in $game_map.events.values
      if (event.px - px).abs <= event.collision && (event.py - py).abs <= event.collision
        if [1,2].include?(event.trigger) && event.priority_type == 1
          event.start
          result = true
        end
      end
    end
    return result
  end
  def pixel_th?(t)
    return false if $game_map.interpreter.running?
    result = false
    for event in $game_map.events.values
      if (event.px - @px).abs <= event.collision && (event.py - @py).abs <= event.collision
        if t.include?(event.trigger) && event.priority_type != 1
          event.start
          result = true if event.starting
        end
      end
    end
    return result
  end
  def pixel_tt?(t)
    return false if $game_map.interpreter.running?
    result = false
    fx = @px+Trigger_Range[@direction][0]
    fy = @py+Trigger_Range[@direction][1]
    for event in $game_map.events.values
      if (event.px - fx).abs <= event.collision && (event.py - fy).abs <= event.collision
        if t.include?(event.trigger) && event.priority_type == 1
          event.start
          result = true
        end
      end
    end
    if !result && $physics[$game_map.map_id][fx,fy,5] == 1
      fx += Counter_Range[@direction][0]
      fy += Counter_Range[@direction][1]
      for event in $game_map.events.values
        if (event.px - fx).abs <= event.collision && (event.py - fy).abs <= event.collision
          if t.include?(event.trigger) && event.priority_type == 1
            event.start
            result = true
          end
        end
      end
    end
    return result
  end
  def check_touch_event
    return false if in_airship?
    return (@pixel ? pixel_th?([1,2]) : check_event_trigger_here([1,2]))
  end
  def check_action_event
    return false if in_airship?
    return true if (@pixel ? pixel_th?([0]) : check_event_trigger_here([0]))
    return (@pixel ? pixel_tt?([0,1,2]) : check_event_trigger_there([0,1,2]))
  end
end

class Game_Event < Game_Character
  alias apm_event_initialize initialize
  alias apm_setup setup
  def initialize(m,e)
    apm_event_initialize(m,e)
    setup_collision
  end
  def setup_collision
    @collision = Collision
    unless @list.nil?
      for value in 0...@list.size
        next if @list[value].code != 108 && @list[value].code != 408
        if @list[value].parameters[0].include?("[collision ")
          @list[value].parameters[0].scan(/\[collision ([0.0-9.9]+)\]/)
          @collision = $1.to_i
        end
      end
    end
    @force_dc = false
    return unless @pixel
    unless @list.nil?
      for value in 0...@list.size
        next if @list[value].code != 108 && @list[value].code != 408
        if @list[value].parameters[0] == ("[forcedefaultcmd]")
          @force_dc = true
        end
      end
    end
  end
  def check_touch(px,py)
    return if $game_map.interpreter.running? || $game_player.in_vehicle?
    if @trigger == 2 && ($game_player.px - px).abs <= @collision && ($game_player.py - py).abs <= @collision
      start if not jumping? and @priority_type == 1
    end
  end
  def setup(n)
    apm_setup(n)
    unless @page.nil?
      setup_collision
      multiply_commands unless @force_dc
    end
  end
  def move_random
    if @force_dc
      case rand(4)
        when 0; pixel_md(true)
        when 1; pixel_ml(true)
        when 2; pixel_mr(true)
        when 3; pixel_mu(true)
      end
    else
      super
    end
  end
  def pixel_mr(turn_ok)
    if @force_dc
      if pixel_passable?(@px+Pixel,@py)
        turn_right
        @x += 1
        @px += Pixel
        @real_x = (@x-1)*256
        increase_steps
        @move_failed = false
      else
        turn_right if turn_ok
        check_touch(@px+1, @py)
        @move_failed = true
      end
    else
      super(turn_ok)
    end
  end
  def pixel_ml(turn_ok)
    if @force_dc
      if pixel_passable?(@px-Pixel,@py)
        turn_left
        @x -= 1
        @px -= Pixel
        @real_x = (@x+1)*256
        increase_steps
        @move_failed = false
      else
        turn_left if turn_ok
        check_touch(@px-1, @py)
        @move_failed = true
      end
    else
      super(turn_ok)
    end
  end
  def pixel_mu(turn_ok)
    if @force_dc
      if pixel_passable?(@px,@py-Pixel)
        turn_up
        @y -= 1
        @py -= Pixel
        @real_y = (@y+1)*256
        increase_steps
        @move_failed = false
      else
        turn_up if turn_ok
        check_touch(@px, @py-1)
        @move_failed = true
      end
    else
      super(turn_ok)
    end
  end
  def pixel_md(turn_ok)
    if @force_dc
      if pixel_passable?(@px,@py+Pixel)
        turn_down
        @y += 1
        @py += Pixel
        @real_y = (@y-1)*256
        increase_steps
        @move_failed = false
      else
        turn_down if turn_ok
        check_touch(@px, @py+1)
        @move_failed = true
      end
    else
      super(turn_ok)
    end
  end
end

class Game_Map
  alias apm_initialize initialize
  alias apm_setup setup
  def initialize
    apm_initialize
    @pixel_w = 0
    @pixel_h = 0
  end
  def setup(id)
    apm_setup(id)
    @pixel_w = Pixel_Core::Pixel*@map.width
    @pixel_h = Pixel_Core::Pixel*@map.height
  end
  def pixel_valid?(px,py)
    return (px >= 0 && px < @pixel_w && py >= 0 && py < @pixel_h)
  end
end

class Game_Vehicle < Game_Character
  alias apm_set_location set_location
  alias apm_sync_with_player sync_with_player
  def set_location(m,x,y)
    apm_set_location(m,x,y)
    if Maps.include?(m)
      @x = @x.to_f
      @y = @y.to_f
      @pixel = true
    else
      @pixel = false
    end
    @px = (@x*Pixel).to_i
    @py = (@y*Pixel).to_i
  end
  def sync_with_player
    apm_sync_with_player
    @px = $game_player.px
    @py = $game_player.py
  end
end

class Khas_Physics
  Axis = Pixel_Core::Axis
  Bush_Axis = Pixel_Core::Bush_Axis
  Pixel = Pixel_Core::Pixel
  Tile = Pixel_Core::Tile
  Counter_Axis = Pixel_Core::Counter_Axis
  def initialize
    @maps = {}
    @passages = load_data("Data/System.rvdata").passages
    run
  end
  def run
    size = []; phase = 0
    for i in 0...Pixel_Core::Maps.size
      size << (100*i)/Pixel_Core::Maps.size
    end
    warn = Sprite.new
    warn.bitmap = Bitmap.new(192,32)
    warn.y = 376
    for id in Pixel_Core::Maps
      warn.bitmap.clear
      warn.bitmap.draw_text(32,0,160,32,"Loading... #{size[phase]}%")
      Graphics.update; Graphics.wait(5)
      map = load_data(sprintf("Data/Map%03d.rvdata", id))
      @maps[id] = Table.new(map.width*Pixel,map.height*Pixel,6)
      for x in 0...(map.width*Pixel)
        for y in 0...(map.height*Pixel)
          @maps[id][x,y,0] = process_point(x*Tile+Axis[0],y*Tile+Axis[1],map,0x01)
          @maps[id][x,y,1] = process_point(x*Tile+Axis[0],y*Tile+Axis[1],map,0x02)
          @maps[id][x,y,2] = process_point(x*Tile+Axis[0],y*Tile+Axis[1],map,0x04)
          @maps[id][x,y,3] = process_point(x*Tile+Axis[0],y*Tile+Axis[1],map,0x08)
          @maps[id][x,y,4] = bush_point?(x*Tile+Bush_Axis[0],y*Tile+Bush_Axis[1],map)
          @maps[id][x,y,5] = counter_point?(x*Tile+Counter_Axis[0],y*Tile+Counter_Axis[1],map)
        end
      end
      phase += 1
    end
    warn.bitmap.clear
    warn.bitmap.draw_text(32,0,160,32,"Loading... 100%")
    Graphics.update; Graphics.wait(20)
    warn.bitmap.dispose; warn.dispose
    warn = nil
    Graphics.update
  end
  def process_point(x,y,map,flag)
    return 0 unless (x >= 0 && x < map.width && y >= 0 && y < map.height)
    return 0 unless free_tile?(x.to_i,y.to_i,map,flag)
    return 0 unless free_tile?((x+Axis[2]).to_i,y.to_i,map,flag)
    return 0 unless free_tile?(x.to_i,(y+Axis[3]).to_i,map,flag)
    return 0 unless free_tile?((x+Axis[2]).to_i,(y+Axis[3]).to_i,map,flag)
    return 1
  end
  def bush_point?(x,y,map)
    return 1 if (@passages[map.data[x.to_i,y.to_i,1]] & 0x40 == 0x40 rescue false)
    return 1 if (@passages[map.data[(x+Bush_Axis[2]).to_i,y.to_i,1]] & 0x40 == 0x40 rescue false)
    return 1 if (@passages[map.data[x.to_i,(y+Bush_Axis[3]).to_i,1]] & 0x40 == 0x40 rescue false)
    return 1 if (@passages[map.data[(x+Bush_Axis[2]).to_i,(y+Bush_Axis[3]).to_i,1]] & 0x40 == 0x40 rescue false)
    return 0
  end
  def counter_point?(x,y,map)
    return 1 if (@passages[map.data[x.to_i,y.to_i,0]] & 0x80 == 0x80 rescue false)
    return 1 if (@passages[map.data[(x+Counter_Axis[2]).to_i,y.to_i,0]] & 0x80 == 0x80 rescue false)
    return 1 if (@passages[map.data[x.to_i,(y+Counter_Axis[3]).to_i,0]] & 0x80 == 0x80 rescue false)
    return 1 if (@passages[map.data[(x+Counter_Axis[2]).to_i,(y+Counter_Axis[3]).to_i,0]] & 0x80 == 0x80 rescue false)
    return 0
  end
  def free_tile?(x,y,map,flag)
    for i in [2, 1, 0]
      tile_id = map.data[x, y, i]
      return false if tile_id == nil
      pass = @passages[tile_id]
      next if pass & 0x10 == 0x10
      return true if pass & flag == 0x00
      return false if pass & flag == flag
    end
    return false
  end
  def [](id)
    return @maps[id]
  end
end

if File.exists?("Khas Physics.rgss2a") && !(Pixel_Core::Force_Physics_Update && $TEST)
  tmf = File.open("Khas Physics.rgss2a", "rb")
  $physics = Marshal.load(tmf); tmf.close
else
  $physics = Khas_Physics.new
  tmf = File.open("Khas Physics.rgss2a", "wb")
  Marshal.dump($physics,tmf); tmf.close
end

Any help would be appreciated, thank you!

***
Rep:
Level 70
RMRK Junior
If I recall this version correctly, there is a switch called "Caterpillar" that needs to be set to ON with an event.  I think its #23.  Im just goin with the basics, as Im not very good at most of the scripting language.
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!

**
Rep:
Level 67
Eternal Newbie
You're partially correct. The switch by default is 23, you can redefine it on line 70 of the script

**
Rep: +0/-0Level 85
I've yet to see a single catepillar system or script that can deal with dead party members.  I'm no scripter myself, but anyone think of an easy way to deal with knocked out (dead) party members?  I really love how the Dragon's Quests games do it with little coffin images...

*
Rep: +0/-0Level 67
Geisha can has cheesburger?
Quote
I've yet to see a single catepillar system or script that can deal with dead party members.  I'm no scripter myself, but anyone think of an easy way to deal with knocked out (dead) party members?  I really love how the Dragon's Quests games do it with little coffin images...

Well, this script already uses events. So just put a condition inside the event of the party members that if actor has x state inflicted that his graphic will be changed, then set the else to change to the original graphic so it can change back when the state isn't inflicted. Pretty sure that'll work.

**
Rep: +0/-0Level 85
thanx, that's actually what I did...

***
Rep:
Level 69
RESIDENT ADONKADONK
Well, I have a problem with SwapXT, not an error or anything, but the actual caterpillar doesn't work on SwapXT maps.

I'm back.

**
Rep:
Level 38
RMRK Junior
I had the same problem that affected neuromonster.
Spoiler for:
Hey, I've been trying to get this script and the autoparty add on to work, and I've got them running pretty smoothly, except when you load a saved game the followers that were generated prior to saving will just stand in the place they were in during the save and not move. This goes away as soon as you change maps but it looks really awkward. I was wondering if there was any way around it? Whenever I change something enough for the script to reinitialize or whatever the saves won't have this issue for at least one load, I think if there was a way to flip the activating switch off and on real quick every time you load a game it would work, I just have no idea how one would go about doing that.

Any help in this matter would be greatly appreciated.

The solution of RavenTDA gave me an error.
And the solution what i found is this:



- You have to press F11(script editor) and go to "scenes", then "Scene_File".
- Go to the line 195 and paste this
$game_switches[23] = true


So, when you execute load, automaticly the switch 23 turn on, and the events (caterpillar) follow you again. (the DEMO used the switch 23)


I hope this will help to someone.
CYA later
KriZ

*
Last Stop
Rep:
Level 88
Everyone Off
Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.Secret Santa 2012 ParticipantSilver - GIAW 10Silver - GIAW 92011 Biggest Drama WhoreBronze - GIAW HalloweenGold - Game In A Week VII
Thanks for posting that here Kriz!