Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.

Share | 
 

 [ask]Target Name position dimane ye?

Topik sebelumnya Topik selanjutnya Go down 
[ask]Target Name position dimane ye? Empty2012-05-24, 11:53
Post[ask]Target Name position dimane ye?
#1
hyperkudit 
Pahlawan Super
hyperkudit

Level 5
Posts : 2288
Thanked : 30
Engine : RMXP
Skill : Very Beginner
Type : Artist
Awards:

[ask]Target Name position dimane ye? Vide
gwa ada permasalahan nih..

dulu sempet request patch sama wltr buat ngatur posisi skill/item information.
dan hasilnya sesuai harapan, tapi ada masalah baru nongol :lol:

ini rombakan help update script Window_Skill yang gwa comot dari patch e wltr
di line 78 lah :v
Code:

  def update_help
    @help_window.set_text(self.skill == nil ? "" : self.skill.description)
    @help_window.x = 110;
    @help_window.y = 315;
  end

dan hasilnya begono :
Spoiler:

oke sesuai harapan, tapi pas mo pilih target jadi :
Spoiler:

:FU:

nah pertanyaan gwa, itu cara ngubah posisi nama target biar tetep di atas, tapi informasi skill dan item tetep di bawah gimana ye?
gak nemu2 sesuatu yang mencurigakan neh gwa :lol:

tq yang udah mau bantu sebelumnya :sembah:
[ask]Target Name position dimane ye? Empty2012-05-24, 12:05
PostRe: [ask]Target Name position dimane ye?
#2
Lukas 
Senior
Senior
avatar

Level 5
Posts : 618
Thanked : 22

[ask]Target Name position dimane ye? Vide
karna aku ga tau scriptnya, :ngacay2:
cara mudahnya tinggal kembaliin aja koordinat seperti semula.
if @target_window.active
@help_window.x = 'sekian'
@help_window.y = 'sekian'
end

sorry klo salah. :ngacay2:
[ask]Target Name position dimane ye? Empty2012-05-24, 12:19
PostRe: [ask]Target Name position dimane ye?
#3
hyperkudit 
Pahlawan Super
hyperkudit

Level 5
Posts : 2288
Thanked : 30
Engine : RMXP
Skill : Very Beginner
Type : Artist
Awards:

[ask]Target Name position dimane ye? Vide
@om lukas : itu scriptnya ada di script default RMXP..
di Window_Skill.

btw cara itu gk bisa.. soale method "active" gk teridentifikasi :hammer

ini window_skill lengkap e
Code:

#==============================================================================
# ** Window_Skill
#------------------------------------------------------------------------------
#  This window displays usable skills on the skill and battle screens.
#==============================================================================

class Window_Skill < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #    actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 128, 640, 352)
    @actor = actor
    @column_max = 2
    refresh
    self.index = 0
    # If in battle, move window to center of screen
    # and make it semi-transparent
    if $game_temp.in_battle
      self.y = 64
      self.height = 256
      self.back_opacity = 160
    end
  end
  #--------------------------------------------------------------------------
  # * Acquiring Skill
  #--------------------------------------------------------------------------
  def skill
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 0...@actor.skills.size
      skill = $data_skills[@actor.skills[i]]
      if skill != nil
        @data.push(skill)
      end
    end
    # If item count is not 0, make a bit map and draw all items
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #    index : item number
  #--------------------------------------------------------------------------
  def draw_item(index)
    skill = @data[index]
    if @actor.skill_can_use?(skill.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(skill.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
    self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # * Help Text Update
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.skill == nil ? "" : self.skill.description)
    @help_window.x = 110;
    @help_window.y = 315;
  end
end

[ask]Target Name position dimane ye? Empty2012-05-24, 12:33
PostRe: [ask]Target Name position dimane ye?
#4
Lukas 
Senior
Senior
avatar

Level 5
Posts : 618
Thanked : 22

[ask]Target Name position dimane ye? Vide
maap salah,
cari di window help.
Quote :
def set_enemy(enemy)
self.x = 'X'
self.y = 'Y'
text = enemy.name
state_text = make_battler_state_text(enemy, 112, false)
if state_text != ''
text += ' ' + state_text
end
set_text(text, 1)
end

-----------------------------------------
cara 2
di scene battle :
taruh
@help_window.x = 100
@help_window.y = 100
di bawah
def update_phase3_enemy_select

-----------------------------------------------------------------

def update_phase3_enemy_select
@help_window.x = 100
@help_window.y = 100


--------------------------------------------------------------
cara 3
replace script Arrow_Enemy :
Code:
#==============================================================================
# ** Arrow_Enemy
#------------------------------------------------------------------------------
#  This arrow cursor is used to choose enemies. This class inherits from the
#  Arrow_Base class.
#==============================================================================

class Arrow_Enemy < Arrow_Base
  #--------------------------------------------------------------------------
  # * Get Enemy Indicated by Cursor
  #--------------------------------------------------------------------------
  def enemy
    return $game_troop.enemies[@index]
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    # Skip if indicating a nonexistant enemy
    $game_troop.enemies.size.times {
      break if self.enemy.exist?
      @index = (@index + 1) % $game_troop.enemies.size
    }
    # Cursor right
    if Input.repeat?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      $game_troop.enemies.size.times {
        @index = (@index + 1) % $game_troop.enemies.size
        break if self.enemy.exist?
      }
    end
    # Cursor left
    if Input.repeat?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      $game_troop.enemies.size.times {
        @index += $game_troop.enemies.size - 1
        @index %= $game_troop.enemies.size
        break if self.enemy.exist?
      }
    end
    # Set sprite coordinates
    if self.enemy != nil
      self.x = self.enemy.screen_x
      self.y = self.enemy.screen_y
    end
  end
  #--------------------------------------------------------------------------
  # * Help Text Update
  #--------------------------------------------------------------------------
  def update_help
    # Display enemy name and state in the help window
    @help_window.set_enemy(self.enemy)
    @help_window.x =
    @help_window.y =
  end
end

isi x dan y nya.


Terakhir diubah oleh Lukas tanggal 2012-05-24, 12:56, total 1 kali diubah
[ask]Target Name position dimane ye? Empty2012-05-24, 12:55
PostRe: [ask]Target Name position dimane ye?
#5
hyperkudit 
Pahlawan Super
hyperkudit

Level 5
Posts : 2288
Thanked : 30
Engine : RMXP
Skill : Very Beginner
Type : Artist
Awards:

[ask]Target Name position dimane ye? Vide
hooo... udah bisa :D

tq om, cendoled...
silahkan yang berkuasa boleh lock this thread
[ask]Target Name position dimane ye? Empty
PostRe: [ask]Target Name position dimane ye?
#6
Sponsored content 




[ask]Target Name position dimane ye? Vide
 

[ask]Target Name position dimane ye?

Topik sebelumnya Topik selanjutnya Kembali Ke Atas 

Similar topics

+
Halaman 1 dari 1

Permissions in this forum:Anda tidak dapat menjawab topik
RPGMakerID :: Scripts & Event Systems :: RMXP Scripts :: RGSS Support-