• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

[Other] How to give an item right after a trainer battle

  • 109
    Posts
    9
    Years
    • Seen Apr 2, 2018
    I am trying to make it where you gain a fossil after beating someone, but it won't work. Can anyone tell me an outline or if it isn't possible.
     
    If its possible it'd be awesome, especially if you can obtain all fossils that way.

    Yea. The fossil has a setflag like all the other items, just I don't know how to give an item right after you beat the trainer :/
     
    Maybe I should treat it like a gym battle?
     
    I am trying to make it where you gain a fossil after beating someone, but it won't work. Can anyone tell me an outline or if it isn't possible.

    It should be possible. You just need a trainer battle that continues the script. 0x1 and 0x2 work for single battles.
    Then give the fossil item. I don't remember the hex for those.
     
    It should be possible. You just need a trainer battle that continues the script. 0x1 and 0x2 work for single battles.
    Then give the fossil item. I don't remember the hex for those.

    What what does 0x1 and 0x2 do? I'm afraid I don't understand all of the scripts words x/
     
    Thats a basic thing you will get when scripting, the mixing up scripts. First put your battle script in the start then put the give item script then put hidesprite and atleast the setflag. and end. during testing you would get everything right as you know if you get defeated the script will not reach to the giveitem and you will flee to the PC and after you have won the match he/she will give that item to you and then it will reach to the setflag and after it have reached the setflag the event will no longer happen.
     
    Back
    Top