RMVX Caterpillar Script |
|
|
|
|
Jan 19 2008, 01:55 PM
|
Level 10

Group: Revolutionary
Posts: 150
Type: Event Designer
RM Skill: Undisclosed

|
This is a quick modification of Trickster's caterpillar script to make it work in RMVX. Just copy and paste and add somewhere above Main. UPDATE: I have updated the script to fix the dash problem. CODE class Game_Player #-------------------------------------------------------------------------- # * Move Down # turn_enabled : a flag permits direction change on that spot #-------------------------------------------------------------------------- def move_down(turn_enabled = true) super(turn_enabled) end #-------------------------------------------------------------------------- # * Move Left # turn_enabled : a flag permits direction change on that spot #-------------------------------------------------------------------------- def move_left(turn_enabled = true) super(turn_enabled) end #-------------------------------------------------------------------------- # * Move Right # turn_enabled : a flag permits direction change on that spot #-------------------------------------------------------------------------- def move_right(turn_enabled = true) super(turn_enabled) end #-------------------------------------------------------------------------- # * Move up # turn_enabled : a flag permits direction change on that spot #-------------------------------------------------------------------------- def move_up(turn_enabled = true) super(turn_enabled) end #-------------------------------------------------------------------------- # * Move Lower Left #-------------------------------------------------------------------------- def move_lower_left super end #-------------------------------------------------------------------------- # * Move Lower Right #-------------------------------------------------------------------------- def move_lower_right super end #-------------------------------------------------------------------------- # * Move Upper Left #-------------------------------------------------------------------------- def move_upper_left super end #-------------------------------------------------------------------------- # * Move Upper Right #-------------------------------------------------------------------------- def move_upper_right super end end
class Game_Follower < Game_Character #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_reader :actor attr_accessor :move_speed #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(actor) super() @through = true @actor = actor end #-------------------------------------------------------------------------- # * Set Actor #-------------------------------------------------------------------------- def actor=(actor) @actor = actor setup end #-------------------------------------------------------------------------- # * Setup #-------------------------------------------------------------------------- def setup if @actor != nil @character_name = $game_actors[@actor].character_name @character_index = $game_actors[@actor].character_index else @character_name = "" @character_index = 0 end @opacity = 255 @blend_type = 0 @priority_type = 0 end #-------------------------------------------------------------------------- # * Screen Z #-------------------------------------------------------------------------- def screen_z if $game_player.x == @x and $game_player.y == @y return $game_player.screen_z - 1 end super end #-------------------------------------------------------------------------- # * Same Position Starting Determinant (Disabled) #-------------------------------------------------------------------------- def check_event_trigger_here(triggers) result = false return result end #-------------------------------------------------------------------------- # * Front Envent Starting Determinant (Disabled) #-------------------------------------------------------------------------- def check_event_trigger_there(triggers) result = false return result end #-------------------------------------------------------------------------- # * Touch Event Starting Determinant (Disabled) #-------------------------------------------------------------------------- def check_event_trigger_touch(x, y) result = false return result end end
class Spriteset_Map alias_method :spriteset_map_create_characters, :create_characters def create_characters spriteset_map_create_characters $game_party.followers.each do |char| @character_sprites << Sprite_Character.new(@viewport1, char) end end end
class Game_Party #-------------------------------------------------------------------------- # * Constants #-------------------------------------------------------------------------- MAX_SIZE = 8 CATERPILLAR = 2 #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_reader :followers #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- alias_method :trick_caterpillar_party_initialize, :initialize def initialize trick_caterpillar_party_initialize @followers = Array.new(MAX_SIZE - 1) {Game_Follower.new(nil)} @move_list = [] end #-------------------------------------------------------------------------- # * Update Followers #-------------------------------------------------------------------------- def update_followers flag = $game_player.transparent || $game_switches[CATERPILLAR] @followers.each_with_index do |char, i| char.actor = @actors[i + 1] char.move_speed = $game_player.move_speed if $game_player.dash? char.move_speed += 1 end char.update char.transparent = flag end end #-------------------------------------------------------------------------- # * Move To Party #-------------------------------------------------------------------------- def moveto_party(x, y) @followers.each {|char| char.moveto(x, y)} @move_list.clear end #-------------------------------------------------------------------------- # * Move Party #-------------------------------------------------------------------------- def move_party @move_list.each_index do |i| if @followers[i] == nil @move_list[i...@move_list.size] = nil next end case @move_list[i].type when 2 @followers[i].move_down(*@move_list[i].args) when 4 @followers[i].move_left(*@move_list[i].args) when 6 @followers[i].move_right(*@move_list[i].args) when 8 @followers[i].move_up(*@move_list[i].args) when 1 @followers[i].move_lower_left when 3 @followers[i].move_lower_right when 7 @followers[i].move_upper_left when 9 @followers[i].move_upper_right when 5 @followers[i].jump(*@move_list[i].args) end end end #-------------------------------------------------------------------------- # * Add Move List #-------------------------------------------------------------------------- def update_move(type, *args) move_party @move_list.unshift(Game_MoveListElement.new(type, args)) end end
class Game_MoveListElement #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(type, args) @type = type @args = args end #-------------------------------------------------------------------------- # * Type #-------------------------------------------------------------------------- def type return @type end #-------------------------------------------------------------------------- # * Args #-------------------------------------------------------------------------- def args return @args end end
class Game_Player #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_reader :move_speed #-------------------------------------------------------------------------- # * Update #-------------------------------------------------------------------------- alias_method :trick_caterpillar_player_update, :update def update $game_party.update_followers trick_caterpillar_player_update end #-------------------------------------------------------------------------- # * Moveto #-------------------------------------------------------------------------- alias_method :trick_caterpillar_player_moveto, :moveto def moveto(x, y) $game_party.moveto_party(x, y) trick_caterpillar_player_moveto(x, y) end #-------------------------------------------------------------------------- # * Move Down #-------------------------------------------------------------------------- alias_method :trick_caterpillar_player_move_down, :move_down def move_down(turn_enabled = true) if passable?(@x, @y+1) $game_party.update_move(2, turn_enabled) end trick_caterpillar_player_move_down(turn_enabled) end #-------------------------------------------------------------------------- # * Move Left #-------------------------------------------------------------------------- alias_method :trick_caterpillar_player_move_left, :move_left def move_left(turn_enabled = true) if passable?(@x-1, @y) $game_party.update_move(4, turn_enabled) end trick_caterpillar_player_move_left(turn_enabled) end #-------------------------------------------------------------------------- # * Move Right #-------------------------------------------------------------------------- alias_method :trick_caterpillar_player_move_right, :move_right def move_right(turn_enabled = true) if passable?(@x+1, @y) $game_party.update_move(6, turn_enabled) end trick_caterpillar_player_move_right(turn_enabled) end #-------------------------------------------------------------------------- # * Move Up #-------------------------------------------------------------------------- alias_method :trick_caterpillar_player_move_up, :move_up def move_up(turn_enabled = true) if passable?(@x, @y-1) $game_party.update_move(8, turn_enabled) end trick_caterpillar_player_move_up(turn_enabled) end #-------------------------------------------------------------------------- # * Move Lower Left #-------------------------------------------------------------------------- alias_method :trick_caterpillar_player_move_lower_left, :move_lower_left def move_lower_left if passable?(@x - 1, @y) and passable?(@x, @y + 1) $game_party.update_move(1) end trick_caterpillar_player_move_lower_left end #-------------------------------------------------------------------------- # * Move Lower Right #-------------------------------------------------------------------------- alias_method :trick_caterpillar_player_move_lower_right, :move_lower_right def move_lower_right if passable?(@x + 1, @y) and passable?(@x, @y + 1) $game_party.update_move(3) end trick_caterpillar_player_move_lower_right end #-------------------------------------------------------------------------- # * Move Upper Left #-------------------------------------------------------------------------- alias_method :trick_caterpillar_player_move_upper_left, :move_upper_left def move_upper_left if passable?(@x - 1, @y) and passable?(@x, @y - 1) $game_party.update_move(7) end trick_caterpillar_player_move_upper_left end #-------------------------------------------------------------------------- # * Move Upper Right #-------------------------------------------------------------------------- alias_method :trick_caterpillar_player_move_upper_right, :move_upper_right def move_upper_right if passable?(@x + 1, @y) and passable?(@x, @y - 1) $game_party.update_move(9) end trick_caterpillar_player_move_upper_right end #-------------------------------------------------------------------------- # * Jump #-------------------------------------------------------------------------- alias_method :trick_caterpillar_player_jump, :jump def jump(x_plus, y_plus) new_x = @x + x_plus new_y = @y + y_plus if (x_plus == 0 and y_plus == 0) or passable?(new_x, new_y) $game_party.update_move(5, x_plus, y_plus) end trick_caterpillar_player_jump(x_plus, y_plus) end end########### ########### ###########
Posted with Trickster's permission. Please give him credit if you use this script (even though I made the RMVX modifications, it is still his work). Screenshot of it in action:  NOTE: I noticed that the CODEBOX tag messed the formatting of the script up, so I uploaded a text file attachment with the script as well.
This post has been edited by Diedrupo: Feb 23 2008, 04:38 PM
|
|
|
|
|
|
|
|
 |
