Jump to content
Rpg²S Forum
  • 0

Cursore... DOVE TI POSIZIONI?


Dragonskiller
 Share

Question

Salve a tutti. Vorrei chiedervi un aiuto a proposito di una cosuccia che mi accade durante le battaglie...

 

Dunque, io ho installato il BS Laterale (v. 3.4) con ATB (v. 1.2) e, giustamente, siccome vorrei rendere il mio gioco "user-friendly" (fatemi passare il termine, va'... :rovatfl: ), ho inserito anche lo script KGC Cursor Animation per rendere l'azione abbastanza intuibile come in questo esempio qua:

 

http://www.mediafire.com/i/?elovvqxwnoxmnou

 

La cosa funziona perfettamente senza intoppi o errori che fanno saltare il gioco, tuttavia mi succede questo:

 

http://www.mediafire.com/i/?9xdi02bpn8ct946

 

In sostanza, il cursore resta fermo lì finché non sopraggiunge il turno dei membri del party e continua a rimanere finché non si ritorna alla schermata esplorativa.

 

Ora la domanda è questa: qualcuno sa come aiutarmi a correggere questo leggerissimo problema? So che è una sciocchezza, ma per me è un casino, poiché ho paura di intaccare qualcosa in modo pesante e di dover reinstallare lo script da zero...

 

Grazie per il disturbo. :sisi:

 

P.S. Ho controllato anche in diversi forum inglesi, però l'unico topic che descrivesse la medesima situazione è rimasto senza risposte... Spero che possiate aiutarmi! :rovatfl:

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
Potresti postare lo script KGC Cursor Animation di cui parli ?

 


SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]


Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !!

 


http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gif


Non riesco a smettere di essere affascinato da immagini come questa . . .

http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpg


Alcuni wallpapers che faccio ruotare sul mio vecchio PC . . .


http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpg

http://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpg
http://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpg
http://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg


La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . .


BBCode Testing


Typeface & Size



Link to comment
Share on other sites

  • 0

Oh mio Dio, scusatemi tanto!!! :rovatfl:

 

#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/    ◆         Animated Menu Cursor - KGC_CursorAnimation        ◆ VX ◆
#_/    ◇                  Last Update: 2008/04/01                       ◇
#_/    ◆               Translation by Mr. Anonymous                     ◆
#_/-----------------------------------------------------------------------------
#_/  Installation: Insert this script above main.
#_/=============================================================================
#_/  This script allows you to display an animated cursor on selectable menu
#_/   items.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_

#==============================================================================#
#                            ★ Customization ★                                 #
#==============================================================================#

module KGC
module CursorAnimation
 #                          ◆ Cursor Switch ◆
 #  You may specify the in-game switch that enables/disables the cursor.
 SWITCH_ID = 20
 #                      ◆ Cursor Start Display ◆
 #  true  : Cursor is persistant (from the title screen onwards)
 #  false : Cursor is only displayed when a switch is turned on (SWITCH_ID)
 DEFAULT_ANIMATION = true

 #                   ◆ Cursor Animation Image File ◆
 #  This defines the cursor file located in "Graphics/System".
 ANIMATION_FILE = "AnimationCursor"
 #                   ◆ Cursor Animation Frame Count ◆
 #  This defines the amount of cells the animation uses from the cursor file.
 FRAME_COUNT    = 8
 #                    ◆ Cursor Animation Wait Time ◆
 #  This defines the amount of frames between switching animation cells.
 #   Larger number = slower animation
 #   Smaller number = faster animation
 ANIMATION_WAIT = 3

 #                         ◆ Cursor Opacity ◆
 #  Opacity/Translucency (Max = 255)
 OPACITY       = 255
 #                    ◆ Cursor Animation Blending ◆
 #  Blending Type
 #   0. Normal  1. Add  2. Subtract
 BLEND_TYPE    = 1
 #                  ◆ Base Cursor Selection Position ◆
 #  0..On  1..Center  2..Under
 BASE_POSITION = 1
 #                     ◆ Cursor Alightment [x, y] ◆
 #  This defines the position of the cursor.
 POSITION_REV  = [ 0, 16]
end
end

#------------------------------------------------------------------------------#

$imported = {} if $imported == nil
$imported["CursorAnimation"] = true

#==============================================================================
# ■ Window_Base
#==============================================================================

