Ziifee's Spin Command editing
3 posters
OmegaDev :: Coding Plaza :: RGSS2 (VX) :: RGSS2 Support
Page 1 of 1
Ziifee's Spin Command editing
Well Need some help I want the guard Icon to be the shield Icon I'm wearing/using
So I have go really far and I'm going well to but...
What is the actor. for shields?
I think it's armor1 but I tried it doesn't work...
Here's the code:
Any Ideas?
P.S
If you need the error here:
So I have go really far and I'm going well to but...
What is the actor. for shields?
I think it's armor1 but I tried it doesn't work...
Here's the code:
- Code:
if actor.armor1[0] != nil
n = actor.armor1[0].icon_index
@commands[0][3] = n if n > 0
end
Any Ideas?
P.S
If you need the error here:
- Code:
undefined method `armor1' for #<Game_Actor:0x42864b0>
Kyle?- Platinum Cookiez
- Posts : 500
Gald : 418
Stats
Cookies: 5
Re: Ziifee's Spin Command editing
Ok Here you go Omegas!
- Spoiler:
- Code:
=begin ========================================================================
* ziifee's Spin Command for RPG Tankentai Sideview Battle System with ATB
<ATB Only>
-This script is only for the Tankentai SBS with the ATB installed.
<Image Required>
Spin40 : Spin40.png is required in the Graphics/System folder.
=end # ========================================================================
module ZiiN7
# ▼ Spin Command/Icon Index Number
ATTACK = 1 # Attack (Default)
GUARD = 486 # Guard
SKILL = 494 # Skill
ITEM = 499 # Item
ESCAPE = 495 # Escape
# ▼ Spin Command/Direction of Rotation ( "normal" or "reverse" )
# Determines how Spin Command rotates according to left/right key press.
TURN = "normal"
# ▼ Spin Command/Switch Actor Command Button
# Define input button used to switch between actors with full ATB gauges.
SWITCH_COMMAND_BUTTON = Input::X
#--------------------------------------------------------------------------
# ● 通常回転 の判定 (スピンコマンド) Ignore this.
#--------------------------------------------------------------------------
def self.turn_normal?
return false if TURN == "reverse"
return true
end
end
#==============================================================================
# ■ module N02 for ATB Ver1.1
#==============================================================================
module N02
# ATB Gauge Positions. Overwrites ATB_PARTY_POSITION defined in ATB Config.
ATB_PARTY_POSITION = [[64,308],[160,306],[256,306],[352,306]]
end
#******************************************************************************
# ★ ベース
#******************************************************************************
#==============================================================================
# ■ Window_SpinCommand
#------------------------------------------------------------------------------
# 回転用コマンド選択を行うウィンドウです。
#==============================================================================
class Window_SpinCommand < Window_Base
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :index # カーソル位置
attr_reader :help_window # ヘルプウィンドウ
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# cx / cy : 中心の X座標 / Y座標
# commands : コマンド配列 (内容 は [name, kind, pull, enabled?])
# setting : 設定ハッシュ ("R"=>半径 "S"=>速さ "G"=>背景 "L"=>文字)
#--------------------------------------------------------------------------
def initialize(cx, cy, commands, setting = {})
@radius = setting.has_key?("R") ? setting["R"] : 40 # 描画半径
@speed = setting.has_key?("S") ? setting["S"] : 36 # 回転速さ
@spin_back = setting.has_key?("G") ? setting["G"] : "" # 背景画像
@spin_line = setting.has_key?("L") ? setting["L"] : nil # 文字位置
x, y = cx - @radius - 28, cy - @radius - 28
width = height = @radius * 2 + 56
super(x, y, width, height)
self.opacity = 0
@index = 0
@commands = commands # コマンド
@spin_right = true
@spin_count = 0
update_cursor
end
#--------------------------------------------------------------------------
# ▽ スピン画像を描画する (描画内容 強化用)
# i : インデックス
# cx : 表示 中心位置 X座標
# cy : 表示 中心位置 Y座標
#--------------------------------------------------------------------------
def draw_spin_graphic(i, cx, cy)
case command_kind(i)
when "icon"
draw_icon(command_pull(i), cx - 12, cy - 12, command_enabled?(i))
end
end
#--------------------------------------------------------------------------
# ★ リフレッシュ バグ回避用
#--------------------------------------------------------------------------
def refresh
set_spin
end
#--------------------------------------------------------------------------
# ★ 項目の描画 バグ回避用
#--------------------------------------------------------------------------
def draw_item(index, enabled = true)
@commands[index][3] = enabled
set_spin
end
#--------------------------------------------------------------------------
# ● 現在のコマンド名を取得する
#--------------------------------------------------------------------------
def command_name(index = @index)
return "" if index < 0
name = @commands[index][0]
return name != nil ? name : ""
end
#--------------------------------------------------------------------------
# ● コマンドの種類を取得
#--------------------------------------------------------------------------
def command_kind(index)
result = @commands[index][1]
return result != nil ? result : ""
end
#--------------------------------------------------------------------------
# ● コマンドの引数 を取得
#--------------------------------------------------------------------------
def command_pull(index)
result = @commands[index][2]
return result != nil ? result : ""
end
#--------------------------------------------------------------------------
# ● コマンドの有効フラグを取得
#--------------------------------------------------------------------------
def command_enabled?(index)
result = @commands[index][3]
return result != nil ? result : true
end
#--------------------------------------------------------------------------
# ● 名前の位置に index を設定する
#--------------------------------------------------------------------------
def set_index(name)
n = -1
for i in 0...@commands.size
n = i if @commands[i][0] == name
end
@index = n if n >= 0
update_cursor
call_update_help
set_spin
end
#--------------------------------------------------------------------------
# ● カーソル位置の設定
# index : 新しいカーソル位置
#--------------------------------------------------------------------------
def index=(index)
@index = index
update_cursor
call_update_help
set_spin
end
#--------------------------------------------------------------------------
# ● 中心のX座標を取得
#--------------------------------------------------------------------------
def center_x
return contents.width / 2
end
#--------------------------------------------------------------------------
# ● 中心のY座標を取得
#--------------------------------------------------------------------------
def center_y
return contents.height / 2
end
#--------------------------------------------------------------------------
# ● 項目数の取得
#--------------------------------------------------------------------------
def item_max
return @commands.size
end
#--------------------------------------------------------------------------
# ● 背景の設定 (再定義 向き)
#--------------------------------------------------------------------------
def set_background
return if @spin_back == ""
bitmap = Cache.system(@spin_back)
rect = Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(12, 12, bitmap, rect)
end
#--------------------------------------------------------------------------
# ● 文章の設定 (再定義 向き)
#--------------------------------------------------------------------------
def set_text
return if @spin_line == nil
y = center_y - WLH / 2 + @spin_line
self.contents.draw_text(center_x - 48, y, 96, WLH, command_name, 1)
end
#--------------------------------------------------------------------------
# ● スピンアイコンの角度の差を取得する
#--------------------------------------------------------------------------
def angle_size
return (Math::PI * 2 / item_max)
end
#--------------------------------------------------------------------------
# ● スピンアイコン回転時のカウント を設定する
#--------------------------------------------------------------------------
def set_spin_count
@spin_count = angle_size * 360 / @speed
set_spin(true)
end
#--------------------------------------------------------------------------
# ● スピン設定 の実行
# spin : 回転フラグ (true の時回転中)
#--------------------------------------------------------------------------
def set_spin(spin = false)
self.contents.clear
set_background
angle = spin ? @speed * @spin_count / 360 : 0
angle = @spin_right ? angle : -angle
for i in 0...item_max
n = (i - @index) * angle_size + angle
cx = @radius * Math.sin(n) + center_x
cy = - @radius * Math.cos(n) + center_y
draw_spin_graphic(i, cx, cy)
end
set_text
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
update_cursor
if @spin_count > 0
@spin_count -= 1
set_spin(@spin_count >= 1)
return
end
update_command
end
#--------------------------------------------------------------------------
# ● コマンドの移動可能判定
#--------------------------------------------------------------------------
def command_movable?
return false if @spin_count > 0
return false if (not visible or not active)
return false if (index < 0 or index > item_max or item_max == 0)
return false if (@opening or @closing)
return true
end
#--------------------------------------------------------------------------
# ● コマンドを右に移動
#--------------------------------------------------------------------------
def command_right
@index = (@index + 1) % item_max
@spin_right = true
set_spin_count
end
#--------------------------------------------------------------------------
# ● コマンドを左に移動
#--------------------------------------------------------------------------
def command_left
@index = (@index - 1 + item_max) % item_max
@spin_right = false
set_spin_count
end
#--------------------------------------------------------------------------
# ● コマンド選択の更新
#--------------------------------------------------------------------------
def update_command
if command_movable?
if Input.press?(Input::RIGHT)
Sound.play_cursor
ZiiN7.turn_normal? ? command_right : command_left
end
if Input.press?(Input::LEFT)
Sound.play_cursor
ZiiN7.turn_normal? ? command_left : command_right
end
end
call_update_help
end
#--------------------------------------------------------------------------
# ● カーソルの更新
#--------------------------------------------------------------------------
def update_cursor
if @index < 0
self.cursor_rect.empty
else
rect = Rect.new(0, 0, 24, 24)
rect.x = center_x - rect.width / 2
rect.y = center_y - rect.height / 2 - @radius
self.cursor_rect = rect
end
end
#--------------------------------------------------------------------------
# ● ヘルプウィンドウの設定
# help_window : 新しいヘルプウィンドウ
#--------------------------------------------------------------------------
def help_window=(help_window)
@help_window = help_window
call_update_help
end
#--------------------------------------------------------------------------
# ● ヘルプウィンドウ更新メソッドの呼び出し
#--------------------------------------------------------------------------
def call_update_help
if self.active and @help_window != nil
update_help
end
end
#--------------------------------------------------------------------------
# ● ヘルプウィンドウの更新 (内容は継承先で定義する)
#--------------------------------------------------------------------------
def update_help
end
end
#******************************************************************************
# ★ 本作成
#******************************************************************************
#==============================================================================
# ■ Window_ActorCommand
#==============================================================================
class Window_ActorCommand < Window_SpinCommand
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
set = []
set.push([Vocab::attack, "icon", ZiiN7::ATTACK, true])
set.push([Vocab::skill, "icon", ZiiN7::SKILL, true])
set.push([Vocab::guard, "icon", ZiiN7::GUARD, true])
set.push([Vocab::item, "icon", ZiiN7::ITEM, true])
super(64, 64, set, {"R"=>40, "S"=>52, "L"=>-12, "G"=>"Spin40"})
self.active = false
set_spin
end
#--------------------------------------------------------------------------
# ● セットアップ
# actor : アクター
#--------------------------------------------------------------------------
def setup(actor)
@commands[0][2] = ZiiN7::ATTACK
@commands[1][0] = Vocab::skill
@commands[0][3] = ZiiN7::GUARD
if actor.weapons[0] != nil
n = actor.weapons[0].icon_index
@commands[0][2] = n if n > 0
end
if actor.armor1[0] != nil
n = actor.armor1[0].icon_index
@commands[0][3] = n if n > 0
end
@commands[1][0] = actor.class.skill_name if actor.class.skill_name_valid
self.index = 0
set_spin
end
end
#==============================================================================
# ■ Window_BattleStatus
#==============================================================================
class Window_BattleStatus
#--------------------------------------------------------------------------
# ● オブジェクト初期化 改
#--------------------------------------------------------------------------
def initialize
super(128, 0, 416, 128)
@column_max = 4
refresh
self.active = false
self.opacity = 0
end
#--------------------------------------------------------------------------
# ● 項目の描画 改
#--------------------------------------------------------------------------
def draw_item(index)
x = index * 96
rect = Rect.new(x, 0, 96, 96)
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
actor = $game_party.members[index]
draw_actor_face(actor, x + 2, 2, 92)
draw_actor_state(actor, x + 72, WLH * 3)
self.contents.font.color = hp_color(actor)
size = 14
self.contents.font.size = size
self.contents.draw_text(x, WLH * 1 + 20 - size, 80, WLH, actor.name)
self.contents.font.size = 20
draw_actor_hp(actor, x, WLH * 2, 80)
draw_actor_mp(actor, x, WLH * 3, 70)
end
#--------------------------------------------------------------------------
# ● カーソルの更新
#--------------------------------------------------------------------------
def update_cursor
self.cursor_rect.empty
end
end
#******************************************************************************
# ★ アクティブタイム改造部
#******************************************************************************
#==============================================================================
# ■ Scene_Battle
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# ★ コマンド更新 ※再定義
#--------------------------------------------------------------------------
def update_actor_command_selection
# コマンド入力できる状態でなくなればキャンセル
return reset_command unless commanding?
if Input.trigger?(Input::B)
Input.update
Sound.play_decision
start_party_command
elsif Input.trigger?(Input::C)
Input.update
case @actor_command_window.index
when 0 # 攻撃
Sound.play_decision
@commander.action.set_attack
start_target_enemy_selection
when 1 # スキル
Sound.play_decision
$in_select = true
start_skill_selection
when 2 # 防御
Sound.play_decision
@commander.action.set_guard
end_command
when 3 # アイテム
Sound.play_decision
$in_select = true
start_item_selection
end
# シフトキーでコマンドキャラ送り ************************************
elsif Input.trigger?(ZiiN7::SWITCH_COMMAND_BUTTON)
next_commander
#********************************************************************
end
end
end
Kyle?- Platinum Cookiez
- Posts : 500
Gald : 418
Stats
Cookies: 5
Re: Ziifee's Spin Command editing
Are you sure that is the 100% original script? Anyway, there is no method called armor1 for Actors. There is one called .armor1_id which returns the id of the shield item. From there you can get the icon by using $data_armors which is an array of all armors and find the shield by using the obtained ID number...
But still, I get an error about an undefined method '.commanding?' for Scene_Battle even though this error is fixed...
- Code:
if actor.armor1_id != nil
n = $data_armors[actor.armor1_id].icon_index
@commands[0][3] = n if n > 0
end
But still, I get an error about an undefined method '.commanding?' for Scene_Battle even though this error is fixed...
Re: Ziifee's Spin Command editing
Thanks but still not working...
Stays the same as defualt...
Stays the same as defualt...
Kyle?- Platinum Cookiez
- Posts : 500
Gald : 418
Stats
Cookies: 5
Re: Ziifee's Spin Command editing
Is that the 100% original script? Do you have a link or something? I was working blind
Re: Ziifee's Spin Command editing
Ok I'll give th orginal script that one was slightly edited i think..
- Code:
=begin ========================================================================
* ziifee's Spin Command for RPG Tankentai Sideview Battle System
By ziifee ( http://neomemo.web.fc2.com/ )
<SBS Only>
-This script is only for the Tankentai SBS WITHOUT the ATB installed.
<Image Required>
Spin40 : Spin40.png is required in the Graphics/System folder.
=end # ========================================================================
#==============================================================================
# ■ Ziifee
#==============================================================================
module Zii
# ▼ Spin Command/Icon Index Number
FIGHT = 132 # Fight
ESCAPE = 143 # Escape
ATTACK = 1 # Attack (Default)
GUARD = 52 # Guard
SKILL = 128 # Skill
ITEM = 144 # Item
# ▼ Spin Command/Direction of Rotation ( "normal" or "reverse" )
# Determines how Spin Command rotates according to left/right key press.
TURN = "normal"
# ▼ Face Graphics (true: Use battle face graphic / false: don't use faces)
STATUS_FACE = true
# ▼ Actor Names (true: Show actor names / false: Don't show )
STATUS_LINE = true
# ▼ Actor Name Text Size ( VX default size: 20 )
LINE_SIZE = 14
#--------------------------------------------------------------------------
# ● 通常回転 の判定
#--------------------------------------------------------------------------
def self.turn_normal?
return false if TURN == "reverse"
return true if TURN == "normal"
return true
end
#--------------------------------------------------------------------------
# ● バトルオプション [顔グラフィック] の判定
#--------------------------------------------------------------------------
def self.battle_face?
return true if STATUS_FACE
return false
end
#--------------------------------------------------------------------------
# ● バトルステートオプション [名前] の判定
#--------------------------------------------------------------------------
def self.line_name?
return true if STATUS_LINE
return false
end
end
# ▼ ステータス表示
#==============================================================================
# ■ Window_BattleStatus
#==============================================================================
class Window_BattleStatus
#--------------------------------------------------------------------------
# ● オブジェクト初期化 改
#--------------------------------------------------------------------------
def initialize
super(0, 0, 416, 128)
@column_max = 4
refresh
self.active = false
self.opacity = 0
end
#--------------------------------------------------------------------------
# ● 項目の描画 改
#--------------------------------------------------------------------------
def draw_item(index)
x = index * 96
rect = Rect.new(x, 0, 96, 96)
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
actor = $game_party.members[index]
draw_actor_face(actor, x + 2, 2, 92) if actor.hp > 0 and Zii.battle_face?
draw_actor_state(actor, x + 72, WLH * 3)
if Zii.line_name?
self.contents.font.color = hp_color(actor)
size = Zii::LINE_SIZE
self.contents.font.size = size
self.contents.draw_text(x, WLH * 1 + 20 - size, 80, WLH, actor.name)
self.contents.font.size = 20
end
draw_actor_hp(actor, x, WLH * 2, 80)
draw_actor_mp(actor, x, WLH * 3, 70)
end
#--------------------------------------------------------------------------
# ● カーソルの更新
#--------------------------------------------------------------------------
def update_cursor
if @index < 0 # カーソル位置が 0 未満の場合
self.cursor_rect.empty # カーソルを無効とする
else # カーソル位置が 0 以上の場合
rect = Rect.new(index * 96, 0, 96, 96)
self.cursor_rect = rect # カーソルの矩形を更新
end
end
end
# ▼ 回転コマンド
#==============================================================================
# ■ Window_SpinCommand
#------------------------------------------------------------------------------
# 回転用コマンド選択を行うウィンドウです。
#==============================================================================
class Window_SpinCommand < Window_Base
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :index # カーソル位置
attr_reader :help_window # ヘルプウィンドウ
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# cx / cy : 中心の X座標 / Y座標
# commands : コマンド配列 (内容 は [name, kind, pull, enabled?])
# setting : 設定ハッシュ ("R"=>半径 "S"=>速さ "G"=>背景 "L"=>文字)
#--------------------------------------------------------------------------
def initialize(cx, cy, commands, setting = {})
@radius = setting.has_key?("R") ? setting["R"] : 40 # 描画半径
@speed = setting.has_key?("S") ? setting["S"] : 36 # 回転速さ
@spin_back = setting.has_key?("G") ? setting["G"] : "" # 背景画像
@spin_line = setting.has_key?("L") ? setting["L"] : nil # 文字位置
x, y = cx - @radius - 28, cy - @radius - 28
width = height = @radius * 2 + 56
super(x, y, width, height)
self.opacity = 0
@index = 0
@commands = commands # コマンド
@spin_right = true
@spin_count = 0
update_cursor
end
#--------------------------------------------------------------------------
# ▽ スピン画像を描画する (描画内容 強化用)
# i : インデックス
# cx : 表示 中心位置 X座標
# cy : 表示 中心位置 Y座標
#--------------------------------------------------------------------------
def draw_spin_graphic(i, cx, cy)
case command_kind(i)
when "icon"
draw_icon(command_pull(i), cx - 12, cy - 12, command_enabled?(i))
end
end
#--------------------------------------------------------------------------
# ★ リフレッシュ バグ回避用
#--------------------------------------------------------------------------
def refresh
set_spin
end
#--------------------------------------------------------------------------
# ★ 項目の描画 バグ回避用
#--------------------------------------------------------------------------
def draw_item(index, enabled = true)
@commands[index][3] = enabled
set_spin
end
#--------------------------------------------------------------------------
# ● 現在のコマンド名を取得する
#--------------------------------------------------------------------------
def command_name(index = @index)
return "" if index < 0
name = @commands[index][0]
return name != nil ? name : ""
end
#--------------------------------------------------------------------------
# ● コマンドの種類を取得
#--------------------------------------------------------------------------
def command_kind(index)
result = @commands[index][1]
return result != nil ? result : ""
end
#--------------------------------------------------------------------------
# ● コマンドの引数 を取得
#--------------------------------------------------------------------------
def command_pull(index)
result = @commands[index][2]
return result != nil ? result : ""
end
#--------------------------------------------------------------------------
# ● コマンドの有効フラグを取得
#--------------------------------------------------------------------------
def command_enabled?(index)
result = @commands[index][3]
return result != nil ? result : true
end
#--------------------------------------------------------------------------
# ● 名前の位置に index を設定する
#--------------------------------------------------------------------------
def set_index(name)
n = -1
for i in 0...@commands.size
n = i if @commands[i][0] == name
end
@index = n if n >= 0
update_cursor
call_update_help
set_spin
end
#--------------------------------------------------------------------------
# ● カーソル位置の設定
# index : 新しいカーソル位置
#--------------------------------------------------------------------------
def index=(index)
@index = index
update_cursor
call_update_help
set_spin
end
#--------------------------------------------------------------------------
# ● 中心のX座標を取得
#--------------------------------------------------------------------------
def center_x
return contents.width / 2
end
#--------------------------------------------------------------------------
# ● 中心のY座標を取得
#--------------------------------------------------------------------------
def center_y
return contents.height / 2
end
#--------------------------------------------------------------------------
# ● 項目数の取得
#--------------------------------------------------------------------------
def item_max
return @commands.size
end
#--------------------------------------------------------------------------
# ● 背景の設定 (再定義 向き)
#--------------------------------------------------------------------------
def set_background
return if @spin_back == ""
bitmap = Cache.system(@spin_back)
rect = Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(12, 12, bitmap, rect)
end
#--------------------------------------------------------------------------
# ● 文章の設定 (再定義 向き)
#--------------------------------------------------------------------------
def set_text
return if @spin_line == nil
y = center_y - WLH / 2 + @spin_line
self.contents.draw_text(center_x - 48, y, 96, WLH, command_name, 1)
end
#--------------------------------------------------------------------------
# ● スピンアイコンの角度の差を取得する
#--------------------------------------------------------------------------
def angle_size
return (Math::PI * 2 / item_max)
end
#--------------------------------------------------------------------------
# ● スピンアイコン回転時のカウント を設定する
#--------------------------------------------------------------------------
def set_spin_count
@spin_count = angle_size * 360 / @speed
set_spin(true)
end
#--------------------------------------------------------------------------
# ● スピン設定 の実行
# spin : 回転フラグ (true の時回転中)
#--------------------------------------------------------------------------
def set_spin(spin = false)
self.contents.clear
set_background
angle = spin ? @speed * @spin_count / 360 : 0
angle = @spin_right ? angle : -angle
for i in 0...item_max
n = (i - @index) * angle_size + angle
cx = @radius * Math.sin(n) + center_x
cy = - @radius * Math.cos(n) + center_y
draw_spin_graphic(i, cx, cy)
end
set_text
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
update_cursor
if @spin_count > 0
@spin_count -= 1
set_spin(@spin_count >= 1)
return
end
update_command
end
#--------------------------------------------------------------------------
# ● コマンドの移動可能判定
#--------------------------------------------------------------------------
def command_movable?
return false if @spin_count > 0
return false if (not visible or not active)
return false if (index < 0 or index > item_max or item_max == 0)
return false if (@opening or @closing)
return true
end
#--------------------------------------------------------------------------
# ● コマンドを右に移動
#--------------------------------------------------------------------------
def command_right
@index = (@index + 1) % item_max
@spin_right = true
set_spin_count
end
#--------------------------------------------------------------------------
# ● コマンドを左に移動
#--------------------------------------------------------------------------
def command_left
@index = (@index - 1 + item_max) % item_max
@spin_right = false
set_spin_count
end
#--------------------------------------------------------------------------
# ● コマンド選択の更新
#--------------------------------------------------------------------------
def update_command
if command_movable?
if Input.press?(Input::RIGHT)
Sound.play_cursor
Zii.turn_normal? ? command_right : command_left
end
if Input.press?(Input::LEFT)
Sound.play_cursor
Zii.turn_normal? ? command_left : command_right
end
end
call_update_help
end
#--------------------------------------------------------------------------
# ● カーソルの更新
#--------------------------------------------------------------------------
def update_cursor
if @index < 0
self.cursor_rect.empty
else
rect = Rect.new(0, 0, 24, 24)
rect.x = center_x - rect.width / 2
rect.y = center_y - rect.height / 2 - @radius
self.cursor_rect = rect
end
end
#--------------------------------------------------------------------------
# ● ヘルプウィンドウの設定
# help_window : 新しいヘルプウィンドウ
#--------------------------------------------------------------------------
def help_window=(help_window)
@help_window = help_window
call_update_help
end
#--------------------------------------------------------------------------
# ● ヘルプウィンドウ更新メソッドの呼び出し
#--------------------------------------------------------------------------
def call_update_help
if self.active and @help_window != nil
update_help
end
end
#--------------------------------------------------------------------------
# ● ヘルプウィンドウの更新 (内容は継承先で定義する)
#--------------------------------------------------------------------------
def update_help
end
end
#==============================================================================
# ■ Window_PartyCommand
#==============================================================================
class Window_PartyCommand < Window_SpinCommand
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
s1 = [Vocab::fight, "icon", Zii::FIGHT, true]
s2 = [Vocab::escape, "icon", Zii::ESCAPE, $game_troop.can_escape]
setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12}
super(56, 64, [s1, s2], setting)
self.active = false
set_spin
end
end
#==============================================================================
# ■ Window_ActorCommand
#==============================================================================
class Window_ActorCommand < Window_SpinCommand
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
s1 = [Vocab::attack, "icon", Zii::ATTACK, true]
s2 = [Vocab::skill, "icon", Zii::SKILL, true]
s3 = [Vocab::guard, "icon", Zii::GUARD, true]
s4 = [Vocab::item, "icon", Zii::ITEM, true]
setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12}
super(0, 64, [s1, s2, s3, s4], setting)
self.active = false
set_spin
end
#--------------------------------------------------------------------------
# ● セットアップ
# actor : アクター
#--------------------------------------------------------------------------
def setup(actor)
@commands[0][2] = Zii::ATTACK
@commands[1][0] = Vocab::skill
if actor.weapons[0] != nil
n = actor.weapons[0].icon_index
@commands[0][2] = n if n > 0
end
@commands[1][0] = actor.class.skill_name if actor.class.skill_name_valid
self.index = 0
set_spin
end
end
Kyle?- Platinum Cookiez
- Posts : 500
Gald : 418
Stats
Cookies: 5
Re: Ziifee's Spin Command editing
Find this bit:
- Code:
def initialize
s1 = [Vocab::attack, "icon", Zii::ATTACK, true]
s2 = [Vocab::skill, "icon", Zii::SKILL, true]
s3 = [Vocab::guard, "icon", Zii::GUARD, true]
s4 = [Vocab::item, "icon", Zii::ITEM, true]
setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12}
super(0, 64, [s1, s2, s3, s4], setting)
self.active = false
set_spin
end
- Code:
if (not actor.two_swords_style) and (actor.armor1_id != 0)
s3 = [Vocab::guard, "icon", $data_armors[actor.armor1_id].icon_index, true]
else
s3 = [Vocab::guard, "icon", Zii::GUARD, true]
end
IMP1- Coding Moderator
- Posts : 503
Gald : 1399
Stats
Cookies: 5
OmegaDev :: Coding Plaza :: RGSS2 (VX) :: RGSS2 Support
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|