irpg Community

Full Version: สอบถามเรื่อง การตั้งชื่อ rpg vx ace แและ vx
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
สอบถามการตั้งชื่อครับ   คืัอ  เมื่อเราเรียก  เมนูตั้งชื่อมาเเล้ว   และก็ตั้งชื่อแล้ว  แต่ ทำไม  ชื่อไม่ตรง กับ  ที่เข้า ตั้งไว้ละครับ  ผมใช้ สคริปในเว็บนี้
จำไม่ได้ว่าของใคร

ขออนุญาต เจ้า ของสคริป ที่เอามาโพสไว้  นะครับ


module Score
Switch = 2
Variable = 2
Hp = 1
Text = "Member2 : %d"
end
class Window_Score < Window_Base
def initialize
super(0, 0, window_width, window_height)
self.opacity = 0
refresh
end
def update
super
refresh
end
def window_width
return Graphics.width
end
def window_height
return line_height*2 + 32
end
def line_height
if defined?(super)
return super
else
return WLH
end
end
def refresh
self.visible = $game_switches[Score::Switch]
contents.clear
make_score
end
def make_score
text = sprintf(Score::Text, $game_variables[Score::Variable])
self.contents.draw_text(310, 0, window_width - 32, line_height, text)
self.draw_actor_hp($game_party.members[Score::Hp], 310, line_height, 150 - 32)
end
class Scene_Map < Scene_Base
alias cur_start start
def start
cur_start
make_window
end
def make_window
@score_window = Window_Score.new
end
alias cur_update update
def update   
cur_update
@score_window.update
end
end
end




  ใช้สคริปตัวนี้  พลัง  และ  คะแนน ก็ขึ้นมาที่เขียนไว้  แต่ถ้าตอนเรียกเมนูตั้งชื่อตัวละคร ตอนเริ่มเกม อะครับ  สมมุติเราพิมพ์  aa  แต่พอตอนเเสดงตอนเล่นเกม  กลับแสดง  ชื่อเป็น Member 2   

        จะปรับตรงไหนดีครับให้ชื่อที่เราพิมตอนตั้งชื่อให้ตรง กับ  ค่าที่เเสดง ตอนเขียนสคริป ไว้ครับ  

                                     รบกวน ท่าผู้รู้ทั้งหลาย  แนะนำด้วยนะครับ   ขอบพระคุณยิ่ง  ครับ