• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking 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.

[Question] Creating an item that allows the player to be ignored by NPCs

  • 8
    Posts
    6
    Years
    • Seen Jan 12, 2022
    Hello, it's been a while since I've worked on my game project, since 2019 when I came here last asking about making an item that allows changing Pokemon to/from their shadow variant from the backpack in place of the Purification Chamber to be exact, and while I've booted up my version of essentials (whichever version was current back in 2019) here and there and done miniscule work on it. I've started back up in earnest and have once again hit a wall that I need a little help with. I want to give the option of a Dark Path where the player is able to join the Team Rocket stand in for my game. I have it set to where Player can change into various outfits and I'd like to have the Rocket Grunt outfit give a key item when worn that makes all Rocket Members not engage in battle with Player and then when the outfit is taken off key item is removed, I know I would have to apply the "ignore" code to each Rocket NPC individually, but I'm not sure how to go about doing so, would doing the same thing as the guards in Kanto Region stopping you from going to X town if you don't have Y badge work, or would I need to do something specific because they're battle NPCs?
    I'm sure it's a simple thing to accomplish, but I've been out of the Essentials Scripting game for a while and figured I'd come back here and double check before I started messing around and then couldn't figure out how or why something broke, lol.

    If possible, I would prefer to avoid upgrading to the current version of Essentials because I'm unsure about any possible changes that might break my crafting mechanic scripts, Shadow Form changing item script, and other various scripts I've been able to work out for this project.

    Thank you in advance for any help or advice!
     
    It's not what you're asking for, but the easiest way I can think of to go about this would be:

    1. Give the player the key item
    2. Make it so that when using the key item, it changes the outfit and flips a certain switch to True
    3. Make it so that those NPCs don't battle you when the switch is active
    4. When using the key item when the outfit is already on, it removes the outfit and sets the switch to False
     

    I apologize, I didn't get the notification anyone responded and just happened to hop on here and check. I think I might just have it set so the switch flips when given the opportunity to choose the Dark Path, and then that'll allow them to swap outfits as they see fit and keep the Rocket Battles turned off regardless, instead of trying to tie it directly to the outfit. So they're not forced to wear the enemy uniform just to play the Dark Path.
    Thanks for the reply!
     
    Back
    Top