Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RGSS1 สคริปต์ใช้ทักษะแล้วพื้นหลังเลื่อน ใช้ได้กับ Enu SBS Tanketai XP
#1
Enu's SBS Battle Panorama Add-On

สคริปต์เขียนโดย : Angelix
ลิงค์ต้นฉบับ : http://www.irpgth.com/community/School/2776-...Enu-SB


รายละเอียด :
สคริปต์เสริมระบบ Battle Panorama สำหรับ Enu SBS Tanketai
มันคือระบบเปลี่ยนพื้นหลังเวลาใช้สกิล เหมาะกับท่าไม้ตายเป็นอย่างยิ่ง

สกรีนช๊อต :
http://imageshack.us/clip/my-videos/19/testb.mp4/

วิธีการใช้งาน :
หาอ่านในสคริปต์เอาน่อ

ข้อตกลงการนำไปใช้งาน :
อย่างน้อยๆก็ใส่ชื่อ Angelix ลงในเครดิตด้วยล่ะ


โค๊ดสคริปต์
Code:
#================================================
# Setup Battle Panorama
# เป็นการตั้งฐานข้อมูลของ Battle Panorama ที่จะใช้
#================================================
# $pano[ID] = [filename,hue,speed_x,speed_y]
# filename = ชื่อไฟล์ภาพในโฟลเดอร์ Graphics/Panoramas
# hue = ค่า hue ของภาพ
# speed_x,y = ความเร็วในแนว x,y
$pano[0] = ["001-Sky01",0,4,0]
$pano[1] = ["002-Sky02",0,8,0]
#================================================
# Setup Skill
# เป็นการตั้งว่าสกิลไหนจะแสดง Battle Panorama อะไร
#================================================
# ใช้ SkillID=>PanoID,SkillID=>PanoID ไปเรื่อยๆ
$skill_pano = {57=>0}
#================================================
class Spriteset_Battle
  alias ang_acbs_add_sprbt_init initialize
  def initialize
    ang_acbs_add_sprbt_init
    @battle_pano = Plane.new(@viewport1)
    @pano_par = [0,0]
    update
  end
  
  alias ang_acbs_add_sprbt_updt update
  def update
    return if @battle_pano.nil?
    @battle_pano.ox -= @pano_par[0]
    @battle_pano.oy -= @pano_par[1]
    ang_acbs_add_sprbt_updt
  end
  
  alias ang_acbs_add_sprbt_dispo dispose
  def dispose
    @battle_pano.dispose
    ang_acbs_add_sprbt_dispo
  end
  
  def setup_pano(pano_id)
    return if pano_id.nil?
    data = $pano[pano_id]
    return if data.nil?
    @battle_pano.bitmap = RPG::Cache.panorama(data[0],data[1])
    @pano_par = [data[2],data[3]]
  end
  
  def clear_pano
    @battle_pano.bitmap.dispose if !(@battle_pano.bitmap.nil? or @battle_pano.bitmap.disposed?)
    @battle_pano.bitmap = nil
    @pano_par = [0,0]
  end
  
end
class Scene_Battle
  
  alias ang_sbsad_mkskres make_skill_action_result
  def make_skill_action_result
    skl_id = @active_battler.current_action.skill_id
    if !$skill_pano.keys.include?(skl_id)
      ang_sbsad_mkskres
      return
    end
    skill = $data_skills[skl_id]
    if skill.plus_state_set.include?(1)
      for member in $game_party.actors + $game_troop.enemies
        next if member.immortal
        next if member.dead?
        member.dying = true
      end
    else
      immortaling
    end
    return unless @active_battler.skill_can_use?(skill.id)
    target_decision(skill)
    @active_battler.consum_skill_cost(skill)
    @status_window.refresh
    @spriteset.set_action(@active_battler.actor?, @active_battler.index, skill.base_action)
    @help_window.set_text(skill.name, 1) unless skill.extension.include?("HELPHIDE")
    @spriteset.setup_pano($skill_pano[skl_id])
    playing_action
    @common_event_id = skill.common_event_id
  end
  
  alias ang_sbsad_actionend action_end
  def action_end
    ang_sbsad_actionend
    if @active_battler.current_action.kind == 1
      @spriteset.clear_pano
    end
  end  
end
[-] The following 3 users say Thank You to Muge9thD for this post:
  • ACSII, B.o.N., naokiz
Reply
#2
ทำไมของข้าพเจ้ามันใช้ได้อ่ะ
เด้งตรงบันทัดแรกเลย
$pano[0] = ["back",255,4,0]
$pano[1] = ["002-Sky02",0,8,0]
[Image: XAJGLBg.png]
[-] The following 1 user says Thank You to ACSII for this post:
  • naokiz
Reply
#3
ขาดไฟล์ back กับ 002-sky02 ใน โฟลเดอร์panoรึเปล่าคับ(ไม่ก็pictureบ่ชัว)
[Image: AllianceSignature-TreasureofDragoon.png]

Official Supporter of the following Alliance projects:
Show ContentSpoiler:
Reply
#4
Quote:# $pano[ID] = [filename,hue,speed_x,speed_y]
# filename = ชื่อไฟล์ภาพในโฟลเดอร์ Graphics/Panoramas
[Image: 7f7cb68ce0.png][Image: rlogo.png]
Show ContentSpoiler:
Reply
#5
---------------------------
i m i t a t e | R M X P
---------------------------
Script ' ' line 9: NoMethodError occurred.

undefined method `[]=' for nil:NilClass
---------------------------
OK
---------------------------


มันึ้นแบบนี้ขอรับ
[Image: XAJGLBg.png]
Reply
#6
ลืมถามแล้วแล้วได้ใช้สคริปนี้ด้วยเปล่า
[Image: Img8-11.png]

Sideview Battle System Tankentai XP

สคริปนี้รู้สึกแองจี้จะโมฯให้ลีนส์เป็นพิเศษ
ไม่ใช่สคริปที่ใช้ได้เพียวๆ
[Image: 7f7cb68ce0.png][Image: rlogo.png]
Show ContentSpoiler:
Reply
#7
ไม่ได้ใช้ด้วย ขอรับ
[Image: XAJGLBg.png]
Reply
#8
ขอบคุณครับ
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)