BATTLE OPTIONS THAT CHANGE DEPENDING ON SWITCHES
Posts
Pages:
1
Hello all.
I'm making a battle system that, depending on whether switch X is on or not, you can access certain battle options. (Fight, Guard, Skills, Items, etc.)
I tried working on this myself, and it clearly won't work the way I tried it.
Is there any way to do this without having to find a battle script? I think it'd be easy, but I'm kinda stumped.
I'm making a battle system that, depending on whether switch X is on or not, you can access certain battle options. (Fight, Guard, Skills, Items, etc.)
I tried working on this myself, and it clearly won't work the way I tried it.
Is there any way to do this without having to find a battle script? I think it'd be easy, but I'm kinda stumped.
I've a game that outright disables the Attack and Item commands, and I figure re-enabling them via a switch wouldn't be too far off. It's a simple script that looks something like...
...that. So, I imagine that for you, it might look something more like...
...this, depending on what all is enabled/disabled and with what switches.
class Window_ActorCommand < Window_Command # Overrides command window so that only skill-commands and gaurd are available. def make_command_list return unless @actor #add_attack_command add_skill_commands add_guard_command #add_item_command end end
...that. So, I imagine that for you, it might look something more like...
class Window_ActorCommand < Window_Command # Overrides command window so that commands are available if certain switches are active/enabled. def make_command_list return unless @actor add_attack_command if $game_switches[1] == true add_skill_commands if $game_switches[2] == true add_guard_command if $game_switches[3] == true add_item_command if $game_switches[4] == true end end
...this, depending on what all is enabled/disabled and with what switches.
Ah
Ah! It appears I had the right idea and was simply writing in incorrectly. Thanks, I'll try that out! ^^
author=Marrend
I imagine that for you, it might look something more like...class Window_ActorCommand < Window_Command # Overrides command window so that commands are available if certain switches are active/enabled. def make_command_list return unless @actor add_attack_command if $game_switches[1] == true add_skill_commands if $game_switches[2] == true add_guard_command if $game_switches[3] == true add_item_command if $game_switches[4] == true end end
...this, depending on what all is enabled/disabled and with what switches.
Ah! It appears I had the right idea and was simply writing in incorrectly. Thanks, I'll try that out! ^^
Alright... So now I'm getting this message whenever I begin battles:
"Script 'Scene_Battle' line 223: Agrumenterror occurred.
Wrong number of arguments (0 for 2)"
"Script 'Scene_Battle' line 223: Agrumenterror occurred.
Wrong number of arguments (0 for 2)"
Hrm. Let me insert that code I posted into my blank-slate-test-stuff project...
I ran a test-battle through the editor, and got into a fight in-game, and the command window was empty on both occasions. So, either I'm doing something you're not or visa-versa. For full disclosure, I did not mess with the pre-made scripts at all. I just inserted my code in the section labeled "Materials".
I ran a test-battle through the editor, and got into a fight in-game, and the command window was empty on both occasions. So, either I'm doing something you're not or visa-versa. For full disclosure, I did not mess with the pre-made scripts at all. I just inserted my code in the section labeled "Materials".
Pages:
1