Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Orbital_Entertainment

[REQUEST] Help with custom script please.

Question

I know that this may be the wrong topic location for this request, please move it to the appropriate location. I apologize for that. I have requested help with my custom gender/race/class script. There is an error with the "if and elsif" choices section of my script. I get no error message while running the script, but I know there is an error because it ALWAYS runs the male choice section, instead of checking if you selected male or female, and then proceeding. Thank you in advance for any and all help that you can provide. Here is the error location:
 

#==============================================================================
# Scene_Class
#------------------------------------------------------------------------------
# This sets up what gender you will be.
#==============================================================================

class Scene_Class

def main

m1 = "Male"
m2 = "Female"
m3 = "Confirm"

@command_window = Window_ClassCommand.new(170, [m1, m2, m3])
@command_window.x = 150
@command_window.y = 112

@currentgender_window = Window_CurrentGender.new
@classhelp_window = Window_ClassHelp1.new

Graphics.transition

loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end

Graphics.freeze

@command_window.dispose
@currentgender_window.dispose
@classhelp_window.dispose

end

def update

@command_window.update
@currentgender_window.update
@classhelp_window.update

if Input.trigger?(Input::B)
$game_system.se_play($data_system.buzzer_se)
end

if Input.trigger?(Input::C)

case @command_window.index
when 0
$game_party.actors[0].set_graphic("Male", 0, "Male", 0)
$game_system.se_play($data_system.decision_se)
$game_player.refresh
@currentgender_window.refresh
when 1
$game_party.actors[0].set_graphic("Female", 0, "Female", 0)
$game_system.se_play($data_system.decision_se)
$game_player.refresh
@currentgender_window.refresh
when 2
if(0)
$game_system.se_play($data_system.decision_se)
$game_party.actors[0].set_graphic("Blank", 0, "Blank", 0)
$game_switches[2] == true
$game_switches[3] == false
$game_player.refresh
$scene = Scene_ClassMale.new
elsif(1)
$game_system.se_play($data_system.decision_se)
$game_party.actors[0].set_graphic("Blank", 0, "Blank", 0)
$game_switches[2] == false
$game_switches[3] == true
$game_player.refresh
$scene = Scene_ClassFemale.new
end
return
end
end
end
end

Let me know if you need more than just that. Thank you.
-Ghozt

Edited by Orbital_Entertainment

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Nevermind guys, just had it trigger a variable and check for said variable.
This topic can be closed now.
-Ghozt

when 0
        $game_party.actors[0].set_graphic("Light Skin", 0, "Light Skin", 0)
        $game_system.se_play($data_system.decision_se)
        $game_variables[15] = 1
        $game_player.refresh
        @currentinfo_window.refresh
      when 1
        $game_party.actors[0].set_graphic("Dark Skin", 0, "Dark Skin", 0)
        $game_system.se_play($data_system.decision_se)
        $game_variables[15] = 2
        $game_player.refresh
        @currentinfo_window.refresh
      when 2
        if $game_variables[15] == 1
          $game_system.se_play($data_system.decision_se)
          $game_party.actors[0].set_graphic("Blank", 0, "Blank", 0)
          $game_player.refresh
          $scene = Scene_GeneFemaleLight.new
        elsif $game_variables[15] == 2
          $game_system.se_play($data_system.decision_se)
          $game_party.actors[0].set_graphic("Blank", 0, "Blank", 0)
          $game_player.refresh
          $scene = Scene_GeneFemaleDark.new
      end
Edited by Orbital_Entertainment

Share this post


Link to post
Share on other sites
  • 0

Yeah it's the wrong section

ae9a33ea48c56963b6dd966a2beeaabd.png

 

Is this really that hard to spot? (I'd like to know, in case things need to be made clearer :) )

Ah, I see. I'm sorry Marked, I will make sure to put any future help I need in the "RPG MAKER XP Requests" topic section.

-Ghozt

Edited by Orbital_Entertainment

Share this post


Link to post
Share on other sites
  • 0

Yeah it's the wrong section

ae9a33ea48c56963b6dd966a2beeaabd.png

 

Is this really that hard to spot? (I'd like to know, in case things need to be made clearer :) )

Marked, quick question. Is there a way I can change the location of this topic? I see you moved it for me, thank you, but this is for XP, not VX Ace. Is there a way I can change the location of this without bothering you?

-Ghozt

Edited by Orbital_Entertainment

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...