Hi! I'm making a pokémon game, Pokémon Marble Version, and I need to make a system where every time a gym-leader gets beaten by the player you unlock the ability to use a HM-attack!!
For example:
•Get to the first gym
•Get through the gym-maze
•Battle the gymleader and win
•Unlock the ability to use the HM01-attack, Cut!
Anyone that can help me with this? I know I could use switches, but that would be too hard... Not difficult but boring ...
I was hoping I ccould use variables but I'm not to good at that so could someone please help me?
Can't you just include the Change Skills: Cut + command into the event that holds the boss fight?
Probably... It's just that I'm new to rmxp and I'm not entirely sure on every function in eventing... ^^' But if this worksd... :D I'll ntry it right away!
But will this learn the player the skill or will it give him the ability to USE it?
I understand those to be the same thing... It will be permanent knowledge of the skill so he can use it as much as he wants whenever he wants as long as he has enough mana. If you want it to be a one-time use skill, then you can make it so that the skill, when used, calls a common event which makes him forget the skill...
okay! But, oh, one other thing!
If I want the player to be able to have the skiull before he can use it... How do I do that? So that the "special" fight (if won) will activate the powers :P
Make a fake version of the skill, then at the boss fight replace it with the real version.
_EDIT_
I fixed it because my typing is god awful.
Uhh... I didn't understand what Bubblegum said... Anyways, you could do a "special loss handler" or whatever it's called and make it so if you lose, you get game over-ed. If you win, then you get the spell and whatever else you want to happen. I think that's it...
[code]SPEC_SKILLS = {1 => 15, 2 => 20, 13 => 11}
class Game_Battler
alias skill_can_use_special_later? skill_can_use?
def skill_can_use?(skill_id)
if self.is_a?(Game_Actor) and SPEC_SKILLS[skill_id] != nil
if $game_switches[SPEC_SKILLS[skill_id]]
return skill_can_use_special_later?(skill_id)
else
return false
end
else
return skill_can_use_special_later?(skill_id)
end
end
end
Use this little script. Ok, this is how you need to connect skill IDs and switch IDs:
SPEC_SKILLS = {SKILL_ID1 => SWITCH_ID1, SKILL_ID2 => SWITCH_ID2, SKILL_ID3 => SWITCH_ID3}
Turning on the switch will allow the normal use of the skill. If the switch is off, the skill is automatically unuseable, regardless if it was learned or not. It will be displayed greyed out like unuseable skills are usually are displayed. Note that the switch affect this skill of all characters.[/code]
I personally think that using switches is the easiest, or Bubblegum's idea. Try common events
Make it to where you try and use the skill, it checks for the switch (say 001: Cut) and if it doesn't find it, then say that it wont work.