• 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!
  • 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] Scripting Help

  • 8
    Posts
    4
    Years
    • Seen Nov 23, 2021
    I would like to add in a script to not allow a player to enter a gym if they have specific type of pokemon in their party. I can't figure it out. Any help is appreciated. using 17.2 essentials.
     
    Hi! Moved your thread here since ROM hacking areas are for help with ROM hacks; by the way, you posted in ROM Hacking Discussion, while ROM Hacking Help is the place to ask regarding ROM hacks. ;)
     
    I would like to add in a script to not allow a player to enter a gym if they have specific type of pokemon in their party. I can't figure it out. Any help is appreciated. using 17.2 essentials.

    Hello. Do you mean type as in species or type as in, well, type?
     
    Hi! Moved your thread here since ROM hacking areas are for help with ROM hacks; by the way, you posted in ROM Hacking Discussion, while ROM Hacking Help is the place to ask regarding ROM hacks. ;)

    Ok thanks I didn't know exactly where to post. First time on page.
     
    is there a specific conditional branch option i need to choose? I can't seem to emulate what you have in the picture.
     
    Thanks for your help guys I have the npc doing what i want him to do now. How do i make sure that he repeats this action of checking the party? I don't want the player to be able to activate the switch then withdraw the pokemon afterwards.
     
    Thanks for your help guys I have the npc doing what i want him to do now. How do i make sure that he repeats this action of checking the party? I don't want the player to be able to activate the switch then withdraw the pokemon afterwards.

    I've thought about this now. I think the easiest thing to do would be to have an NPC in the gym that kicks the player out if they have one of the specified types. Here's how I was able to do it: https://imgur.com/a/VtUFmzS

    Basically, if the player enters the gym with a Fire- or Water-type, the gym dude will kick them out (first image). Otherwise, the second image happens. You'll need to add what is highlighted in the third image into the gym door event. This script turns self-switch A off for the gym dude, allowing the type check to happen each time the player enters the gym. In this script, the 8 is the event ID of the gym dude (this might be different for you) and the 95 is the map ID (this would be the map ID of the gym for you). You'll need to change the map transfers as well to fit your game.

    Let me know if anything doesn't make sense.
     
    Back
    Top