- 10
- Posts
- 5
- Years
- Seen Jul 25, 2020
So I've got this really cool idea to have your first starter Pokemon be a snagged Shadow Pokemon in your very first battle.
During the battle, I want a dialogue box to appear telling the player to capture said Pokemon. For example, battle goes on like normal, until the Pokemon is down to a certain amount of health. That's when a message comes up saying to snag the Pokemon, or something along those lines.
Can anyone tell me how I can make this happen, please?
And thank you, so much!
NOTE: I have very little coding knowledge, but I am able to put together the common sense stuff. I would appreciate instructions, examples, and where codes provided should be put.
EDIT: The tutorial on how to battle in the original games would be a good example of what I'm trying to do. Or Krane talking to you during your first battle in Pokemon XD.
UPDATE: So I've been messing around in the code, and this is what I've come up with. I haven't tested it and I'm sure it won't work, but can anyone confirm this or nudge me more in the right direction?
I put this under #Initialize Battle in PokeBattle_Battle between Weather and Abilities:
That should call those messages up while that switch is active. It will be turned on just before the battle starts.
And I put this under attacking, hoping to disable attacks when that same switch is still on, for the same battle:
I didn't get any errors, so I'm assuming I did the code language right at least.
FINAL UPDATE:
I figured it out on my own! Just had to go into PokeBattle_Battle and add a conditional branch in two places, one in the battle initialization and one to disable the player from being able to use any moves.
During the battle, I want a dialogue box to appear telling the player to capture said Pokemon. For example, battle goes on like normal, until the Pokemon is down to a certain amount of health. That's when a message comes up saying to snag the Pokemon, or something along those lines.
Can anyone tell me how I can make this happen, please?
And thank you, so much!
NOTE: I have very little coding knowledge, but I am able to put together the common sense stuff. I would appreciate instructions, examples, and where codes provided should be put.
EDIT: The tutorial on how to battle in the original games would be a good example of what I'm trying to do. Or Krane talking to you during your first battle in Pokemon XD.
UPDATE: So I've been messing around in the code, and this is what I've come up with. I haven't tested it and I'm sure it won't work, but can anyone confirm this or nudge me more in the right direction?
I put this under #Initialize Battle in PokeBattle_Battle between Weather and Abilities:
elsif @weather==PBWeather::STRONGWINDS
pbCommonAnimation("StrongWinds",nil,nil)
pbDisplay(_INTL("The wind is strong."))
end
if $game_switches[63] = true
pbDisplay(_INTL("The Poké Ball you found before is glowing in your hand!"))
pbDisplay(_INTL("Krane: What's this? You're glowing."))
pbDisplay(_INTL("I wonder...? Hey, try catching that Shadow Pokémon!"))
pbDisplay(_INTL("I know it belongs to someone else, but just trust me."))
end
pbOnActiveAll # Abilities
That should call those messages up while that switch is active. It will be turned on just before the battle starts.
And I put this under attacking, hoping to disable attacks when that same switch is still on, for the same battle:
# Attacking.
################################################################################
def pbCanShowFightMenu?(idxPokemon)
thispkmn=@battlers[idxPokemon]
if !pbCanShowCommands?(idxPokemon)
return false
end
#Starter Pokemon
if $game_switches[63] = true && foe.totalhp>2
pbDisplayPaused(_INTL("Krane: Try and catch that Pokémon!"))
return false
end
# No moves that can be chosen
I didn't get any errors, so I'm assuming I did the code language right at least.
FINAL UPDATE:
I figured it out on my own! Just had to go into PokeBattle_Battle and add a conditional branch in two places, one in the battle initialization and one to disable the player from being able to use any moves.
Last edited: