Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.
|
|
| [help] Trouble with caterpillar | |
| 2012-04-08, 12:30 | [help] Trouble with caterpillar |
---|
Vahn X Newbie
Posts : 58 Thanked : 0 Engine : RMVX Skill : Beginner Type : Mapper
| Ada masalah pas jalanin script caterpillar udah wa coba berkali-kali tapi tetep aja ada masalah nih Scriptnya - Spoiler:
- Code:
-
#=============================================================== # ● [VX] ◦ Plug 'n Play Caterpillar System ◦ □ # * Create party members follow the player on map * #-------------------------------------------------------------- # ◦ by Woratana [woratana@hotmail.com] # ◦ Thaiware RPG Maker Community # ◦ Released on: 29/02/2009 # ◦ Version: 2.0 #-------------------------------------------------------------- # ◦ Update: #-------------------------------------------------------------- # □ Version 2.0 (29/02/2009) # - Fix direction bug # - Fix vehicle bug # - Add max following members # □ Version 1.5 (17/02/2009) # - Fix dash bug # - More compatible with script that edit Spriteset_Map.create_characters #-------------------------------------------------------------- # ◦ Compatibility: #-------------------------------------------------------------- # □ This script will rewrite 0 method(s): # # # □ This script will alias 14 method(s): # Spriteset_Map.create_characters # Spriteset_Map.update_characters # Game_Player.move_down # Game_Player.move_left # Game_Player.move_right # Game_Player.move_up # Game_Player.move_lower_left # Game_Player.move_lower_right # Game_Player.move_upper_left # Game_Player.move_upper_right # Game_Player.jump # Game_Player.get_off_vehicle # Game_Player.moveto # Game_Map.setup # # □ This script should work with most scripts # #-------------------------------------------------------------- # ◦ Installation: #-------------------------------------------------------------- # 1) This script should be placed JUST BEFORE ▼ Main Process. # # □ Like this: # ▼ Materials # ... # ... # * Caterpillar System # ▼ Main Process # Main # # 2) Setup this script in Setup Part below. # #-------------------------------------------------------------- # ◦ How to use: #-------------------------------------------------------------- # □ Place this script and setup in the setup part. # #=================================================================
module Wora
#================================================================= # ++ Setup Part #-----------------------------------------------------------------
CATERPILLAR_HIDE_SWITCH = 1 # Turn ON this switch to HIDE caterpillar actors # Turn OFF this switch to SHOW caterpillar actors
CATERPILLAR_MAX_ACTORS = 5 # Maximum number of the following actors
#-----------------------------------------------------------------
def self.add_upd_cater(code = nil) # Add new move action to caterpillar $game_cateracter.each_index do |i| act = $game_cateracter[i] eval($cater_movelist[$cater_movelist.size - 1 - i]) end $cater_movelist.shift $cater_movelist.push(code) unless code.nil? end
def self.reset_cater_pos # Reset caterpillar position $game_cateracter.each_index {|i| $game_cateracter[i].refresh } $cater_movelist = Array.new(Wora::CATERPILLAR_MAX_ACTORS - 1) {''} end end
class Game_WCateracter < Game_Character attr_accessor :actor
def initialize(member_id) super() @wmember_id = member_id refresh end
def update(*args) super(*args) actor = $game_party.members[@wmember_id] unless actor.nil? @character_name = actor.character_name @character_index = actor.character_index @transparent = ($game_switches[WoraCATERPILLAR_HIDE_SWITCH] or $game_player.in_vehicle? or $game_player.transparent) @opacity = $game_player.opacity @move_speed = $game_player.move_speed + ($game_player.dash? ? 1 : 0) else @character_name = '' @character_index = 0 end end
def screen_z return $game_player.screen_z end
def check_event_trigger_touch(x, y) return false end
def passable?(x, y) return true end
def refresh @direction = $game_player.direction moveto($game_player.x, $game_player.y) end end
class Spriteset_Map alias wora_cater_sprmap_crechara create_characters alias wora_cater_sprmap_updchara update_characters #-------------------------------------------------------------------------- # * Create Character Sprite #-------------------------------------------------------------------------- def create_characters(*args) wora_cater_sprmap_crechara(*args) # Remove Game_Player sprite, this will be add later ((@character_sprites.size-1)..0).each do |i| next if @character_sprites[i].nil? if @character_sprites[i].character.is_a?(Game_Player) @character_sprites[i].dispose @character_sprites.delete_at(i) break end end # Create party members sprite (1..(Wora::CATERPILLAR_MAX_ACTORS-1)).each do |n| @character_sprites.push(Sprite_Character.new(@viewport1, $game_cateracter[n-1])) end @character_sprites.push(Sprite_Character.new(@viewport1, $game_player)) end #-------------------------------------------------------------------------- # * Update Character Sprite #-------------------------------------------------------------------------- def update_characters(*args) $game_cateracter.each {|cater| cater.update } wora_cater_sprmap_updchara(*args) end end
class Game_Player < Game_Character attr_reader :move_speed unless method_defined?('wora_cater_gampla_movdown') alias wora_cater_gampla_movdown move_down alias wora_cater_gampla_movleft move_left alias wora_cater_gampla_movright move_right alias wora_cater_gampla_movup move_up alias wora_cater_gampla_movll move_lower_left alias wora_cater_gampla_movlr move_lower_right alias wora_cater_gampla_movul move_upper_left alias wora_cater_gampla_movur move_upper_right alias wora_cater_gampla_jump jump alias wora_cater_gampla_getoffveh get_off_vehicle alias wora_cater_gampla_moveto moveto
#-------------------------------------------------------------------------- # * Move Down #-------------------------------------------------------------------------- def move_down(turn_ok = true) wora_cater_gampla_movdown(turn_ok) Wora.add_upd_cater("act.move_down(#{turn_ok})") unless @move_failed end #-------------------------------------------------------------------------- # * Move Left #-------------------------------------------------------------------------- def move_left(turn_ok = true) wora_cater_gampla_movleft(turn_ok) Wora.add_upd_cater("act.move_left(#{turn_ok})") unless @move_failed end #-------------------------------------------------------------------------- # * Move Right #-------------------------------------------------------------------------- def move_right(turn_ok = true) wora_cater_gampla_movright(turn_ok) Wora.add_upd_cater("act.move_right(#{turn_ok})") unless @move_failed end #-------------------------------------------------------------------------- # * Move up #-------------------------------------------------------------------------- def move_up(turn_ok = true) wora_cater_gampla_movup(turn_ok) Wora.add_upd_cater("act.move_up(#{turn_ok})") unless @move_failed end #-------------------------------------------------------------------------- # * Move Lower Left #-------------------------------------------------------------------------- def move_lower_left wora_cater_gampla_movll Wora.add_upd_cater('act.move_lower_left') unless @move_failed end #-------------------------------------------------------------------------- # * Move Lower Right #-------------------------------------------------------------------------- def move_lower_right wora_cater_gampla_movlr Wora.add_upd_cater('act.move_lower_right') unless @move_failed end #-------------------------------------------------------------------------- # * Move Upper Left #-------------------------------------------------------------------------- def move_upper_left wora_cater_gampla_movul Wora.add_upd_cater('act.move_upper_left') unless @move_failed end #-------------------------------------------------------------------------- # * Move Upper Right #-------------------------------------------------------------------------- def move_upper_right wora_cater_gampla_movur Wora.add_upd_cater('act.move_upper_right') unless @move_failed end #-------------------------------------------------------------------------- # * Jump #-------------------------------------------------------------------------- def jump(x, y) wora_cater_gampla_jump(x, y) Wora.add_upd_cater("act.jump(#{x},#{y})") end #-------------------------------------------------------------------------- # * Get Off Vehicle #-------------------------------------------------------------------------- def get_off_vehicle(*args) wora_cater_gampla_getoffveh(*args) Wora.reset_cater_pos end #-------------------------------------------------------------------------- # * Move to Designated Position #-------------------------------------------------------------------------- def moveto(*args) wora_cater_gampla_moveto(*args) Wora.reset_cater_pos end end end
class Game_Map attr_accessor :events
alias wora_cater_gammap_setup setup def setup(*args) wora_cater_gammap_setup(*args) # Create caterpillar actors $game_cateracter = [] (1..(Wora::CATERPILLAR_MAX_ACTORS-1)).each do |n| $game_cateracter.push(Game_WCateracter.new(n)) end $cater_movelist = Array.new(Wora::CATERPILLAR_MAX_ACTORS - 1) {''} end end
kalo dipasang selalu muncul error kayak gini - Spoiler:
|
| | | 2012-04-08, 12:38 | Re: [help] Trouble with caterpillar |
---|
marjoni01 Senior
Posts : 971 Thanked : 5 Engine : RMVX Ace Skill : Intermediate Type : Developer
| Yang salah sepertinya karena aturan dalam line ini yang salah : - Code:
-
CATERPILLAR_HIDE_SWITCH = 1 Maybe? |
| | | 2012-04-08, 12:40 | Re: [help] Trouble with caterpillar |
---|
Tamu Tamu
| - Quote :
- CATERPILLAR_HIDE_SWITCH = 1
# Turn ON this switch to HIDE caterpillar actors # Turn OFF this switch to SHOW caterpillar actors coba switchnya di off kan atau di on kan di event |
| | | 2012-04-08, 12:56 | Re: [help] Trouble with caterpillar |
---|
azhel_winter Newbie
Posts : 12 Thanked : 1 Engine : Multi-Engine User Skill : Beginner Type : Developer
| Ganti line 112 dari @transparent = ($game_switches[WoraCATERPILLAR_HIDE_SWITCH] or jadi @transparent = ($game_switches[Wora::CATERPILLAR_HIDE_SWITCH] or |
| | | 2012-04-08, 13:26 | Re: [help] Trouble with caterpillar |
---|
Vahn X Newbie
Posts : 58 Thanked : 0 Engine : RMVX Skill : Beginner Type : Mapper
| udah bisa! makasih |
| | | 2012-04-18, 09:08 | Re: [help] Trouble with caterpillar |
---|
weild64 Novice
Posts : 175 Thanked : 0 Engine : Multi-Engine User Skill : Intermediate Type : Mapper
| kak script ini emang nya buat apa ? |
| | | 2012-04-18, 09:14 | Re: [help] Trouble with caterpillar |
---|
privateer Novice
Posts : 253 Thanked : 1 Engine : RMXP Skill : Advanced Type : Scripter
| Ini biar para party member akan mengikuti lead hero di map.... Kayak Final Fantasy 4 Heroes of Light... |
| | | 2012-04-18, 10:16 | Re: [help] Trouble with caterpillar |
---|
weild64 Novice
Posts : 175 Thanked : 0 Engine : Multi-Engine User Skill : Intermediate Type : Mapper
| | | | 2012-04-18, 10:58 | Re: [help] Trouble with caterpillar |
---|
Adhe45 Senior
Posts : 665 Thanked : 4 Engine : RMXP Skill : Beginner Type : Spriter
| @weild bukan macem pet (mungkin). . . . tapi script itu mbuat hero 2-4 ngikutin hero 1. . . . |
| | | 2012-04-18, 11:48 | Re: [help] Trouble with caterpillar |
---|
Tamu Tamu
| Weild: Untuk penjelasannya: Caterpillar digunakan untuk para anggota grup yang mengikuti arah jalan si player. for example: Note: Lagipula thread ini sudah solved bukan, momod tolong lock thread ini... Kalau mau jelas lagi pergi ke chatbox atu bikin thread lagi.. CMIIW Thanks.. |
| | | | Re: [help] Trouble with caterpillar |
---|
Sponsored content
| | | | | [help] Trouble with caterpillar | |
|
Similar topics | |
|
Similar topics | |
| |
Halaman 1 dari 1 | |
| Permissions in this forum: | Anda tidak dapat menjawab topik
| |
| |
Latest 10 Topics | [Web Novel] Gloria Infidelis 2016-11-17, 21:27 by LightNightKnight
[Announcement] Forum baru untuk RMID 2016-08-25, 16:39 by TheoAllen
Where I'm Wrong ? 2016-07-24, 16:10 by ReydVires
flakeheartnet's Resources part III 2016-07-08, 14:30 by flakeheartnet
Keira's Art Warehouse 2016-06-28, 19:27 by KeiraBlaze
Theo Core Time System + Bingung 2016-06-27, 16:24 by Lockin
Error Script, Maybe ? 2016-06-27, 16:20 by Lockin
Nusaimoe @ RMID Lounge 2016-06-21, 05:02 by Jihad Bagas
Call Random Battle 2016-06-15, 17:04 by Lockin
Flakeheartnet Resources Part II [come back gift] 2016-06-07, 15:51 by flakeheartnet
|
Statistics
|
Members: [ 4947 ]
Topics: [ 8258 ]
Posts: [ 112606 ]
Newest member: [ https://rmid.forumotion.net/u4968 ]
|
|
|
|
|
|