Thanks anyways Shaz, at least I know whats going on now.
Could you maybe explain how to Gsub it out for now then convert it to an integer?
I know about it just not that much. I've never had to use it.
I figured out the problem the variables actor_switch and class_switch are equal to everything
def remove_remaining_members face_choice = ($game_system.face_choice + 1) class_choice = $game_system.class_choice $game_party.members.each_index do |i| next if i == face_choice $game_party.remove_actor(i) $game_party.remove_actor($game_party.members.size) unless face_choice == $game_party.members.size end $game_party.members[0].change_class(class_choice, keep_exp = false) actor_switch = $data_actors[face_choice].note[/<Actor_Switch:\s*(\d*)>/].to_i #<----- actor_switch is equal to everything $game_switches[actor_switch] = true class_switch = $data_classes[class_choice].note[/<Class_Switch:\s*(\d*)>/].to_i#<----- class_switch is equal to everything $game_switches[class_switch] = true end
I used this with the back grounds and it works fine. could someone explain this to me?
I saw that this is how D&P3 called it in his tutorial but I am not sure if it is always the same.
def create_class_bg class_choice = $game_system.class_choice $data_classes[class_choice].note[/<Background:\s*(\S\w*\s*\w*\s*\w*\s*\w*\S)>/i] class_bg = $1 #<------ I don't know why but this is the variable it produced. Does it always produce the same one @class_bg = Sprite.new @class_bg.bitmap = Cache.picture(class_bg.to_s) @class_bg.x = 0 @class_bg.y = 0 @class_bg.z = 1 @class_bg.zoom_x = (Graphics.width / 544) @class_bg.zoom_y = (Graphics.height / 416) end
I tried using but it returns an error saying can't convert to string to integer
def remove_remaining_members face_choice = ($game_system.face_choice + 1) class_choice = $game_system.class_choice $game_party.members.each_index do |i| next if i == face_choice $game_party.remove_actor(i) $game_party.remove_actor($game_party.members.size) unless face_choice == $game_party.members.size end $game_party.members[0].change_class(class_choice, keep_exp = false) $data_actors[face_choice].note[/<Actor_Switch:\s*(\d*)>/] actor_switch = $1 $game_switches[actor_switch] = true $data_classes[class_choice].note[/<Class_Switch:\s*(\d*)>/] class_switch = $1 $game_switches[class_switch] = true endI figured it out again lol. it works fine.
here is the working def. whenever you call a note it will always return it's value to $1. Thank you for the help Shaz I guess I just had to work that one out.
Code:
def remove_remaining_members face_choice = ($game_system.face_choice + 1) class_choice = $game_system.class_choice $game_party.members.each_index do |i| next if i == face_choice $game_party.remove_actor(i) $game_party.remove_actor($game_party.members.size) unless face_choice == $game_party.members.size end $game_party.members[0].change_class(class_choice, keep_exp = false) $data_actors[face_choice].note[/<Actor_Switch:\s*(\d*)>/] actor_switch = $1 $game_switches[actor_switch] = true $data_classes[class_choice.to_i].note[/<Class_Switch:\s*(\d*)>/] class_switch = $1 $game_switches[class_switch.to_i] = true end