Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Caterpillar script

I think I'm gonna need another caterpillar script. A simple one, that allows party members to follow the player everywhere he goes, the party members should appear and disappear by using the Change Party event command.

I don't want this caterpillar script, because it has two bad glitches, so don't bother posting it:
Code:
# [email=fukuyama@alles.or.jp]fukuyama@alles.or.jp[/email]                                                #
#=====================================================================#

                            #INSTRUCTIONS#
#=====================================================================#
# - Switch setting for transparent state                              #
# When it is true, switch control is done                             #
#-----------------------------------------                            #
#To use this script, the below line must set to true                  #
#=====================================================================#

TRAIN_ACTOR_TRANSPARENT_SWITCH = true

#=====================================================================#
# - Switch number for transparent state                               #
# When the switch of this number is ON, it becomes transparent        #
#-----------------------------------------                            #
# Set the Switch number, wich determines wether the script is used.   #
#=====================================================================#

TRAIN_ACTOR_TRANSPARENT_SWITCHES_INDEX = 20

#=====================================================================#
# constant                                                            #
#Input::DOWN = 2                                                      #
#Input::LEFT = 4                                                      #
#Input::RIGHT = 6                                                     #
#Input::UP = 8                                                        #
#-----------------------------------------                            #
#Creating new input contstants, should not be modified.               #
#=====================================================================#

DOWN_LEFT = 1
DOWN_RIGHT = 3
UP_LEFT = 7
UP_RIGHT = 9
JUMP = 5

#=====================================================================#

#---------------------------------------------
# *Game_Party_Actor Class
#---------------------------------------------
class Game_Party_Actor < Game_Character
  def initialize
    super()
      @through = true
    end
   
  def setup(actor)
    # Setting the file name and hue of the character
    if actor != nil
      @character_name = actor.character_name
      @character_hue = actor.character_hue
    else
      @character_name = ""
      @character_hue = 0
    end
    # Initializing opacity and synthetic method
    @opacity = 255
    @blend_type = 0
  end
 
  def screen_z(height = 0)
    if $game_player.x == @x and $game_player.y == @y
        return $game_player.screen_z(height) - 1
      end
    super(height)
  end
#--------------------------------------------------------------------------
# â—
 
Ok, my bad.

1: It doesn't work correctly with my CT CMS. When I change the order of the party in the CMS, all heroes have the sprite graphic from the main hero.
2: It doesn't work with my inside door events. Normally, you'd walk up to a door, it opens, you go through it, it closes. But with this Caterpillar turned on, the player overlays everything when he goes through a door. Meaning, he can walk over everything, walls, stuff, closets, etc, everything is passable.

Here's the CT CMS: http://www.megaupload.com/nl/?d=HMXD8SOX
And here's the event commands for my doors:

http://i289.photobucket.com/albums/ll20 ... revent.png[/img]
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top