
When your game is very great, when the map's numerous, how did you solve the problem of long distance travel? Here's a solution: when you arrive in a region, will open a switch,This switch is controlled by the "transfer system" you can call this system in the menu, in another place to the places you have visited, Is it right? Very convenient?
Matters needing attention in using this script——————————————————————————————
You can use this sentence script to call this system:
$scene = Scene_Teleport.new
From up to down town must be order, otherwise it will error
TOWNS[0]=["town name", a control switch, [map number, coordinates X, coordinates Y,]Orientation.
Name = you want to transfer the name of the town
Map number X Y is the target location
Control switch = is very simple, is the switch is open, then your breath menu is this map
Please refer to the following toward = Digital matrix:
......2↑
4←....→6
.....↓8
Do you understand?
May I say you do not really understand, then you can directly into your project test, believe you will know how to use, in addition, Amy, how much do you know about Chinese? If I made a Chinese game, can you help me translate into English version?
- #==============================================================================
- # The script from the China http://www.66RPG.com, used and reproduced please keep this information
- # transfer share: if you are using a this script writer, please keep this information, because it is from Chinese script resource, if
- # you ignore this clause, well, I wish you “山高水低”
- #==============================================================================
- # custom content interpretation:
- # TOWNS[number "is a place, you can easily write", the switch number, [transfer to map ID, transfer to map x,
- # making making making transfer to map y], role orientation.
- #
- # number please according to 0, 1, 2, 3...... Down the order.
- When the number # switch, can choose the delivery place
- # role orientation, 2, 4 left, 6 right, 8, direction and the relationship between digital specific can reference your numeric keypad
- # if other directions please ourselves.
- #
- #
- Method of use: # public events in the need to transmit the portal, transfer, transfer, transfer stone Feathers Hotel a place:
- # making making call script: $scene = Scene_Teleport.new
- #
- #==============================================================================
- TOWNS=[]
- TOWNS[0]=["魔幻森林",1,[23,8,5],2]
- TOWNS[1]=["齐拉海",2,[59,48,8],4]
- TOWNS[2]=["贾拉山脉",3,[34,9,10],8]
- TOWNS[3]=["苏泊尔湖",4,[52,15,38],8]
- TOWNS[4]=["宝石平原",5,[40,6,23],8]
- TOWNS[5]=["梦幻之地",6,[46,9,16],8]
- TOWNS[6]=["乌卡雪山",7,[46,9,16],8]
- TOWNS[7]=["拉苏河",8,[46,9,16],8]
- TOWNS[8]=["奇遇之海",9,[46,9,16],8]
- TOWNS[9]=["纳奥湖",10,[46,9,16],8]
- TOWNS[10]=["克莫伐木场",11,[46,9,16],8]
- TOWNS[11]=["阿罗工房",12,[46,9,16],8]
- TOWNS[12]=["黎明皇家港",13,[46,9,16],8]
- #==============================================================================
- # ■ Window_Teleport
- #------------------------------------------------------------------------------
- #==============================================================================
- class Window_Teleport < Window_Selectable
- #--------------------------------------------------------------------------
- # ● Initialization of the like
- #--------------------------------------------------------------------------
- def initialize
- super(640,640,64,64)
- self.contents = Bitmap.new(width, height)
- self.opacity = 180
- get_towns
- draw_towns
- @column_max = 1
- end
- #--------------------------------------------------------------------------
- # ● Get to town and window size
- #--------------------------------------------------------------------------
- def get_towns
- @carol3_towns = []
- @width_temp = 0
- @cont_use = false
- for town in TOWNS
- if $game_switches[town[1]]==true
- @carol3_towns.push(town)
- if contents.text_size(town[0]).width >= @width_temp
- @width_temp = contents.text_size(town[0]).width
- end
- end
- end
- @item_max = @carol3_towns.size
- if @item_max == 0
- @carol3_towns[0] = ["There is no known area exploration!",1,[1,1,1]]
- $game_player.move_up
- @width_temp = contents.text_size(@carol3_towns[0][0]).width
- @item_max = 1
- @cont_use = true
- end
- self.width = [@width_temp+32,480].min
- self.height = [(@item_max+1)*32,360].min
- self.x = (608-self.width)/2
- self.y = (480-self.height)/2
- self.contents = Bitmap.new(width-32,row_max*WLH)
- end
- #--------------------------------------------------------------------------
- # ●Depicting the town name
- #--------------------------------------------------------------------------
- def draw_towns
- for i in 0...@carol3_towns.size
- self.contents.draw_text(0,i*WLH,@width_temp,WLH,@carol3_towns[i][0],1)
- end
- end
- #--------------------------------------------------------------------------
- # ● The content returned
- #========================================================================
- # ● Map number
- #--------------------------------------------------------------------------
- def map_id
- return @carol3_towns[self.index][2][0]
- end
- def map_x
- return @carol3_towns[self.index][2][1]
- end
- def map_y
- return @carol3_towns[self.index][2][2]
- end
- def map_direction
- return @carol3_towns[self.index][3]
- end
- #--------------------------------------------------------------------------
- # ● judging whether a city without
- #--------------------------------------------------------------------------
- def cant_use?
- return @cont_use
- end
- end
- #==============================================================================
- # ■ Scene_Teleport
- #------------------------------------------------------------------------------
- #==============================================================================
- class Scene_Teleport < Scene_Base
- def start
- Sound.play_decision
- @carol3_trans_white = false
- @carol3_map_sprite = Spriteset_Map.new
- @carol3_teleport_window = Window_Teleport.new
- if @carol3_teleport_window.cant_use?
- @carol3_teleport_window.index = -1
- else
- @carol3_teleport_window.index = 0
- end
- end
- def terminate
- super
- @carol3_teleport_window.dispose
- end
- def update
- super
- carol3_update
- end
- def update_scene
- @carol3_teleport_window.active = true
- $game_player.reserve_transfer(@carol3_teleport_window.map_id, @carol3_teleport_window.map_x, @carol3_teleport_window.map_y, @carol3_teleport_window.map_direction)
- $game_map.autoplay
- $scene = Scene_Map.new
- end
- def carol3_update
- @carol3_teleport_window.update
- if Input.trigger?(Input::B)
- Sound.play_cancel
- $scene = Scene_Map.new
- $game_player.move_up
- return
- end
- if Input.trigger?(Input::C)
- if @carol3_teleport_window.index == -1
- Sound.play_cancel
- $scene = Scene_Map.new
- return
- else
- Audio.se_play("Audio/SE/" + "Teleport",100,100)
- update_scene
- return
- end
- end
- end
- end
- #==============================================================================
- # The script from the China http://www.66RPG.com, used and reproduced please keep this information
- #==============================================================================
Expand to see the code.