Z tego co zrozumiałam wcześniej to właśnie o to Tobie chodziło - aby wyświetlało nazwę teleportu jeszcze zanim się teleportujesz (by wyświetlało miejsce, do którego się przeniesiesz, jeśli z niego skorzystasz).
Nie nie :P Chciałem aby po wejściu w teleport pisała nazwa :P nie krok przed nim :) ale to już nie istotne
Cytat:
Chcesz, aby to okienko było cały czas na mapie? To przecież można zmienić...
Nie nie :P też nie chce by było ciągle na mapie ale tylko wtedy kiedy jestem na polu z teleportem... no ale jak to ma Ci przysporzyć sporych zmian w skrypcie i czasu to daj se spokój ;D to mi w zupełności wystarcza :D
# Tekst wyświetlany przed nazwą lokacji
TEKST_PRZED_NAZWÄ„ = 'Cel: '
end
class Scene_Map < Scene_Base
alias ayene_scmap_start start
alias ayene_scmap_terminate terminate
alias ayene_scmap_update update
alias ayene_scmap_update_basic update_basic
def terminate
ayene_scmap_terminate
@teleport_window.dispose
end
def update_basic
ayene_scmap_update_basic
@teleport_window.visible = false
end
def update
ayene_scmap_update
@teleport_window.update
if $teleport_refresh == true
@teleport_window.refresh
@teleport_window.visible = true
else
@teleport_window.visible = false
end
end
end
class Window_Teleport < Window_Base
def initialize
super(284, 0, 260, WLH + 32)
self.opacity = Ayene::PRZEZROCZYSTOŚĆ_OKNA
refresh
end
def refresh
self.contents.clear
self.contents.font.shadow = true
text = $game_temp.teleport_name.to_s
if Ayene::PRZEZROCZYSTOŚĆ_OKNA == 0
self.contents.draw_text(4, 0, self.width - 40, WLH, text, 2)
else
self.contents.draw_text(4, 0, self.width - 40, WLH, text, 0)
end
end
end
class Game_Temp
attr_accessor :teleport_name
end
class Game_Player < Game_Character
def check_teleport_touch(x, y)
return false if $game_map.interpreter.running?
result = false
for event in $game_map.events_xy(x, y)
for i in 0...event.list.size
if event.event.name.include?(Ayene::TAG_TELEPORTU) and event.list[i].code == 201
teleport_name = event.list[i].parameters[1]
map_name = load_data("Data/MapInfos.rvdata")
$game_temp.teleport_name = Ayene::TEKST_PRZED_NAZWÄ„ + map_name[teleport_name].name
$teleport_refresh = true
result = true
end
end
end
return result
end
def check_teleport_out(x, y)
return false if $game_map.interpreter.running?
result = false
for event in $game_map.events_xy(x, y)
for i in 0...event.list.size
if event.event.name.include?(Ayene::TAG_TELEPORTU) and event.list[i].code == 201
teleport_name = event.list[i].parameters[1]
map_name = load_data("Data/MapInfos.rvdata")
$game_temp.teleport_name = ''
$teleport_refresh = true
result = true
end
end
end
return result
end
end
class Game_Event < Game_Character
attr_reader :event
end
class Game_Character
alias ayene_gachar_move_down move_down
def move_down(turn_ok = true)
ayene_gachar_move_down(turn_ok)
check_teleport_touch(@x, @y)
check_teleport_out(@x, @y-1)
end
alias ayene_gachar_move_left move_left
def move_left(turn_ok = true)
ayene_gachar_move_left(turn_ok)
check_teleport_touch(@x, @y)
check_teleport_out(@x+1, @y)
end
alias ayene_gachar_move_right move_right
def move_right(turn_ok = true)
ayene_gachar_move_right(turn_ok)
check_teleport_touch(@x, @y)
check_teleport_out(@x-1, @y)
end
alias ayene_gachar_move_up move_up
def move_up(turn_ok = true)
ayene_gachar_move_up
check_teleport_touch(@x, @y)
check_teleport_out(@x, @y+1)
end
end
Lepiej jak widać okienko, ale jak kto tam woli ^^ Dla mnie fajny pomysł, na razie nie robię gry, ale jak coś to też użyję u siebie. Można też dodać jakiś obrazek, tak jak z nazwą lokacji.
________________________ Nie ma śniegu, a na ulicach pełno bałwanów ^^
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach Nie możesz zał±czać plików na tym forum Możesz ¶ci±gać zał±czniki na tym forum