changing the the picture when changing symbols

AgentN107

Bringer of laughter
Member
Joined
Aug 21, 2018
Messages
24
Reaction score
3
First Language
English
Primarily Uses
RMVXA
I have been trying to figure this out how to do this I see it in other scripts and I think I have the pieces but can't put them in place
so when you change the selection in a command window it changes it
what I want is at 0:36
this is my coding
class Window_Notes < Window_Command
def initialize
super(154,50 )
window_width
window_height
end

def make_command_list
main
end

def window_width
return 90
end

def window_height
return line_height + 360
end



def main
if $game_system.startcurrent == true
else $game_system.current = [0]
$game_system.startcurrent = true
end
if CustomData.get("note1") == true
add_command("Note 1", :note1)
else
add_command("Note 1", :dis, disabled)
end

if CustomData.get("note6") == true
add_command("Note 6", :note6)
else
add_command("Note 6", :dis, disabled)
end

if CustomData.get("note11") == true
add_command("Note 11", :note11)
else
add_command("Note 11", :dis, disabled)
end
end

def disabled
$game_variables[100] !=0
end
end

class Scene_Notes < Scene_MenuBase
def start()
super
create_command_window
create_controlled
end

#-----------------------------------------------------------------------------
# * Creating controlled elements
#-----------------------------------------------------------------------------
def create_controlled
image
$game_variables[8] = [1]
@TextWindow = Notes.new
end
#-----------------------------------------------------------------------------
# * Chacter Icon
#-----------------------------------------------------------------------------
def image
@sprite = Sprite.new
@sprite.bitmap = Cache.picture("Notes_Base")
#-----------------------------------------------------------------------------
# * image pos
#-----------------------------------------------------------------------------
@sprite.x=125
@sprite.y=40
@sprite.opacity=255
end

def create_command_window
@list_window = Window_Notes.new
@TextWindow = Notes.new(@list_window.current_symbol)
@list_window.set_handler:)cancel, method:)return_title))
end


def note_1
$game_system.current = [0]
$game_variables[8] = [1]
@TextWindow = Notes.new
SceneManager.call(Scene_Notes)
end

def note_6
$game_system.current = [1]
$game_variables[8] = [6]
SceneManager.call(Scene_Notes)
end

def note_11
$game_system.current = [2]
$game_variables[8] = [11]
SceneManager.call(Scene_Notes)
end

def return_title
SceneManager.call(Scene_Title2)
@sprite.bitmap.dispose
@sprite.dispose
end
end
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
You could hook it on the command window's select method and update the other window's contents depending on which index is selected..

You could probably take a look at how for example the Skill Window changes the text on the Help Window when you scroll around the different skills. Its the same idea, only difference is that its changing only text while you want to change text + image
 

AgentN107

Bringer of laughter
Member
Joined
Aug 21, 2018
Messages
24
Reaction score
3
First Language
English
Primarily Uses
RMVXA
You could hook it on the command window's select method and update the other window's contents depending on which index is selected..

You could probably take a look at how for example the Skill Window changes the text on the Help Window when you scroll around the different skills. Its the same idea, only difference is that its changing only text while you want to change text + image
so I looked into the skill window and someone else script that did the same thing with less of the fluff from the skill. the select method seems to be it looking at the scripts but I am stuck trying to make the def make_item_list work I am guessing I'm supposed to link a variable to it but I have no clue how or what variable I should use. I am also guessing it has something to do with the index you mentioned.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,882
Messages
1,017,230
Members
137,607
Latest member
Maddo
Top