Announcement
Announcement
| 2nd Quarter Contest Announcement posted! See the Community Announcements section. |
New threads (complete scripts) here will go into a moderation queue. You will not see your thread appear when you create it. A moderator will decide if it will be approved or denied.
![]() ![]() |
Jun 18 2008, 07:45 PM
Post
#1
|
|
![]() ![]() Type: Undisclosed |
I did not make this! I am placing here because many people will find it useful.
QUOTE (woratana) This script is originally by Trickster. And ported to VX by Diedrupo. ![]() This Lets people in your party follow you around! ![]() 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########### ########### ########### Instructions: Place above main! This post has been edited by MrAnonymous: Jul 24 2008, 03:08 PM
Reason for edit: Credit to the author!
-------------------- Currently playing: Sitar hero 3
Current RMVX Game: Dark Knight |
|
|
|
Jun 18 2008, 11:23 PM
Post
#2
|
|
![]() Lord o' Death <BLANK> ![]() Type: Designer |
lol, KGC, also this script isnt compatible by itself ya know... you need 4 others i think.
-------------------- ![]() |
|
|
|
Jun 18 2008, 11:53 PM
Post
#3
|
|
![]() Type: Writer Alignment: Chaotic Neutral |
You shouldn't post anything without crediting the original creator. People look down on that. And if this is KGC, then it has been posted already and is probably in the KGC scripts library at the least.
-------------------- Trailer for It Came From Yesterday: Click Me
This was made by a dear friend of mine. Any support is appreciated! Also, Like the Facebook page while you're at it: It Came From Yesterday New and improved official site: ICFY Swagbucks referral link: http://www.swagbucks.com/refer/jbart321 |
|
|
|
Jun 19 2008, 05:16 AM
Post
#4
|
|
![]() ![]() Type: Undisclosed |
I said this was not mine. I don't know who made it.
Anyway this one works on its own. You don't need any other scripts. Actually i think this is a different one to KGC. Blank said you need 4 but on this one you need only one. I will check who made it, but this was found in a really old game i made. This post has been edited by RidgeVortex: Jun 19 2008, 05:19 AM -------------------- Currently playing: Sitar hero 3
Current RMVX Game: Dark Knight |
|
|
|
Jun 19 2008, 09:42 AM
Post
#5
|
|
|
*O* ~(>_<)~ ![]() Type: Coder |
This script is originally by Trickster.
And ported to VX by Diedrupo. http://www.rpgrevolution.com/forums/?showtopic=8040 -------------------- |
|
|
|
Jun 19 2008, 03:42 PM
Post
#6
|
|
![]() ![]() Type: Undisclosed |
Thanks for finding the creator Woratana. =)
-------------------- Currently playing: Sitar hero 3
Current RMVX Game: Dark Knight |
|
|
|
Jun 19 2008, 06:00 PM
Post
#7
|
|
![]() Lord o' Death <BLANK> ![]() Type: Designer |
lol, I said I think there were 4 others. For example Also im pretty sure it wont work without KGC_InterfaceForWin32API script. Im not home to test ti right now.
-------------------- ![]() |
|
|
|
Jun 20 2008, 03:13 PM
Post
#8
|
|
![]() Type: Undisclosed |
ok...
i copied the script, and put it above main, but it came up as one big line could you post a demo so i can copy it from there? |
|
|
|
Jun 20 2008, 06:45 PM
Post
#9
|
|
![]() Lord o' Death <BLANK> ![]() Type: Designer |
copy it into a text file first then to the script database. I think that should work.
-------------------- ![]() |
|
|
|
Jun 20 2008, 06:47 PM
Post
#10
|
|
![]() Type: Undisclosed |
ok ill try
EDIT: YAY!!! and it works without that script you were talking about This post has been edited by sargunster: Jun 20 2008, 07:05 PM |
|
|
|
Jun 20 2008, 07:11 PM
Post
#11
|
|
![]() ![]() Type: Undisclosed |
Hehe! Im sure that this script is very useful, especially because you only need one script.
-------------------- Currently playing: Sitar hero 3
Current RMVX Game: Dark Knight |
|
|
|
Jun 20 2008, 07:36 PM
Post
#12
|
|
![]() Lord o' Death <BLANK> ![]() Type: Designer |
Guess your right. eh, sorry for the hassle. I cant just install any old program at my cousins house so I really didnt know. Anyways i guess its okay since Mr.A made a topic for all the scripts he translated until he compiled the KGC Library with TouchFuzzy and he didnt make a topic for this so yeah.
-------------------- ![]() |
|
|
|
Jun 27 2008, 02:06 PM
Post
#13
|
|
![]() *burp* I eat lurkers... ![]() |
Works perfectly! Thank you very much!
-------------------- p.s why not have a look at the demo for my game while your at it?
Cheers jim42 -------------------- OMG! Granny Gave me Cookies!!! » Click to show Spoiler - click again to hide... « ![]() ![]() |
|
|
|
Jun 27 2008, 08:57 PM
Post
#14
|
|
![]() Type: Designer |
Anyone know how to make this work so it doesn't freeze your game whenever someone leaves your party?
|
|
|
|
Jun 28 2008, 08:02 PM
Post
#15
|
|
![]() |
I need help when i copy and paste it's just one long line
|
|
|
|
Jun 29 2008, 05:59 AM
Post
#16
|
|
![]() |
|
|
|
|
Jun 29 2008, 06:07 AM
Post
#17
|
|
![]() Type: Writer Alignment: Chaotic Neutral |
I need help when i copy and paste it's just one long line There you go. -------------------- Trailer for It Came From Yesterday: Click Me
This was made by a dear friend of mine. Any support is appreciated! Also, Like the Facebook page while you're at it: It Came From Yesterday New and improved official site: ICFY Swagbucks referral link: http://www.swagbucks.com/refer/jbart321 |
|
|
|
Jun 29 2008, 01:25 PM
Post
#18
|
|
|
Ell ![]() |
Just copy into word then into rpgmaker then it works.
|
|
|
|
Jun 30 2008, 07:41 PM
Post
#19
|
|
![]() *burp* I eat lurkers... ![]() |
Anyone know how to make this work so it doesn't freeze your game whenever someone leaves your party? I have just tried this in my own game, and I have no trouble whatever when I remove a party member. Maybe you have copied and pasted the script incorrectly? -------------------- p.s why not have a look at the demo for my game while your at it?
Cheers jim42 -------------------- OMG! Granny Gave me Cookies!!! » Click to show Spoiler - click again to hide... « ![]() ![]() |
|
|
|
Jul 1 2008, 01:57 AM
Post
#20
|
|
![]() Lord o' Death <BLANK> ![]() Type: Designer |
No to add a member to the catepiller or remove them from it you must use remove or add character twice.
EX: Effect Removes from Line: Remove Actor 01 Effect Both removes and removes from party Remove Actor 01 Remove Actor 01 Vice A Versa for adding, at least this is how the KGC Version works as far as I know or something of the sort. This post has been edited by Blank: Jul 1 2008, 02:07 AM -------------------- ![]() |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 22nd May 2013 - 08:43 AM |
|
|