[RESOLVED][RGSS] Last Issue I have

Started by bigace, December 17, 2012, 12:33:26 am

Previous topic - Next topic

bigace

December 17, 2012, 12:33:26 am Last Edit: December 17, 2012, 10:26:45 am by bigace
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


Use Dropbox to upload your files. Much simpler than other upload sites, you can simply place a folder on your desktop that will sync with your DropBox account.

KK20

Can't even get the test project to run. For starters, I don't have "Scene_Base".

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

bigace



Use Dropbox to upload your files. Much simpler than other upload sites, you can simply place a folder on your desktop that will sync with your DropBox account.

G_G

Which means it's either a VX script or a VX Ace script.

EDIT: Nevermind. Didn't realize you had your own Scene_Base.

KK20

December 17, 2012, 01:39:40 am #4 Last Edit: December 17, 2012, 02:45:57 am by KK20
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:
Spoiler: ShowHide

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

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

bigace

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.


Use Dropbox to upload your files. Much simpler than other upload sites, you can simply place a folder on your desktop that will sync with your DropBox account.