• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Change Move When Form is equal 1

Starlight Minun

LoveEletric
  • 21
    Posts
    10
    Years
    • Seen Jul 15, 2016
    After Changing Form
    I Would like a move change as well.
    for e.g Level 1 Tackle in normal Form
    When I Change To Different Form
    The Tackle Should Be Change To Ember For E.g
     
    Would be actual a good idea but thats the whole point of leveling up Pokemon , once they've evolved you want them to get better
     
    His English isn't very good, but that's not what the TC is asking.

    For what he is asking, I'd suggest looking at this bit of code here:

    Code:
    "onSetForm"=>proc{|pokemon,form|
       pbSeenForm(pokemon)
       if !pokemon.forceform
         moves=[
            :OVERHEAT,  # Heat, Microwave
            :HYDROPUMP, # Wash, Washing Machine
            :BLIZZARD,  # Frost, Refrigerator
            :AIRSLASH,  # Fan
            :LEAFSTORM  # Mow, Lawnmower
         ]
         hasoldmove=-1
         for i in 0...4
           for j in 0...moves.length
             if isConst?(pokemon.moves[i].id,PBMoves,moves[j])
               hasoldmove=i; break
             end
           end
           break if hasoldmove>=0
         end
         if form>0
           newmove=moves[form-1]
           if newmove!=nil && hasConst?(PBMoves,newmove)
             if hasoldmove>=0
               # Automatically replace the old form's special move with the new one's
               oldmovename=PBMoves.getName(pokemon.moves[hasoldmove].id)
               newmovename=PBMoves.getName(getID(PBMoves,newmove))
               pokemon.moves[hasoldmove]=PBMove.new(getID(PBMoves,newmove))
               Kernel.pbMessage(_INTL("\\se[]1,\\wt[4] 2,\\wt[4] and...\\wt[8] ...\\wt[8] ...\\wt[8] Poof!\\se[balldrop]\1"))
               Kernel.pbMessage(_INTL("{1} forgot how to\r\nuse {2}.\1",pokemon.name,oldmovename))
               Kernel.pbMessage(_INTL("And...\1"))
               Kernel.pbMessage(_INTL("\\se[]{1} learned {2}!\\se[itemlevel]",pokemon.name,newmovename))
             else
               # Try to learn the new form's special move
               pbLearnMove(pokemon,getID(PBMoves,newmove),true)
             end
           end
         else
           if hasoldmove>=0
             # Forget the old form's special move
             oldmovename=PBMoves.getName(pokemon.moves[hasoldmove].id)
             pbDeleteMove(pokemon,hasoldmove)
             Kernel.pbMessage(_INTL("{1} forgot {2}...",pokemon.name,oldmovename))
             if pokemon.moves.find_all{|i| i.id!=0}.length==0
               pbLearnMove(pokemon,getID(PBMoves,:THUNDERSHOCK))
             end
           end
         end
       end
    }

    Which is found in the Pokemon_MultipleForms script section, describing how Rotom's moves change when he changes form.
     
    Back
    Top