class Window_Base < Window
 #--------------------------------------------------------------------------
 # ○ クラス変数
 #--------------------------------------------------------------------------
 @@__cursor_animation = nil  # カーソルアニメ
 #--------------------------------------------------------------------------
 # ● オブジェクト初期化
 #     x       : ウィンドウの X 座標
 #     y       : ウィンドウの Y 座標
 #     width   : ウィンドウの幅
 #     height  : ウィンドウの高さ
 #--------------------------------------------------------------------------
 alias initialize_KGC_CursorAnimation initialize
 def initialize(x, y, width, height)
   initialize_KGC_CursorAnimation(x, y, width, height)

   @@__cursor_animation.add_window(self)
 end
 #--------------------------------------------------------------------------
 # ● 解放
 #--------------------------------------------------------------------------
 alias dispose_KGC_CursorAnimation dispose unless $@
 def dispose
   @@__cursor_animation.remove_window(self)

   dispose_KGC_CursorAnimation
 end
 #--------------------------------------------------------------------------
 # ○ カーソルアニメを表示
 #--------------------------------------------------------------------------
 def self.show_cursor_animation
   @@__cursor_animation.visible = true
   @@__cursor_animation.update
 end
 #--------------------------------------------------------------------------
 # ○ カーソルアニメを隠す
 #--------------------------------------------------------------------------
 def self.hide_cursor_animation
   @@__cursor_animation.visible = false
   @@__cursor_animation.update
 end
 #--------------------------------------------------------------------------
 # ○ カーソルアニメを更新
 #--------------------------------------------------------------------------
 def self.update_cursor_animation
   @@__cursor_animation.update
 end
end

#==================================End Class===================================#

#==============================================================================
# □ Sprite_CursorAnimation
#------------------------------------------------------------------------------
#  カーソルアニメーション用の処理を追加したスプライトのクラスです。
#==============================================================================

class Sprite_CursorAnimation < Sprite
 #--------------------------------------------------------------------------
 # ● オブジェクト初期化
 #     viewport : ビューポート
 #--------------------------------------------------------------------------
 def initialize(viewport = nil)
   super(viewport)
   @duration = 0
   @frame_count = 0
   self.bitmap = Cache.system(KGC::CursorAnimation::ANIMATION_FILE)
   self.src_rect.width = bitmap.width / 8
   self.src_rect.height = bitmap.height /
     ([KGC::CursorAnimation::FRAME_COUNT - 1, 0].max / 8 + 1)
   self.ox = src_rect.width / 2
   self.oy = src_rect.height / 2
   self.opacity = KGC::CursorAnimation::OPACITY
   self.blend_type = KGC::CursorAnimation::BLEND_TYPE
 end
 #--------------------------------------------------------------------------
 # ● フレーム更新
 #--------------------------------------------------------------------------
 def update
   super
   return unless visible

   @frame_count += 1
   return if @frame_count % KGC::CursorAnimation::ANIMATION_WAIT != 0

   @frame_count = 0
   @duration -= 1
   if @duration < 0
     @duration = KGC::CursorAnimation::FRAME_COUNT - 1
   end
   update_animation
 end
 #--------------------------------------------------------------------------
 # ○ アニメーションを更新
 #--------------------------------------------------------------------------
 def update_animation
   self.src_rect.x = src_rect.width * (@duration % 8)
   self.src_rect.y = src_rect.height * (@duration / 8)
 end
end

#==================================End Class===================================#

#==============================================================================
# □ Cursor_Animation
#------------------------------------------------------------------------------
#  カーソル周りのアニメーションを扱うクラスです。
#==============================================================================

