Okay so the issue I'm having is when you select an enemy (that isn't the first enemy) to look at its status, then try to scroll through the other enemies it won't scroll in the correct order. Plus when you try to go back to the main enemy page from the status window and your on the last enemy with a bunch of unknown enemies in between, it will go to another enemy instead of the one you just on. (ex. I was viewing enemy 32's status, then went back and it sent me to enemy 10 instead of showing me 32 on the main page.)
Hopefully that made sense, I can show a video in the morning, if that was to confusing. Whatever is going on with the scrolling is the last issue I'm having. The link to my script is below.
Link: Removed
Can't even get the test project to run. For starters, I don't have "Scene_Base".
:facepalm: Giant fail on my part.
http://pastebin.com/raw.php?i=xwSvMraQ
Which means it's either a VX script or a VX Ace script.
EDIT: Nevermind. Didn't realize you had your own Scene_Base.
def next_monster
refresh
@monster_window.monster = @enemy_list[@enemy_index]
@monster_list_window.select(@enemy_index)
@command_window.activate
end
It's this part.
@enemy_index is not being used properly. I threw a
print @enemy_index in this to see what was going on.
Firstly, when you select a monster to view its in-depth bio, you should change @enemy_index to equal this monster's index.
Secondly, this
@monster_list_window.select(@enemy_index)
is the reason why you keep saying it doesn't go to the correct monster in the list (
but it actually does).
When I exit out of the monster's bio when @enemy_index = 5, it puts my cursor on the list to the SIXTH item in the list, which makes sense since arrays go 0,1,2,3,4,
5 (hence, sixth position). It's pretty unconventional when trying to work with two arrays going like this
a1 = [1,2,5,8,15]
a2 = [nil, 1, 2, nil, nil, 5, nil, nil, 8, nil, nil, nil, nil, nil, nil, 15]
EDIT:
Make these changes:
def next_monster
refresh
@monster_window.monster = @enemy_list[@enemy_index]
@monster_list_window.select($data_enemies.index(@enemy_list[@enemy_index])-1) ### Changed ###
@command_window.activate
end
def open_list
if !@monster.nil?
$game_system.se_play($data_system.decision_se)
@monster_list_window.deactivate.hide
@monster_info_window.hide; @controls.hide
@header.hide; @spirit_window.hide; @enemy_select.hide
@monster_window.show
@monster_window.monster = @monster
@enemy_index = @enemy_list.index(@monster) ### Added ###
@command_window.activate.show
else $game_system.se_play($data_system.buzzer_se)
end
end
Sweet :haha: thank you so much for helping with that issue, it's been giving me a headace the whole day. I guess I'll submit my codes to night.