10-16-2016, 07:38 PM
มีสคริป คะแนน และ ค่าพลัง ของ ผู้เล่นไหมครับ
ผมมี ของ xp แต่ไปใส่ ใน vx แล้วมัน Error
และ อีกอันนึ่งมี vx ace มันก็ Error เหมือนกันครับ
ของ vx ace ที่ error
?27? NameError???
uninitialized constant Scene_Map::SceneManager
อันนี้คือ สคริป vx ace
class ScoreWindow < Window_Base
def initialize
super(0, 0, window_width, window_height)
makeScore
refresh
self.opacity=0
end
def window_width
return 200
end
def window_height
return 100
end
def refresh
contents.clear
makeScore
end
def makeScore
text=sprintf("Score: %d", $game_variables[1])
draw_text(0, 0, 200, line_height, text)
end
end
class Scene_Map < Scene_Base
def start
super
SceneManager.clear
$game_player.straighten
$game_map.refresh
$game_message.visible = false
create_spriteset
create_all_windows
@menu_calling = false
makeWindow
end
def makeWindow
@myWindow=ScoreWindow.new
end
def update
super
$game_map.update(true)
$game_player.update
$game_timer.update
@spriteset.update
update_scene if scene_change_ok?
if $update==1
@myWindow.refresh
end
if $showScore==0
@myWindow.hide
end
if $showScore==1
@myWindow.show
end
end
end
ส่วนจะแก้ ของ xp หรือ vx ace ง่ายกว่ากัน
หรือมีวิธีไหนที ให้มันแสดงคะแนน และค่าพลัง ในเกม รบกวนด้วยนะครับ
ผมมี ของ xp แต่ไปใส่ ใน vx แล้วมัน Error
และ อีกอันนึ่งมี vx ace มันก็ Error เหมือนกันครับ
ของ vx ace ที่ error
?27? NameError???
uninitialized constant Scene_Map::SceneManager
อันนี้คือ สคริป vx ace
class ScoreWindow < Window_Base
def initialize
super(0, 0, window_width, window_height)
makeScore
refresh
self.opacity=0
end
def window_width
return 200
end
def window_height
return 100
end
def refresh
contents.clear
makeScore
end
def makeScore
text=sprintf("Score: %d", $game_variables[1])
draw_text(0, 0, 200, line_height, text)
end
end
class Scene_Map < Scene_Base
def start
super
SceneManager.clear
$game_player.straighten
$game_map.refresh
$game_message.visible = false
create_spriteset
create_all_windows
@menu_calling = false
makeWindow
end
def makeWindow
@myWindow=ScoreWindow.new
end
def update
super
$game_map.update(true)
$game_player.update
$game_timer.update
@spriteset.update
update_scene if scene_change_ok?
if $update==1
@myWindow.refresh
end
if $showScore==0
@myWindow.hide
end
if $showScore==1
@myWindow.show
end
end
end
ส่วนจะแก้ ของ xp หรือ vx ace ง่ายกว่ากัน
หรือมีวิธีไหนที ให้มันแสดงคะแนน และค่าพลัง ในเกม รบกวนด้วยนะครับ