first,here is the script :
the problem is probably here
that is how the cursor should be working but for some reason if i go to item for example and then skill
the item cursor remains there and i get the skill cursor. how do i fix that.i am using the same method for cms and the cusor works fine there.
here is a demo if you don't get what i say
http://www.megaupload.com/?d=47S0027A
you will notice that the cursor 's older pic will disapear only after a while i want it to happen immediately
Please don't double post. ~ Atemu
#==============================================================================
# CrossCommand
#
# Blazingamer
# -----------------------------------------
# Makes a pretty command window in a shape of a cross like in Wild Arms
#==============================================================================
class CrossCommand < Window_Selectable
def initialize
super(320 - 128, 160 - 128, 256, 256)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
@commands = ["attack", "magic","defend","items","run away"]
@item_max = 5
self.active = false
self.visible = false
self.index = 0
end
def update_cursor_rect
if index == 0
self.cursor_rect.set(0, 0, 0, 0)
end
if Input.press?(Input::LEFT)
@index = 3
elsif Input.press?(Input::RIGHT)
@index = 2
elsif Input.press?(Input::UP)
@index = 1
elsif Input.press?(Input::DOWN)
@index = 4
else
@index = 0
@command1 = Sprite.new
@command1.bitmap = RPG::Cache.icon("cross")
@command1.y=148
@command1.x=238
end
end
end
class Scene_Battle
def update_phase3_basic_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
phase3_prior_actor
return
end
case @actor_command_window.index
when 0
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("bt")
@cursor.x = 180
@cursor.y = 171
when 1
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("abl")
@cursor.x = 245
@cursor.y = 100
when 2
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("def")
@cursor.y = 171
@cursor.x = 290
when 3
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("ex")
@cursor.y = 171
@cursor.x = 140
when 4
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("item")
@cursor.x = 245
@cursor.y = 196
end
if Input.trigger?(Input::C)
@cursor.dispose
case @actor_command_window.index
when 0
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
start_enemy_select
when 1
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 1
start_skill_select
when 2
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 1
phase3_next_actor
when 3
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 2
start_item_select
when 4
enemies_agi = 0
enemies_number = 0
for enemy in $game_troop.enemies
if enemy.exist?
enemies_agi += enemy.agi
enemies_number += 1
end
end
if enemies_number > 0
enemies_agi /= enemies_number
end
actors_agi = 0
actors_number = 0
for actor in $game_party.actors
if actor.exist?
actors_agi += actor.agi
actors_number += 1
end
end
if actors_number > 0
actors_agi /= actors_number
end
success = rand(100) < 50 * actors_agi / enemies_agi
if success
$game_system.se_play($data_system.escape_se)
$game_system.bgm_play($game_temp.map_bgm)
battle_end(1)
else
$game_party.clear_actions
start_phase4
end
end
return
end
end
end
# CrossCommand
#
# Blazingamer
# -----------------------------------------
# Makes a pretty command window in a shape of a cross like in Wild Arms
#==============================================================================
class CrossCommand < Window_Selectable
def initialize
super(320 - 128, 160 - 128, 256, 256)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
@commands = ["attack", "magic","defend","items","run away"]
@item_max = 5
self.active = false
self.visible = false
self.index = 0
end
def update_cursor_rect
if index == 0
self.cursor_rect.set(0, 0, 0, 0)
end
if Input.press?(Input::LEFT)
@index = 3
elsif Input.press?(Input::RIGHT)
@index = 2
elsif Input.press?(Input::UP)
@index = 1
elsif Input.press?(Input::DOWN)
@index = 4
else
@index = 0
@command1 = Sprite.new
@command1.bitmap = RPG::Cache.icon("cross")
@command1.y=148
@command1.x=238
end
end
end
class Scene_Battle
def update_phase3_basic_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
phase3_prior_actor
return
end
case @actor_command_window.index
when 0
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("bt")
@cursor.x = 180
@cursor.y = 171
when 1
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("abl")
@cursor.x = 245
@cursor.y = 100
when 2
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("def")
@cursor.y = 171
@cursor.x = 290
when 3
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("ex")
@cursor.y = 171
@cursor.x = 140
when 4
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("item")
@cursor.x = 245
@cursor.y = 196
end
if Input.trigger?(Input::C)
@cursor.dispose
case @actor_command_window.index
when 0
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
start_enemy_select
when 1
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 1
start_skill_select
when 2
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 1
phase3_next_actor
when 3
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 2
start_item_select
when 4
enemies_agi = 0
enemies_number = 0
for enemy in $game_troop.enemies
if enemy.exist?
enemies_agi += enemy.agi
enemies_number += 1
end
end
if enemies_number > 0
enemies_agi /= enemies_number
end
actors_agi = 0
actors_number = 0
for actor in $game_party.actors
if actor.exist?
actors_agi += actor.agi
actors_number += 1
end
end
if actors_number > 0
actors_agi /= actors_number
end
success = rand(100) < 50 * actors_agi / enemies_agi
if success
$game_system.se_play($data_system.escape_se)
$game_system.bgm_play($game_temp.map_bgm)
battle_end(1)
else
$game_party.clear_actions
start_phase4
end
end
return
end
end
end
the problem is probably here
case @actor_command_window.index
when 0
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("bt")
@cursor.x = 180
@cursor.y = 171
when 1
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("abl")
@cursor.x = 245
@cursor.y = 100
when 2
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("def")
@cursor.y = 171
@cursor.x = 290
when 3
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("ex")
@cursor.y = 171
@cursor.x = 140
when 4
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("item")
@cursor.x = 245
@cursor.y = 196
end
when 0
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("bt")
@cursor.x = 180
@cursor.y = 171
when 1
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("abl")
@cursor.x = 245
@cursor.y = 100
when 2
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("def")
@cursor.y = 171
@cursor.x = 290
when 3
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("ex")
@cursor.y = 171
@cursor.x = 140
when 4
@cursor= Sprite.new
@cursor.bitmap = RPG::Cache.icon("item")
@cursor.x = 245
@cursor.y = 196
end
that is how the cursor should be working but for some reason if i go to item for example and then skill
the item cursor remains there and i get the skill cursor. how do i fix that.i am using the same method for cms and the cusor works fine there.
here is a demo if you don't get what i say
http://www.megaupload.com/?d=47S0027A
you will notice that the cursor 's older pic will disapear only after a while i want it to happen immediately
Please don't double post. ~ Atemu