Replies
|
|
Feb 23 2008, 04:38 PM
|
Level 10

Group: Revolutionary
Posts: 150
Type: Event Designer
RM Skill: Undisclosed

|
Oh yeah sorry about that, hm i should edit the first post to make sure it's correct..
|
|
|
|
|
|
|
Posts in this topic
Diedrupo RMVX Caterpillar Script Jan 19 2008, 01:55 PM jasonicus Nice upload, man. I was hoping to see one of thes... Jan 19 2008, 04:08 PM KaneBlueriver This may be a little silly question here but when ... Jan 20 2008, 12:56 PM Diedrupo QUOTE (KaneBlueriver @ Jan 20 2008, 02:03... Jan 20 2008, 02:08 PM SeeYouAlways Looks great, thank you for the script! I will ... Jan 20 2008, 11:44 PM jasonicus I thought the same thing, but I noticed that when ... Jan 20 2008, 11:57 PM Diedrupo QUOTE (jasonicus @ Jan 21 2008, 01:04 AM)... Jan 21 2008, 04:08 AM jasonicus Oh, cool. Jan 21 2008, 04:21 AM Diedrupo Here's the fix for followers not dashing when ... Jan 21 2008, 06:15 PM X-Snake-X Very nice Script^^
I might use it Jan 22 2008, 11:32 AM jasonicus Update works great! Thanks! Jan 22 2008, 01:56 PM X-Auron I copied the script and "glue" in the Ed... Jan 22 2008, 11:50 PM Diedrupo QUOTE (X-Auron @ Jan 23 2008, 12:57 ... Jan 23 2008, 12:16 AM ss3dj cool script Jan 23 2008, 09:21 PM Wimpy I love me some caterpillary goodness! It work... Jan 27 2008, 11:10 PM X-Snake-X Hey I have some problems...
Everytime I add a Thir... Jan 28 2008, 08:47 AM Diedrupo QUOTE (X-Snake-X @ Jan 28 2008, 09... Jan 28 2008, 09:57 AM  X-Snake-X QUOTE (Diedrupo @ Jan 28 2008, 06:04 PM) ... Jan 28 2008, 12:07 PM   Diedrupo QUOTE (X-Snake-X @ Jan 28 2008, 01... Jan 28 2008, 01:45 PM    X-Snake-X QUOTE (Diedrupo @ Jan 28 2008, 09:52 PM) ... Jan 28 2008, 04:14 PM     Diedrupo QUOTE (X-Snake-X @ Jan 28 2008, 05... Jan 28 2008, 09:58 PM     crowgamer umm cool but how do I make it work with my charact... Feb 21 2008, 01:41 AM     Master Shwuan hey can anyone tell me what I am doing wrong..im a... Mar 10 2008, 11:25 AM      Diedrupo QUOTE (Master Shwuan @ Mar 10 2008, 01:32... Mar 10 2008, 11:27 AM     Master Shwuan I have the scrpit above main..and everytime I do s... Mar 10 2008, 11:36 AM X-Snake-X Ah i see xD
So you use the Switch 2 xD
Okay I... Jan 29 2008, 07:59 AM BurnZer0 Is there anyway to increase the distance between t... Feb 3 2008, 01:23 AM X-Snake-X Hey Dann...
A friend of mine is complaining about... Feb 3 2008, 08:27 AM Diedrupo QUOTE (X-Snake-X @ Feb 3 2008, 09... Feb 4 2008, 10:15 AM revenantwings57 it doesn't work. it says there is an error in ... Feb 3 2008, 04:22 PM X-Snake-X QUOTE (revenantwings57 @ Feb 4 2008, 12:2... Feb 3 2008, 04:27 PM Guilmon Burst Mode Can someone explain how they move? XD Feb 3 2008, 11:43 PM shaman666 a little bug is, the chars following you are alway... Feb 5 2008, 05:42 PM Guilmon Burst Mode QUOTE (shaman666 @ Feb 5 2008, 05:49 PM) ... Feb 9 2008, 01:05 PM joshoga Whenever I use the "Jump" command, the g... Feb 9 2008, 08:42 AM Astel QUOTE (X-Snake-X @ Feb 3 2008, 03... Feb 11 2008, 09:29 AM X-Snake-X QUOTE (Astel @ Feb 11 2008, 05:36 PM) QUO... Feb 11 2008, 09:48 AM Astel I'm using the one from the text file on the bo... Feb 11 2008, 10:19 AM oozoom I've found a glitch.
If you lose a battle, th... Feb 14 2008, 08:14 AM Diedrupo QUOTE (oozoom @ Feb 14 2008, 09:21 AM) I... Feb 16 2008, 10:57 PM Yuu-Mon Musuedo I have a small problem. I keep getting a error in ... Feb 21 2008, 10:10 AM Diedrupo I need both of you to upload your projects somewhe... Feb 21 2008, 10:16 AM Yuu-Mon Musuedo QUOTE (Diedrupo @ Feb 21 2008, 09:23 AM) ... Feb 22 2008, 09:06 AM Yuu-Mon Musuedo Sorry for double post, sorry, sorry, sorry!
B... Feb 22 2008, 07:40 PM shaman666 yeah, the code is wrong, and that was said all alo... Feb 22 2008, 08:01 PM nathmatt were did u upload the text file ? Feb 24 2008, 03:15 PM nathmatt nvm i got it but is there any way for it to work w... Feb 24 2008, 03:53 PM Diedrupo QUOTE (nathmatt @ Feb 24 2008, 05:00 PM) ... Feb 25 2008, 12:47 PM Someonation I can't copy the script.......
I mean i copy t... Mar 1 2008, 10:59 PM Mech-Ah I seem to have the same problem, with the script p... Mar 2 2008, 12:23 AM ell QUOTE (Mech-Ah @ Mar 2 2008, 08:37 A... Apr 23 2008, 10:50 AM nico_14_ian Question. I added the script to a location above M... Mar 3 2008, 03:09 AM Diedrupo That sounds very weird, I don't get that probl... Mar 4 2008, 10:36 AM Mech-Ah Thanks a lot! All scripts that previously appe... Mar 4 2008, 11:44 AM Redskyze Thanks so much...I've always loved the ability... Mar 4 2008, 02:06 PM GuardianHX I haven't posted here in SO long, wow.
I have... Mar 4 2008, 02:51 PM Diedrupo QUOTE (GuardianHX @ Mar 4 2008, 03:58 PM)... Mar 5 2008, 09:47 AM Iceman50046 Ok i am new to this hole scripting thing and i am ... Mar 7 2008, 02:41 AM RedVortex Did you add the character to your party? Of did yo... Mar 7 2008, 06:24 PM Ilikepie123 OMG! FINALLY! IVE BEEN LOOKING FOR THIS FO... Mar 8 2008, 08:41 PM SeeYouAlways In RPG Maker VX's script editor, there are def... Mar 8 2008, 09:08 PM Ilikepie123 QUOTE (SeeYouAlways @ Mar 8 2008, 08:15 P... Mar 9 2008, 03:20 PM  Ilikepie123 QUOTE (Ilikepie123 @ Mar 9 2008, 02:27 PM... Mar 9 2008, 04:09 PM   Diedrupo QUOTE (Ilikepie123 @ Mar 9 2008, 06:16 PM... Mar 10 2008, 09:13 AM kritix11 wow... this is just what i need!!!... Mar 9 2008, 01:35 PM demonin Hi, I just wanted to say "Great Job" on ... Mar 10 2008, 02:27 PM voodooKobra I don't know if it's this script or anothe... Mar 10 2008, 06:46 PM Diedrupo QUOTE (voodooKobra @ Mar 10 2008, 08:53 P... Mar 11 2008, 08:30 AM  voodooKobra QUOTE (Diedrupo @ Mar 11 2008, 11:37 AM) ... Mar 12 2008, 08:43 AM   Diedrupo QUOTE (voodooKobra @ Mar 12 2008, 10:50 A... Mar 12 2008, 11:19 AM voodooKobra I found a way to do it.
Keep in kind that I use v... Mar 12 2008, 04:15 PM CaptainDraco I'm not having the dashing problem with the or... Mar 16 2008, 07:31 PM svispo I have a problem ... when I quit the game: "E... Mar 20 2008, 07:06 AM FragmentSnake ...I'm kinda dumb on this kind of things , but... Mar 20 2008, 05:58 PM voodooKobra Where did you put the script? Mar 21 2008, 05:05 PM FragmentSnake QUOTE (voodooKobra @ Mar 21 2008, 04:12 P... Mar 21 2008, 05:58 PM TLOAJohn This is wierd and strange. Whenever I make a switc... Mar 21 2008, 06:05 PM voodooKobra QUOTE (TLOAJohn @ Mar 21 2008, 09:12 PM) ... Mar 22 2008, 02:07 PM AlyxO Is it somehow possible to change the charackters w... Mar 22 2008, 12:19 PM epfrndz Help, error:
Game Player ? 650 ??? Name Error ????... Mar 26 2008, 04:12 AM Someonation The script worked until I changed the ver to engli... Mar 29 2008, 11:33 AM Tomtaru Great system! looks realy realy nice but I hav... Mar 30 2008, 07:30 AM Diedrupo QUOTE (Tomtaru @ Mar 30 2008, 09:44 AM) G... Mar 31 2008, 08:41 AM  Ekras Can this be set up so that with a party of 5 they ... Apr 5 2008, 11:49 AM Ryukodomo When i play my game it says it comes up with a nom... Apr 7 2008, 10:25 AM Ryukodomo Yeah, can you help me with this problem of mine...... Apr 8 2008, 08:53 PM ShinDongJae Have you fix this script? I mean,i had been read ... Apr 9 2008, 10:16 AM Diedrupo QUOTE (ShinDongJae @ Apr 9 2008, 12:30 PM... Apr 9 2008, 09:40 PM kami no kitsune Hi. I'm using Woratana's jump restriction ... Apr 9 2008, 11:09 AM moshinmikeluvin08 Im very new to scripts, so im sorry if this is a r... Apr 14 2008, 01:41 PM Diedrupo QUOTE (moshinmikeluvin08 @ Apr 14 2008, 03... Apr 15 2008, 09:35 AM Slayer5002 it doesnt work for me it all goes on one line and ... Apr 17 2008, 06:25 PM deepthinker566 OK this script works fine, up until I try to buy s... Apr 17 2008, 06:59 PM AlyxO For me it also works.. apparently
if I set my pla... Apr 19 2008, 09:46 AM Diedrupo QUOTE (AlyxO @ Apr 19 2008, 12:00 PM) For... Apr 21 2008, 09:53 AM skater4life720 I got a error "Script 'Caterpillar System... Apr 20 2008, 11:29 AM Slayer5002 Great Scripts im useing it and love it! Apr 20 2008, 01:55 PM Shibuyah Hi, before I say anything, I'm going to let yo... May 3 2008, 08:49 AM
3 Pages
1 2 3 >
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
RPG RPG Revolution is an Privacy
Policy and Legal
|
|