• 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.

Explorer Kit-like "warper"

  • 6
    Posts
    4
    Years
    Hello! I am quite new to making fan games, however I have some experience coding. Therefore I thought I would make an item as practice.
    The item in question warps the player to a pre-determined location (for instance, back home or to a secret base kind of thing) and when used again it warps the player back to the location it was originally used. (Think something along the lines of the Explorer Kit from DPP).
    It is not fleshed out much, no fancy animations or anything but it works well. For this item to function, 3 variables and 1 switch are used, of which the IDs can be edited to serve your need. The code can be found below and needs to be inserted into the PItem_ItemEffects script section.
    Any suggestions or improvements to the code are welcome!

    Spoiler:
     
    Very interesting!
    I did a script similiar for the same item infact.

    Code:
    ItemHandlers::UseFromBag.add(:EXPLORERGEAR,proc{|item|
       if $game_switches[438]==true
         next 2
         pbUndergroundExit
         $game_switches[438]=false
         next 2
       elsif $game_switches[438]==false
         next 2
         pbUndergroundEnter
         Kernel.pbTransferUnderground(235,8,8)
         $game_switches[438]=true
       end
    })

    the transferUnderground bit does all the bits you have in your script there just seperately.
    the enter and exit are just used to like the escape rope to decide where to go and no need to record it for variables.

    really like the script though, works functionally the same and way more plug-and-play than my one
     
    Back
    Top