class Cursor_Animation
 #--------------------------------------------------------------------------
 # ○ 公開インスタンス変数
 #--------------------------------------------------------------------------
 attr_accessor :visible
 #--------------------------------------------------------------------------
 # ○ オブジェクト初期化
 #--------------------------------------------------------------------------
 def initialize
   @visible = false

   @viewport = Viewport.new(0, 0, 640, 480)
   @windows = []
   @target_sprite = Sprite_CursorAnimation.new(@viewport)
   @active_window = nil

   @viewport.visible = false
   @viewport.z = 10000
 end
 #--------------------------------------------------------------------------
 # ○ 破棄
 #--------------------------------------------------------------------------
 def dispose
   @target_sprite.dispose
   @viewport.dispose
 end
 #--------------------------------------------------------------------------
 # ○ ウィンドウ追加
 #--------------------------------------------------------------------------
 def add_window(*window)
   @windows |= window.find_all { |w|
     w.is_a?(Window_Selectable) || w.is_a?(Window_SaveFile)
   }
   @windows.flatten!
 end
 #--------------------------------------------------------------------------
 # ○ ウィンドウ削除
 #--------------------------------------------------------------------------
 def remove_window(*window)
   @windows -= window
 end
 #--------------------------------------------------------------------------
 # ○ フレーム更新
 #--------------------------------------------------------------------------
 def update
   @viewport.update
   @target_sprite.update

   # 座標調整
   dest_x, dest_y = get_cursor_pos
   if @target_sprite.x != dest_x
     if (dest_x - @target_sprite.x).abs < 4
       @target_sprite.x = dest_x
     else
       dist = (dest_x - @target_sprite.x) / 4
       dist = (dist > 0 ? [dist, 4].max : [dist, -4].min)
       @target_sprite.x += dist
     end
   end
   if @target_sprite.y != dest_y
     if (dest_y - @target_sprite.y).abs < 4
       @target_sprite.y = dest_y
     else
       dist = (dest_y - @target_sprite.y) / 4
       dist = (dist > 0 ? [dist, 4].max : [dist, -4].min)
       @target_sprite.y += dist
     end
   end
 end
 #--------------------------------------------------------------------------
 # ○ カーソル位置取得
 #    [x, y] の形で返す。
 #--------------------------------------------------------------------------
 def get_cursor_pos
   dx = 0
   dy = 0
   # アクティブウィンドウを取得
   unless window_active?(@active_window)
     @active_window = search_active_window
   end

   # アクティブウィンドウがなければ非表示
   if @active_window == nil || !$game_switches[KGC::CursorAnimation::SWITCH_ID]
     @viewport.visible = false
     dx = Graphics.width / 2
     dy = Graphics.height / 2
     return [dx, dy]
   end
   @viewport.visible = @visible

   # カーソル位置を計算
   rect = @active_window.cursor_rect
   dx = rect.x + 16 + KGC::CursorAnimation::POSITION_REV[0]
   dy = rect.y + 16 + KGC::CursorAnimation::POSITION_REV[1]
   vp = @active_window.viewport
   if vp != nil
     dx += vp.rect.x - vp.ox
     dy += vp.rect.y - vp.oy
   end
   dx += @active_window.x
   dy += @active_window.y
   case KGC::CursorAnimation::BASE_POSITION
   when 0  # 上
     dy += @target_sprite.oy
   when 1  # 中央
     dy += rect.height / 2
   when 2  # 下
     dy += rect.height - @target_sprite.oy
   end
   return [dx, dy]
 end
 #--------------------------------------------------------------------------
 # ○ ウィンドウのアクティブ状態判定
 #--------------------------------------------------------------------------
 def window_active?(window)
   return false if window == nil
   return false if window.disposed?

   if window.is_a?(Window_Selectable)
     return true if window.active
   elsif window.is_a?(Window_SaveFile)
     return true if window.selected
   end
   return false
 end
 #--------------------------------------------------------------------------
 # ○ アクティブウィンドウを探す
 #--------------------------------------------------------------------------
 def search_active_window
   return @windows.find { |w|
     if !w.visible
       false
     elsif w.is_a?(Window_Selectable)
       w.active && w.index >= 0
     elsif w.is_a?(Window_SaveFile)
       w.selected
     else
       false
     end
   }
 end
end

#==================================End Class===================================#

#==============================================================================
# ■ Scene_Base
#==============================================================================

class Scene_Base
 #--------------------------------------------------------------------------
 # ● 開始処理
 #--------------------------------------------------------------------------
 alias start_KGC_CursorAnimation start
 def start
   Window_Base.show_cursor_animation

   start_KGC_CursorAnimation
 end
 #--------------------------------------------------------------------------
 # ● 終了前処理
 #--------------------------------------------------------------------------
 alias pre_terminate_KGC_CursorAnimation pre_terminate
 def pre_terminate
   Window_Base.hide_cursor_animation

   pre_terminate_KGC_CursorAnimation
 end
 #--------------------------------------------------------------------------
 # ● フレーム更新
 #--------------------------------------------------------------------------
 alias update_KGC_CursorAnimation update
 def update
   update_KGC_CursorAnimation

   Window_Base.update_cursor_animation
 end
end

#==================================End Class===================================#

#==============================================================================
# ■ Scene_Title
#==============================================================================

if KGC::CursorAnimation::DEFAULT_ANIMATION

 class Scene_Title < Scene_Base
 #--------------------------------------------------------------------------
 # ● 各種ゲームオブジェクトの作成
 #--------------------------------------------------------------------------
   alias create_game_objects_KGC_CursorAnimation create_game_objects
   def create_game_objects
     create_game_objects_KGC_CursorAnimation

     $game_switches[KGC::CursorAnimation::SWITCH_ID] = true
   end
 end

end  # <-- if KGC::CursorAnimation::DEFAULT_ANIMATION

#==================================End Class===================================#

class Window_Base < Window
 @@__cursor_animation = Cursor_Animation.new
end

#==================================End Class===================================#

 

Perdonatemi di nuovo... Pensavo che fosse scontato, visto che appartiene alla libreria KGC... Che idiota che sono...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...