RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
S'more Window Help....and I'm going NUTS

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 88
Menu & Battle System Guru
Let me just start off by saying that, as of this moment, I have officially ended a very heartfelt relationship with the RMXP "Window"  >:(

*sigh*

Okay, I'm making a window (called ActorTurn) to display whose turn it is by using actor graphics that I've placed inside a window, in battle. I've configured all the needed coding (Window_Base, Window_ActorTurn, and Scene_Battle), but it keeps popping up with a undefined "actor.character_name" when I've used this same way of displaying things before. For the life of me, I cannot figure out wtf is going wrong! :-[

Heres the coding:

Window_Base
Code: [Select]
  def draw_turngraphic(actor, x, y)
    turngraphic = RPG::Cache.picture("BattleFaces/" + actor.character_name + "Turn")
    tgw = turngraphic.width
    tgh = turngraphic.height
    src_rect = Rect.new(0, 0, tgw, tgh)
    self.contents.blt(x - tgw / 2, y - tgh, turngraphic, src_rect)
  end

Window_ActorTurn
Code: [Select]
class Window_ActorTurn < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(-15, 300, 147, 62)
    self.opacity = 0
    self.contents = Bitmap.new(width-32, height-32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for actor in $game_party.actors
    actor = $game_party.actors
    draw_turngraphic(actor, 0, 30)
    end
  end
end

Scene_Battle (I've configured everything throughout like dispose, update, etc. that's not the problem; i'm getting the error just as I enter battle)
Code: [Select]
@actorturn_window = Window_ActorTurn.new



Thanks!

***
Rep:
Level 88
Menu & Battle System Guru
excuse the double.......

i've managed to get through without the error HOWEVER, something else is up now. By changing all of this:

Window_Base
Code: [Select]
  def draw_actor_turngraphic(actor, x, y)
    for actor in $game_party.actors
    turngraphic = RPG::Cache.picture("BattleFaces/" + actor.character_name + "Turn")
    tgw = turngraphic.width
    tgh = turngraphic.height
    src_rect = Rect.new(0, 0, tgw, tgh)
    self.contents.blt(x - tgw / 115, y - tgh, turngraphic, src_rect)
    end
  end

Window_ActorTurn
Code: [Select]
class Window_ActorTurn < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(-15, 310, 147, 62)
    self.opacity = 0
    self.contents = Bitmap.new(width-32, height-32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...$game_party.actors.size
    actor = $game_party.actors
    draw_actor_turngraphic(actor, 0, 30)
    #draw_actor_class(actor, 30, 34)
    end
  end
end

Scene_Battle
Code: [Select]
    for actor in $game_party.actors
    @actorturn_window = Window_ActorTurn.new(@actor_index)
    end


It now shows, but stacks, all of the ActorTurn graphics when I only want it to show one (the actor whose turn is currently up, according to his/her battle commands). Any ideas?

***
Rep:
Level 88
Menu & Battle System Guru
ahhhh, does anybody know what i mean? :-\

***
Rep:
Level 88
I personaly don't my appolagies I am not one to do well in "scripting" but I do know how to analize a script and figure out what it effects and does.
Project
New project. The other dimention DND
RPG makers challenge http://rmrk.net/index.php/topic,13503.0.html

***
Rep:
Level 88
Menu & Battle System Guru
hmmm, alright thanks anyway.