Alright guys.
You said to be specific so how much more specific can I get?
I followed this custom window tutorial exactly as it told me to http://www.rpgrevolution.com/tutorial/creating-a-custom-window_23.html
This is the detailed explanation of my issue.
Here is a screen shot of the error message.
It loads, it goes to the game environment. As soon as I speak with the sprite and activate the script event, it crashes. Apparently either I did something wrong or the person who wrote this tutorial to begin with forgot to define a method...
It kinda sucks when your trying to learn something and those who write tutorials don't create
executable examples. Any help is appreciated. ^^ I'm just trying to learn.
You said to be specific so how much more specific can I get?
I followed this custom window tutorial exactly as it told me to http://www.rpgrevolution.com/tutorial/creating-a-custom-window_23.html
This is the detailed explanation of my issue.
I created a new class above name.
Contains this code:
At the beggining of the Scene_Map class I added this line underneath the class definition command:
Underneath line 15 in Scene_Map which contains this command " @message_window = Window_Message.new"
I added this code:
Then I changed the update method of Scene_Map to this, just as it said in the tutorial::
And then I have an event that's action button triggered with a sprite (Doesn't matter which one)
and I use the script command. The following code is in the script command:
Contains this code:
Code:
class Window_ItemGet < Window_Base
# ------------------------
attr_accessor :type # 3
attr_accessor :id
# ------------------------
def initialize(type, id)
super(220, 180, 220, 96) # 1
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 255
self.contents.font.name = "Arial"
self.contents.font.size = 18
@type = type
@id = id
refresh # 2
end
# ------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 180, 32, "Acquired")
if @type == 1
self.draw_item_name($data_items[@id], 4, 32)
end
if @type == 2
self.draw_item_name($data_weapons[@id], 4, 32)
end
if @type == 3
self.draw_item_name($data_armors[@id], 4, 32)
end
end
Â
Â
# ------------------------
Â
Â
Â
def update
super
end
end
At the beggining of the Scene_Map class I added this line underneath the class definition command:
Code:
attr_accessor :item_acquired # 5
Â
Underneath line 15 in Scene_Map which contains this command " @message_window = Window_Message.new"
I added this code:
Code:
@acquire_window = Window_ItemGet.new(1, 0) # 1
  @acquire_window.visible = false # 2
  @itemdelay = -1 # 3
  @item_acquired = [0, 0] # 4
Then I changed the update method of Scene_Map to this, just as it said in the tutorial::
Code:
def update
  # Loop
  loop do
   # Update map, interpreter, and player order
   # (this update order is important for when conditions are fulfilled
   # to run any event, and the player isn't provided the opportunity to
   # move in an instant)
   $game_map.update
   $game_system.map_interpreter.update
   $game_player.update
   # Update system (timer), screen
   $game_system.update
   $game_screen.update
   # Abort loop if player isn't place moving
   unless $game_temp.player_transferring
    break
   end
   # Run place move
   transfer_player
   # Abort loop if transition processing
   if $game_temp.transition_processing
  Â
    break
   end
  end
 Â
  @spriteset.update #This is the added part
if @itemdelay > 0
@itemdelay -= 1 # 2
end
if @itemdelay == 0 # 3
@itemdelay = -1
@acquire_window.visible = false
@item_acquired[0] = 0
@item_acquired[1] = 0 #This is the end of the added part. It continues with the default code for Scene_map
#Nothing was deleted. Only pasted in underneath the above code.
end
And then I have an event that's action button triggered with a sprite (Doesn't matter which one)
and I use the script command. The following code is in the script command:
Code:
Â
$scene.item_aquired[0]=2
$scene.item_aquired[1]=1
Â
Here is a screen shot of the error message.
It loads, it goes to the game environment. As soon as I speak with the sprite and activate the script event, it crashes. Apparently either I did something wrong or the person who wrote this tutorial to begin with forgot to define a method...
It kinda sucks when your trying to learn something and those who write tutorials don't create
executable examples. Any help is appreciated. ^^ I'm just trying to learn.